Skip to content

Commit 4683f06

Browse files
authored
ci: pin cargo-zigbuild to git rev to fix aarch64-musl link failure (#1815)
1 parent 04086e5 commit 4683f06

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

‎.github/actions/build-upstream/action.yml‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ runs:
2525
id: cache-key
2626
shell: bash
2727
run: |
28-
echo "key=napi-binding-v3-${INPUTS_TARGET}-${RELEASE_BUILD}-${DEBUG}-${VERSION}-${NPM_TAG}-${{ hashFiles('packages/tools/.upstream-versions.json', 'Cargo.lock', 'crates/**/*.rs', 'crates/*/Cargo.toml', 'packages/cli/binding/**/*.rs', 'packages/cli/binding/Cargo.toml', 'Cargo.toml', '.cargo/config.toml', 'packages/cli/package.json', 'packages/cli/build.ts', 'packages/cli/tsdown.config.ts') }}" >> $GITHUB_OUTPUT
28+
echo "key=napi-binding-v3-${INPUTS_TARGET}-${RELEASE_BUILD}-${DEBUG}-${VERSION}-${NPM_TAG}-${{ hashFiles('packages/tools/.upstream-versions.json', 'rust-toolchain.toml', 'Cargo.lock', 'crates/**/*.rs', 'crates/*/Cargo.toml', 'packages/cli/binding/**/*.rs', 'packages/cli/binding/Cargo.toml', 'Cargo.toml', '.cargo/config.toml', 'packages/cli/package.json', 'packages/cli/build.ts', 'packages/cli/tsdown.config.ts') }}" >> $GITHUB_OUTPUT
2929
env:
3030
INPUTS_TARGET: ${{ inputs.target }}
3131

@@ -81,11 +81,15 @@ runs:
8181
with:
8282
version: 0.15.2
8383

84+
# Rust nightly-2026-06-10 passes --fix-cortex-a53-843419 to the linker for
85+
# aarch64-linux targets, which zig cc rejects. The filter for this arg
86+
# (rust-cross/cargo-zigbuild#452) is merged but unreleased, so install from
87+
# the pinned git commit. TODO: revert to taiki-e/install-action once
88+
# cargo-zigbuild > 0.22.3 is released.
8489
- name: Install cargo-zigbuild (musl)
8590
if: steps.cache-restore.outputs.cache-hit != 'true' && contains(inputs.target, 'musl')
86-
uses: taiki-e/install-action@4bc351f7f2614e48088386e2a0ad917ca3a7e4ba # v2.81.5
87-
with:
88-
tool: cargo-zigbuild
91+
shell: bash
92+
run: cargo install --locked --git https://github.com/rust-cross/cargo-zigbuild --rev 7e791b4be71b9870e0abccedf7885486803cd923 cargo-zigbuild
8993

9094
# NAPI builds - only run on cache miss (slow, especially on Windows)
9195
# Must run before vite-plus TypeScript builds which depend on the bindings

0 commit comments

Comments
 (0)