ci: build musl only for arm64 and reuse toolchain cache [CI]
This commit is contained in:
1 parent
490b008a57
commit
a6f9759238
22 files changed
+62
-73
No files matched your search
+1
-6
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
# 发布一个节点程序:scripts/publish.sh <agent|backend|fleet-enroll> <rid>
|
||||
# 输出到 backend/artifacts/publish/<project>/<rid>/。linux-musl-x64(Alpine)和 linux-x64(Ubuntu noble,glibc)在 NativeAOT SDK 容器里构建(任何主机都可以,包括 Windows),
|
||||
# 输出到 backend/artifacts/publish/<project>/<rid>/。linux-x64(Ubuntu noble,glibc)在 NativeAOT SDK 容器里构建(任何主机都可以,包括 Windows),
|
||||
# 其他 rid 用本机的 dotnet(NativeAOT 不能交叉编译到别的操作系统,所以 win-x64 要在 Windows 上、linux-x64 要在 glibc 的 Linux 上构建)。
|
||||
set -euo pipefail
|
||||
|
||||
@@ -29,11 +29,6 @@ fi
|
||||
args=(publish "$csproj" -c Release -r "$rid" -p:PublishAot=true -p:DebugType=none -p:DebugSymbols=false "${publish_options[@]}" -o "/src/$out" --artifacts-path /artifacts -nologo -v q)
|
||||
|
||||
case "$rid" in
|
||||
linux-musl-x64)
|
||||
# SDK 镜像的版本可以比 global.json 新(rollForward = latestFeature)
|
||||
docker run --rm "${build_env[@]}" -v "$root:/src" -v moshiro-nuget:/root/.nuget -v "moshiro-artifacts-$rid:/artifacts" -w /src \
|
||||
mcr.microsoft.com/dotnet/sdk:10.0-alpine-aot dotnet "${args[@]}"
|
||||
;;
|
||||
linux-x64)
|
||||
docker run --rm "${build_env[@]}" -v "$root:/src" -v moshiro-nuget:/root/.nuget -v "moshiro-artifacts-$rid:/artifacts" -w /src mcr.microsoft.com/dotnet/sdk:10.0-noble-aot dotnet "${args[@]}"
|
||||
;;
|
||||
|
||||
Reference in new issue
Block a user