Skip to content

Commit 49f480d

Browse files
committed
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.
1 parent 055a99b commit 49f480d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

.github/actions/setup/action.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ runs:
7272
uses: arduino/setup-protoc@v3
7373
with:
7474
version: "31.1"
75-
github-token: ${{ inputs.github-token }}
7675

7776
- name: Install flatc
7877
uses: Nugine/setup-flatc@v1

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ env:
4949
RUST_BACKTRACE: 1
5050
# Optimize build performance
5151
CARGO_INCREMENTAL: 0
52-
RUSTFLAGS: "-C target-cpu=native"
5352

5453
jobs:
5554
# First layer: GitHub Actions level optimization (handling duplicates and concurrency)
@@ -108,6 +107,8 @@ jobs:
108107
if: needs.skip-duplicate.outputs.should_skip != 'true' && needs.build-check.outputs.should_build == 'true'
109108
runs-on: ${{ matrix.os }}
110109
timeout-minutes: 60
110+
env:
111+
RUSTFLAGS: ${{ matrix.cross == 'false' && '-C target-cpu=native' || '' }}
111112
strategy:
112113
fail-fast: false
113114
matrix:

0 commit comments

Comments
 (0)