diff options
| author | 魏曹先生 <1992414357@qq.com> | 2025-09-25 16:01:25 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2025-09-25 16:01:25 +0800 |
| commit | e22bed0c8f6b052fd3b39cb20cc3aea9b0f72dc8 (patch) | |
| tree | 8add4a8e6b85eb5b5d69a299aaff9f672e5d3fae /.github/workflows/rust.yml | |
| parent | fe5c34f2d215b48be4bd71b8a0a0207713f76d51 (diff) | |
Install musl development tools for GCC compatibility
- Add musl-tools installation in setup job
- Update test job to install both musl target and musl-tools
- Fixes 'x86_64-linux-musl-gcc not found' error during compilation
Diffstat (limited to '.github/workflows/rust.yml')
| -rw-r--r-- | .github/workflows/rust.yml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 99c800a..c648754 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -22,6 +22,8 @@ jobs: with: toolchain: stable targets: x86_64-unknown-linux-musl + - name: Install musl development tools + run: sudo apt-get update && sudo apt-get install -y musl-tools - name: Generate cache key id: cache-key run: echo "value=cargo-$(rustc -V | sed 's/.*(\(.*\))/\1/')-$(sha256sum Cargo.lock | cut -d' ' -f1)" >> $GITHUB_OUTPUT @@ -62,8 +64,10 @@ jobs: ~/.cargo/git target key: ${{ needs.setup.outputs.cache-key }}-test - - name: Install musl target - run: rustup target add x86_64-unknown-linux-musl + - name: Install musl target and tools + run: | + rustup target add x86_64-unknown-linux-musl + sudo apt-get update && sudo apt-get install -y musl-tools - name: Build run: cargo build --workspace --verbose - name: Run tests |
