Skip to content

Commit 6dba01f

Browse files
committed
fix: use ubuntu-24.04 with native cross-gcc for aarch64 release
1 parent ef6d8a5 commit 6dba01f

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,13 @@ jobs:
1515
matrix:
1616
include:
1717
- target: x86_64-unknown-linux-gnu
18-
os: ubuntu-latest
19-
use_cross: false
18+
os: ubuntu-24.04
2019
- target: aarch64-unknown-linux-gnu
21-
os: ubuntu-latest
22-
use_cross: true
20+
os: ubuntu-24.04
2321
- target: x86_64-apple-darwin
2422
os: macos-latest
25-
use_cross: false
2623
- target: aarch64-apple-darwin
2724
os: macos-latest
28-
use_cross: false
2925

3026
runs-on: ${{ matrix.os }}
3127

@@ -37,16 +33,16 @@ jobs:
3733
with:
3834
targets: ${{ matrix.target }}
3935

40-
- name: Install cross
41-
if: matrix.use_cross
42-
run: cargo install cross --git https://github.com/cross-rs/cross
43-
44-
- name: Build (cross)
45-
if: matrix.use_cross
46-
run: cross build --release --target ${{ matrix.target }} -p ctxgraph-cli
36+
- name: Install aarch64 cross-compiler
37+
if: matrix.target == 'aarch64-unknown-linux-gnu'
38+
run: |
39+
sudo apt-get update
40+
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
41+
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
42+
echo "CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++" >> $GITHUB_ENV
43+
echo "CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
4744
48-
- name: Build (cargo)
49-
if: "!matrix.use_cross"
45+
- name: Build
5046
run: cargo build --release --target ${{ matrix.target }} -p ctxgraph-cli
5147

5248
- name: Package

0 commit comments

Comments
 (0)