fix: restore Zig and cargo-zigbuild caching in GitHub Actions setup action (#92)

* fix: restore Zig and cargo-zigbuild caching in GitHub Actions setup action

Use mlugg/setup-zig and taiki-e/cache-cargo-install-action to speed up cross-compilation tool installation and avoid repeated downloads. All comments and code are in English.

* fix: use correct taiki-e/install-action for cargo-zigbuild

Use taiki-e/install-action@cargo-zigbuild instead of taiki-e/cache-cargo-install-action@v2 to match the original implementation from PR #77.

* refactor: remove explicit Zig version to use latest stable
This commit is contained in:
安正超
2025-07-07 23:15:40 +08:00
committed by GitHub
parent e50bc4c60c
commit 9862677fcf

View File

@@ -86,15 +86,13 @@ runs:
targets: ${{ inputs.target }}
components: rustfmt, clippy
- name: Install cross-compilation tools
- name: Install Zig
if: inputs.install-cross-tools == 'true'
shell: bash
run: |
# Install Zig for cross-compilation
curl -L https://github.com/ziglang/zig/releases/download/0.11.0/zig-linux-x86_64-0.11.0.tar.xz | tar -xJ
sudo mv zig-linux-x86_64-0.11.0/zig /usr/local/bin/
# Install cargo-zigbuild
cargo install cargo-zigbuild
uses: mlugg/setup-zig@v2
- name: Install cargo-zigbuild
if: inputs.install-cross-tools == 'true'
uses: taiki-e/install-action@cargo-zigbuild
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2