ci: skip host OpenAPI generation for arm64

This commit is contained in:
justme committed 2026-10-04 22:38:26 +08:00
1 parent ceef543854
commit 9b6c4e0fd8
1 file changed
+8
+8
View File
@@ -44,10 +44,18 @@ mkdir -p "$output" "$build_root" "$stage_root"
publish_aot() { publish_aot() {
local name="$1" project="$2" destination="$3" local name="$1" project="$2" destination="$3"
local openapi_args=()
# The API document is generated from the host executable. During an x64 to
# arm64 cross-publish, that build-time tool cannot run the target binary;
# the checked-in OpenAPI document is already available for this release.
if [[ "$rid" == linux-arm64 && "$name" == backend ]]; then
openapi_args=(-p:OpenApiGenerateDocuments=false)
fi
(cd "$root/backend" && dotnet publish "$project" \ (cd "$root/backend" && dotnet publish "$project" \
-c Release -r "$rid" --self-contained true \ -c Release -r "$rid" --self-contained true \
-p:PublishAot=true -p:StripSymbols=true -p:DebugType=none \ -p:PublishAot=true -p:StripSymbols=true -p:DebugType=none \
-p:ObjCopyName="$objcopy" \ -p:ObjCopyName="$objcopy" \
"${openapi_args[@]}" \
--artifacts-path "$build_root/$name" \ --artifacts-path "$build_root/$name" \
-o "$destination") -o "$destination")
} }