mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-27 15:37:02 +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:
@@ -72,7 +72,6 @@ runs:
|
|||||||
uses: arduino/setup-protoc@v3
|
uses: arduino/setup-protoc@v3
|
||||||
with:
|
with:
|
||||||
version: "31.1"
|
version: "31.1"
|
||||||
github-token: ${{ inputs.github-token }}
|
|
||||||
|
|
||||||
- name: Install flatc
|
- name: Install flatc
|
||||||
uses: Nugine/setup-flatc@v1
|
uses: Nugine/setup-flatc@v1
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ env:
|
|||||||
RUST_BACKTRACE: 1
|
RUST_BACKTRACE: 1
|
||||||
# Optimize build performance
|
# Optimize build performance
|
||||||
CARGO_INCREMENTAL: 0
|
CARGO_INCREMENTAL: 0
|
||||||
RUSTFLAGS: "-C target-cpu=native"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# First layer: GitHub Actions level optimization (handling duplicates and concurrency)
|
# 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'
|
if: needs.skip-duplicate.outputs.should_skip != 'true' && needs.build-check.outputs.should_build == 'true'
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
|
env:
|
||||||
|
RUSTFLAGS: ${{ matrix.cross == 'false' && '-C target-cpu=native' || '' }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
|||||||
Reference in New Issue
Block a user