From 0136935b8d0d7401be48f2933944bb2f695fa25f Mon Sep 17 00:00:00 2001 From: Hunter Bown Date: Mon, 4 May 2026 11:24:08 -0500 Subject: [PATCH] fix(release): use rust target (not glibc-versioned) for binary copy path The aarch64 deepseek build in release.yml run 25329602631 succeeded in 4m 53s but the rename step failed: cp: cannot stat 'target/aarch64-unknown-linux-gnu.2.28/release/deepseek' cargo zigbuild parses `aarch64-unknown-linux-gnu.2.28` by passing `aarch64-unknown-linux-gnu` to cargo and the `.2.28` glibc minimum to zig's CC. The cargo target output dir is therefore `target/aarch64-unknown-linux-gnu/release/`, never the glibc-versioned form. v0.8.9 release.yml hard-coded the rust triple in the rename step and worked. v0.8.10 added `target_zig: .` to the matrix and switched the rename step to `${{ matrix.target_zig || matrix.target }}`, which silently became wrong for every zigbuild matrix leg. This commit: - Always uses `matrix.target` (rust triple) for the copy source path. - Adds a defensive `find target -name "${binary}"` debug listing if the expected binary isn't at the rust-target path, so future cargo-zigbuild output-dir changes are visible in the build log rather than just "No such file". --- .github/workflows/release.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index db88ba11..92767366 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -130,8 +130,16 @@ jobs: - name: Rename binary shell: bash run: | - TARGET_DIR="${{ matrix.target_zig || matrix.target }}" - cp "target/${TARGET_DIR}/release/${{ matrix.binary }}" ${{ matrix.artifact_name }} + # cargo zigbuild writes binaries to target//release/ — + # the .glibc suffix in matrix.target_zig is consumed by zig as a CC + # flag, not by cargo as a target dir. Always use the rust target. + BIN_PATH="target/${{ matrix.target }}/release/${{ matrix.binary }}" + if [ ! -f "${BIN_PATH}" ]; then + echo "Binary not at ${BIN_PATH}; searching target/ for ${{ matrix.binary }}:" + find target -name "${{ matrix.binary }}" -type f + exit 1 + fi + cp "${BIN_PATH}" "${{ matrix.artifact_name }}" - uses: actions/upload-artifact@v4 with: name: ${{ matrix.artifact_name }}