Skip to content

Commit ac7e42b

Browse files
committed
Add linux aarch64 target to test and release
1 parent 763c8b9 commit ac7e42b

File tree

3 files changed

+26
-15
lines changed

3 files changed

+26
-15
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:

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ on:
4747
jobs:
4848
# Run 'cargo dist plan' (or host) to determine what tasks we need to do
4949
plan:
50-
runs-on: "ubuntu-20.04"
50+
runs-on: "ubuntu-24.04"
5151
outputs:
5252
val: ${{ steps.plan.outputs.manifest }}
5353
tag: ${{ !github.event.pull_request && github.ref_name || '' }}
@@ -160,7 +160,7 @@ jobs:
160160
needs:
161161
- plan
162162
- build-local-artifacts
163-
runs-on: "ubuntu-20.04"
163+
runs-on: "ubuntu-24.04"
164164
env:
165165
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
166166
BUILD_MANIFEST_NAME: target/distrib/global-dist-manifest.json
@@ -210,7 +210,7 @@ jobs:
210210
if: ${{ always() && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }}
211211
env:
212212
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
213-
runs-on: "ubuntu-20.04"
213+
runs-on: "ubuntu-24.04"
214214
outputs:
215215
val: ${{ steps.host.outputs.manifest }}
216216
steps:
@@ -274,7 +274,7 @@ jobs:
274274
# still allowing individual publish jobs to skip themselves (for prereleases).
275275
# "host" however must run to completion, no skipping allowed!
276276
if: ${{ always() && needs.host.result == 'success' }}
277-
runs-on: "ubuntu-20.04"
277+
runs-on: "ubuntu-24.04"
278278
env:
279279
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
280280
steps:

dist-workspace.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ci = "github"
1010
# The installers to generate for each app
1111
installers = ["shell"]
1212
# Target platforms to build apps for (Rust target-triple syntax)
13-
targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu"]
13+
targets = ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu"]
1414
# Whether to consider the binaries in a package for distribution (defaults true)
1515
dist = false
1616
# Which actions to run on pull requests
@@ -23,3 +23,4 @@ install-path = "CARGO_HOME"
2323
[dist.github-custom-runners]
2424
aarch64-apple-darwin = "macos-14"
2525
x86_64-apple-darwin = "macos-13"
26+
aarch64-unknown-linux-gnu = "ubuntu-24.04-arm"

0 commit comments

Comments
 (0)