From 4f61b007da38c4a644a740ed17473fa82e3758d9 Mon Sep 17 00:00:00 2001 From: hector <42570491+majinghe@users.noreply.github.com> Date: Sun, 27 Sep 2026 21:40:23 +0800 Subject: [PATCH] ci: build linux-aarch64 natively on sm-standard-4-arm and verify every Linux package (#8160) Route the two linux-aarch64-* release legs to the dedicated arm64 runner and build them natively (cross: false) instead of cross-compiling via cargo-zigbuild on x86_64 hosts. With native legs now executable, extend the packaged-artifact checks that were previously gated to x86_64-unknown-linux-gnu only: - Every Linux leg runs rustfs --version and rustfs-cli --help from its own package, proving the artifact matches the runner architecture. - The packaged-console runtime smoke (server boot + console HTTP 200) also covers aarch64-unknown-linux-gnu, so both architectures get full runtime verification. Musl legs run the binary checks but skip server boot for now. --- .github/workflows/build.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9768d4f65..38fe3f495 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -208,9 +208,9 @@ jobs: all='{"include":[ {"target_id":"linux-x86_64-musl","os":"sm-standard-4","target":"x86_64-unknown-linux-musl","cross":false,"platform":"linux","rustflags":"","features":""}, - {"target_id":"linux-aarch64-musl","os":"sm-standard-4","target":"aarch64-unknown-linux-musl","cross":true,"platform":"linux","rustflags":"","features":""}, + {"target_id":"linux-aarch64-musl","os":"sm-standard-4-arm","target":"aarch64-unknown-linux-musl","cross":false,"platform":"linux","rustflags":"","features":""}, {"target_id":"linux-x86_64-gnu","os":"sm-standard-4","target":"x86_64-unknown-linux-gnu","cross":false,"platform":"linux","rustflags":"","features":"pyroscope"}, - {"target_id":"linux-aarch64-gnu","os":"sm-standard-4","target":"aarch64-unknown-linux-gnu","cross":true,"platform":"linux","rustflags":"","features":"pyroscope"}, + {"target_id":"linux-aarch64-gnu","os":"sm-standard-4-arm","target":"aarch64-unknown-linux-gnu","cross":false,"platform":"linux","rustflags":"","features":"pyroscope"}, {"target_id":"macos-aarch64","os":"macos-latest","target":"aarch64-apple-darwin","cross":false,"platform":"macos","rustflags":"","features":"pyroscope"}, {"target_id":"windows-x86_64","os":"windows-latest","target":"x86_64-pc-windows-msvc","cross":false,"platform":"windows","rustflags":"","features":""} ]}' @@ -625,7 +625,7 @@ jobs: echo "🔧 Build type: ${BUILD_TYPE}" echo "📊 Version: ${VERSION}" - - name: Verify packaged Linux CLI + - name: Verify packaged Linux binaries if: matrix.platform == 'linux' shell: bash run: | @@ -640,15 +640,16 @@ jobs: exit 1 fi - if [[ "${{ matrix.target }}" == "x86_64-unknown-linux-gnu" ]]; then - cli_dir="$(mktemp -d)" - trap 'rm -rf "$cli_dir"' EXIT - unzip -q "$package_file" rustfs-cli -d "$cli_dir" - "$cli_dir/rustfs-cli" --help >/dev/null - fi + # Every Linux target builds natively, so executing the binaries here + # proves each artifact matches its runner architecture. + cli_dir="$(mktemp -d)" + trap 'rm -rf "$cli_dir"' EXIT + unzip -q "$package_file" rustfs rustfs-cli -d "$cli_dir" + "$cli_dir/rustfs" --version + "$cli_dir/rustfs-cli" --help >/dev/null - name: Verify packaged console - if: matrix.target == 'x86_64-unknown-linux-gnu' + if: matrix.target == 'x86_64-unknown-linux-gnu' || matrix.target == 'aarch64-unknown-linux-gnu' shell: bash run: | set -euo pipefail