From 9b6c4e0fd892d7731f9f962ab1e62e3ec0bc3f00 Mon Sep 17 00:00:00 2001 From: JustMe Date: Sun, 4 Oct 2026 22:38:26 +0800 Subject: [PATCH] ci: skip host OpenAPI generation for arm64 --- ci/release-linux.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ci/release-linux.sh b/ci/release-linux.sh index e4d6d11..15db69a 100644 --- a/ci/release-linux.sh +++ b/ci/release-linux.sh @@ -44,10 +44,18 @@ mkdir -p "$output" "$build_root" "$stage_root" publish_aot() { 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" \ -c Release -r "$rid" --self-contained true \ -p:PublishAot=true -p:StripSymbols=true -p:DebugType=none \ -p:ObjCopyName="$objcopy" \ + "${openapi_args[@]}" \ --artifacts-path "$build_root/$name" \ -o "$destination") }