Skip to content

Commit a5e1443

Browse files
NickeZemilio
authored andcommitted
Add aarch64/arm64 to CI
1 parent b9b8f88 commit a5e1443

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

.github/workflows/cbindgen.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,72 @@ jobs:
8888
run: |
8989
cargo +nightly update -Zminimal-versions
9090
cargo +nightly test
91+
92+
build-arm64:
93+
94+
runs-on: ubuntu-latest
95+
env:
96+
CARGO_BUILD_TARGET: aarch64-unknown-linux-gnu
97+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER: qemu-aarch64-static
98+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc-11
99+
100+
steps:
101+
- uses: actions/checkout@v3
102+
103+
- run: |
104+
sudo sed -i 's/^deb /deb [arch=amd64] /' /etc/apt/sources.list
105+
echo "deb [arch=arm64] http://ports.ubuntu.com/ jammy main multiverse universe" | sudo tee -a /etc/apt/sources.list
106+
echo "deb [arch=arm64] http://ports.ubuntu.com/ jammy-security main multiverse universe" | sudo tee -a /etc/apt/sources.list
107+
echo "deb [arch=arm64] http://ports.ubuntu.com/ jammy-backports main multiverse universe" | sudo tee -a /etc/apt/sources.list
108+
echo "deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates main multiverse universe" | sudo tee -a /etc/apt/sources.list
109+
110+
sudo dpkg --add-architecture arm64
111+
sudo apt-get update
112+
sudo apt-get install -y qemu-user-static gcc-11-aarch64-linux-gnu
113+
sudo apt-get install -y libc6:arm64
114+
115+
- name: Install stable Rust
116+
uses: dtolnay/rust-toolchain@stable
117+
with:
118+
targets: ${{env.CARGO_BUILD_TARGET}}
119+
120+
- name: Install Python
121+
uses: actions/setup-python@v4
122+
with:
123+
python-version: '3.8'
124+
125+
- name: Install Cython
126+
run: |
127+
python -m pip install --upgrade pip wheel
128+
pip install Cython==3.0.2
129+
130+
- name: Build
131+
run: |
132+
cargo +stable build --verbose
133+
134+
- name: Build no-default-features
135+
run: |
136+
cargo +stable build --verbose --no-default-features
137+
138+
- name: Test package
139+
env:
140+
CBINDGEN_TEST_VERIFY: 1
141+
run: |
142+
cargo +stable package --verbose
143+
(cd target/package/cbindgen-$(cargo +stable run -- --version | cut -d ' ' -f 2) && cargo +stable test --verbose)
144+
145+
- name: Install nightly Rust
146+
uses: dtolnay/rust-toolchain@nightly
147+
with:
148+
targets: ${{env.CARGO_BUILD_TARGET}}
149+
150+
- name: Test
151+
env:
152+
CBINDGEN_TEST_VERIFY: 1
153+
run: |
154+
cargo +nightly test --verbose
155+
156+
- name: Test minimal-versions
157+
run: |
158+
cargo +nightly update -Zminimal-versions
159+
cargo +nightly test

0 commit comments

Comments
 (0)