Skip to content

Commit 330b518

Browse files
committed
Add linux aarch64 target to test and release
1 parent 187bcce commit 330b518

File tree

2 files changed

+21
-10
lines changed

2 files changed

+21
-10
lines changed

.github/workflows/bindgen.yml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,18 +95,24 @@ jobs:
9595
runs-on: ${{matrix.os}}
9696
strategy:
9797
matrix:
98-
os: [ubuntu-latest, macos-latest]
98+
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest]
9999
steps:
100100
- uses: actions/checkout@v4
101101

102102
- name: Test expectations
103103
run: cd bindgen-tests/tests/expectations && cargo test
104104

105105
test:
106-
runs-on: ${{matrix.os}}
106+
runs-on: ${{matrix.platform.os}}
107107
strategy:
108108
matrix:
109-
os: [ubuntu-latest]
109+
platform:
110+
- os: ubuntu-latest
111+
libtinfo: libtinfo5_6.3-2ubuntu0.1_amd64.deb
112+
ubuntu_repo: https://mirrors.kernel.org/ubuntu/pool/universe/n/ncurses/
113+
- os: ubuntu-24.04-arm
114+
libtinfo: libtinfo5_6.3-2ubuntu0.1_arm64.deb
115+
ubuntu_repo: https://ports.ubuntu.com/ubuntu-ports/pool/universe/n/ncurses/
110116
llvm_version: ["9.0", "16.0"]
111117
release_build: [0, 1]
112118
no_default_features: [0, 1]
@@ -118,14 +124,18 @@ jobs:
118124
include:
119125
# Test with extra asserts + docs just with latest llvm versions to
120126
# prevent explosion
121-
- os: ubuntu-latest
127+
- platform:
128+
os: ubuntu-latest
129+
libtinfo: libtinfo5_6.3-2ubuntu0.1_amd64.deb
130+
ubuntu_repo: https://mirrors.kernel.org/ubuntu/pool/universe/n/ncurses/
122131
llvm_version: "16.0"
123132
release_build: 0
124133
no_default_features: 0
125134
feature_extra_asserts: 1
126135

127136
# Ensure stuff works on macos too
128-
- os: macos-latest
137+
- platform:
138+
os: macos-latest
129139
llvm_version: "16.0"
130140
release_build: 0
131141
no_default_features: 0
@@ -138,22 +148,22 @@ jobs:
138148
with:
139149
toolchain: stable
140150
- name: Install libtinfo
141-
if: matrix.os == 'ubuntu-latest'
151+
if: startsWith(matrix.platform.os, 'ubuntu')
142152
run: |
143-
wget https://mirrors.kernel.org/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb
144-
sudo dpkg -i libtinfo5_6.3-2ubuntu0.1_amd64.deb
153+
wget ${{matrix.platform.ubuntu_repo}}${{matrix.platform.libtinfo}}
154+
sudo dpkg -i ${{matrix.platform.libtinfo}}
145155
- name: Install LLVM and Clang
146156
uses: KyleMayes/[email protected]
147157
with:
148158
version: ${{matrix.llvm_version}}
149159
- name: Run all the tests
150160
env:
151-
GITHUB_ACTIONS_OS: ${{matrix.os}}
161+
GITHUB_ACTIONS_OS: ${{matrix.platform.os}}
152162
BINDGEN_RELEASE_BUILD: ${{matrix.release_build}}
153163
BINDGEN_FEATURE_RUNTIME: ${{matrix.feature_runtime}}
154164
BINDGEN_FEATURE_EXTRA_ASSERTS: ${{matrix.feature_extra_asserts}}
155165
BINDGEN_NO_DEFAULT_FEATURES: ${{matrix.no_default_features}}
156-
BINDGEN_RUST_FOR_LINUX_TEST: ${{matrix.os == 'ubuntu-latest' && matrix.llvm_version == '16.0' && matrix.feature_extra_asserts == 0 && 1 || 0}}
166+
BINDGEN_RUST_FOR_LINUX_TEST: ${{startsWith(matrix.platform.os, 'ubuntu') && matrix.llvm_version == '16.0' && matrix.feature_extra_asserts == 0 && 1 || 0}}
157167
run: ./ci/test.sh
158168

159169
test-book:

dist-workspace.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ install-path = "CARGO_HOME"
2424
global = "ubuntu-22.04"
2525
aarch64-apple-darwin = "macos-14"
2626
x86_64-apple-darwin = "macos-13"
27+
aarch64-unknown-linux-gnu = "ubuntu-24.04-arm"

0 commit comments

Comments
 (0)