Add aarch64/arm64 to CI #800
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: cbindgen | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
merge_group: | |
types: | |
- checks_requested | |
jobs: | |
rustfmt-clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: "clippy, rustfmt" | |
- name: Run rustfmt | |
run: | | |
cargo +stable fmt --check | |
- name: Run clippy | |
run: | | |
cargo +stable clippy --workspace -- -D warnings | |
- name: Install minimum supported Rust version | |
id: msrv | |
uses: dtolnay/[email protected] | |
- name: Build with minimum supported Rust version | |
run: | | |
cargo +${{steps.msrv.outputs.name}} test nonexistent-test --verbose | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install stable Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Install Cython | |
run: | | |
python -m pip install --upgrade pip wheel | |
pip install Cython==3.0.2 | |
- name: Build | |
run: | | |
cargo +stable build --verbose | |
- name: Build no-default-features | |
run: | | |
cargo +stable build --verbose --no-default-features | |
- name: Test package | |
env: | |
CBINDGEN_TEST_VERIFY: 1 | |
run: | | |
cargo +stable package --verbose | |
(cd target/package/cbindgen-$(cargo +stable run -- --version | cut -d ' ' -f 2) && cargo +stable test --verbose) | |
- name: Install nightly Rust | |
uses: dtolnay/rust-toolchain@nightly | |
- name: Test | |
env: | |
CBINDGEN_TEST_VERIFY: 1 | |
run: | | |
cargo +nightly test --verbose | |
- name: Test minimal-versions | |
run: | | |
cargo +nightly update -Zminimal-versions | |
cargo +nightly test | |
build-arm64: | |
runs-on: ubuntu-latest | |
env: | |
CARGO_BUILD_TARGET: aarch64-unknown-linux-gnu | |
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER: qemu-aarch64-static | |
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc-11 | |
steps: | |
- uses: actions/checkout@v3 | |
- run: | | |
sudo sed -i 's/^deb /deb [arch=amd64] /' /etc/apt/sources.list | |
echo "deb [arch=arm64] http://ports.ubuntu.com/ jammy main multiverse universe" | sudo tee -a /etc/apt/sources.list | |
echo "deb [arch=arm64] http://ports.ubuntu.com/ jammy-security main multiverse universe" | sudo tee -a /etc/apt/sources.list | |
echo "deb [arch=arm64] http://ports.ubuntu.com/ jammy-backports main multiverse universe" | sudo tee -a /etc/apt/sources.list | |
echo "deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates main multiverse universe" | sudo tee -a /etc/apt/sources.list | |
sudo dpkg --add-architecture arm64 | |
sudo apt-get update | |
sudo apt-get install -y qemu-user-static gcc-11-aarch64-linux-gnu | |
sudo apt-get install -y libc6:arm64 | |
- name: Install stable Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{env.CARGO_BUILD_TARGET}} | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Install Cython | |
run: | | |
python -m pip install --upgrade pip wheel | |
pip install Cython==3.0.2 | |
- name: Build | |
run: | | |
cargo +stable build --verbose | |
- name: Build no-default-features | |
run: | | |
cargo +stable build --verbose --no-default-features | |
- name: Test package | |
env: | |
CBINDGEN_TEST_VERIFY: 1 | |
run: | | |
cargo +stable package --verbose | |
(cd target/package/cbindgen-$(cargo +stable run -- --version | cut -d ' ' -f 2) && cargo +stable test --verbose) | |
- name: Install nightly Rust | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
targets: ${{env.CARGO_BUILD_TARGET}} | |
- name: Test | |
env: | |
CBINDGEN_TEST_VERIFY: 1 | |
run: | | |
cargo +nightly test --verbose | |
- name: Test minimal-versions | |
run: | | |
cargo +nightly update -Zminimal-versions | |
cargo +nightly test |