Skip to content

ci: pin cargo-zigbuild 0.23.3 and cross-compile release branches before merging - #132

Merged
tamada merged 1 commit into
mainfrom
fix/cross-compile-zigbuild
Oct 12, 2026
Merged

tamada merged 1 commit into
mainfrom
fix/cross-compile-zigbuild

Conversation

@tamada

@tamada tamada commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Fixes the cross-compilation that failed the v0.10.0 publish run, and makes release branches cross-compile before they are merged.

What failed

The publish run for v0.10.0 failed in x86_64-apple-darwin, and the other three targets were cancelled:

error: linking with `.../zigcc-x86_64-apple-darwin-1bd8.sh` failed: exit status: 1
  = note: error: unable to read exported symbols list '-dead_strip': FileNotFound
error: could not compile `sevenz-rust2` (lib)
  • The cross-compile action used ghcr.io/rust-cross/cargo-zigbuild:latest, which is now 0.23.4.
  • 0.23.4 detaches the operand of -exported_symbols_list when it links a cdylib for Apple targets (rust-cross/cargo-zigbuild#479). sevenz-rust2 declares crate-type = ["cdylib", "rlib"], so it is hit, on aarch64-apple-darwin as well.
  • The fix (#480) is merged but not released.
  • v0.9.0 linked with an earlier image.

Changes

  • .github/actions/cross-compile/action.yaml: pins cargo-zigbuild:0.23.3. A comment explains why and says to move to a release containing #480, not back to latest. The last step now also checks that the totebag binary was produced.
  • .github/workflows/cross-compile.yaml: it used to run only on pushes to a test_workflow branch, and the everyday build only compiles natively on Linux x86_64 and macOS arm64. So nothing exercised the release toolchain before a release was merged. It now runs the four release targets, with fail-fast: false so every target reports:
    • on every push to a release/v* branch: check it is green before merging the release PR;
    • on pull requests that change the cross-compile action or this workflow, which includes this one;
    • on demand (workflow_dispatch).

Every push would be expensive, because each target pulls a build image and does a full release build. Release branches plus toolchain changes cover the cases where the cross toolchain matters.

Testing

This PR changes both paths in the pull_request filter, so the cross-compile workflow runs here for all four targets.

Redoing v0.10.0

After this is merged:

  1. Delete the draft release and the tag v0.10.0. publish.yaml creates the tag again, and fails if it exists.
  2. Push release/v0.10.0 again and wait for cross-compile to pass.
  3. Open the release PR and merge it.

🤖 Generated with Claude Code

…ore merging

The v0.10.0 publish run failed: the cross-compile action used
ghcr.io/rust-cross/cargo-zigbuild:latest, now 0.23.4, which detaches the
operand of `-exported_symbols_list` when linking a cdylib for Apple
targets (rust-cross/cargo-zigbuild#479). sevenz-rust2 builds a cdylib,
so x86_64-apple-darwin failed with "unable to read exported symbols
list '-dead_strip'", and aarch64-apple-darwin is affected the same way.
The fix (#480) is not released yet, so the image is pinned to 0.23.3,
which linked v0.9.0.

Nothing ran the cross toolchain before a release was merged:
cross-compile.yaml only fired on a `test_workflow` branch, and the build
workflow only compiles natively on Linux x86_64 and macOS arm64. It now
runs on every push to a release/v* branch, when the cross-compile action
or the workflow itself changes, and on demand, for all four release
targets with fail-fast off. The action also checks that the `totebag`
binary was produced.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tamada tamada self-assigned this Oct 12, 2026
@tamada tamada added the bug Something isn't working label Oct 12, 2026
@tamada tamada added this to the v0.10.0 milestone Oct 12, 2026
@tamada
tamada merged commit e423857 into main Oct 12, 2026
12 checks passed
@tamada
tamada deleted the fix/cross-compile-zigbuild branch October 12, 2026 00:08
@tamada tamada mentioned this pull request Oct 12, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant