Skip to content

Commit 35ba22f

Browse files
committed
Add target aarch64-unknown-linux-musl
1 parent 6d5f07a commit 35ba22f

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.github/workflows/release-agent.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,24 @@ jobs:
5959
RUST_BACKTRACE: 1
6060
strategy:
6161
matrix:
62-
build: [linux, macos-intel, macos-m1, win-msvc]
62+
build: [linux, linux-arm64, macos-intel, macos-m1, win-msvc]
6363
include:
6464
- build: linux
6565
os: ubuntu-18.04
6666
rust: nightly
6767
target: x86_64-unknown-linux-musl
68+
- build: linux-arm64
69+
os: ubuntu-18.04
70+
rust: nightly
71+
target: aarch64-unknown-linux-musl # cross compile to arm64 on x86_64
6872
- build: macos-intel
6973
os: macos-latest
7074
rust: nightly
7175
target: x86_64-apple-darwin
7276
- build: macos-m1
7377
os: macos-latest
7478
rust: nightly
75-
target: aarch64-apple-darwin # cross compile to M1 on Intel CPU
79+
target: aarch64-apple-darwin # cross compile to M1 on x86_64
7680
- build: win-msvc
7781
os: windows-latest
7882
rust: nightly
@@ -93,7 +97,7 @@ jobs:
9397
target: ${{ matrix.target }}
9498

9599
- name: Test release binary
96-
if: matrix.build != 'macos-m1' # Can't run M1 binary on Intel CPU
100+
if: matrix.build != 'macos-m1' && matrix.build != 'linux-arm64' # Can't run M1/arm64 binary on Intel CPU
97101
working-directory: agent
98102
run: cargo test --verbose --release --target ${{ matrix.target }}
99103

@@ -102,7 +106,7 @@ jobs:
102106
run: cargo build --verbose --release --target ${{ matrix.target }}
103107

104108
- name: Strip release binary (linux and macos)
105-
if: matrix.build == 'linux' || matrix.build == 'macos-intel' || matrix.build == 'macos-m1'
109+
if: matrix.build == 'linux' || matrix.build == 'linux-arm64' || matrix.build == 'macos-intel' || matrix.build == 'macos-m1'
106110
working-directory: agent
107111
run: strip "target/${{ matrix.target }}/release/bazelci-agent"
108112

agent/.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[target.aarch64-unknown-linux-musl]
2+
linker = "aarch64-linux-musl-gcc"

0 commit comments

Comments
 (0)