mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-17 01:30:33 +00:00
fix: resolve GitHub Actions build failures and optimize cross-compilation
- Remove invalid github-token parameter from arduino/setup-protoc action - Fix cross-compilation RUSTFLAGS issue by conditionally setting target-cpu=native - Update workflow tag triggers from v* to * for non-v prefixed tags - Optimize Zig and cargo-zigbuild installation using official actions This resolves build failures in aarch64-unknown-linux-musl target where zig was receiving invalid x86_64 CPU flags during cross-compilation.
This commit is contained in:
1
.github/actions/setup/action.yml
vendored
1
.github/actions/setup/action.yml
vendored
@@ -72,7 +72,6 @@ runs:
|
||||
uses: arduino/setup-protoc@v3
|
||||
with:
|
||||
version: "31.1"
|
||||
github-token: ${{ inputs.github-token }}
|
||||
|
||||
- name: Install flatc
|
||||
uses: Nugine/setup-flatc@v1
|
||||
|
||||
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@@ -49,7 +49,6 @@ env:
|
||||
RUST_BACKTRACE: 1
|
||||
# Optimize build performance
|
||||
CARGO_INCREMENTAL: 0
|
||||
RUSTFLAGS: "-C target-cpu=native"
|
||||
|
||||
jobs:
|
||||
# First layer: GitHub Actions level optimization (handling duplicates and concurrency)
|
||||
@@ -108,6 +107,8 @@ jobs:
|
||||
if: needs.skip-duplicate.outputs.should_skip != 'true' && needs.build-check.outputs.should_build == 'true'
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 60
|
||||
env:
|
||||
RUSTFLAGS: ${{ matrix.cross == 'false' && '-C target-cpu=native' || '' }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
||||
Reference in New Issue
Block a user