Run aarch32 test in CI #527
Workflow file for this run
This file contains hidden or 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: Build | |
on: | |
merge_group: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "0 5 * * *" | |
jobs: | |
build: | |
name: Build Library | |
runs-on: ubuntu-latest | |
env: { "RUSTFLAGS": "-D warnings" } | |
strategy: | |
matrix: | |
target: | |
- "thumbv7em-none-eabi" | |
- "aarch64-unknown-none-softfloat" | |
- "riscv64gc-unknown-none-elf" | |
- "x86_64-unknown-linux-gnu" | |
steps: | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
target: ${{ matrix.target }} | |
- uses: actions/checkout@v5 | |
- name: cargo build | |
run: cargo build --target ${{ matrix.target }} | |
format: | |
name: Format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
components: rustfmt | |
- run: cargo fmt --all -- --check | |
test: | |
name: Test QEMU Exit | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: | |
- "thumbv7em-none-eabi" | |
- "aarch64-unknown-none-softfloat" | |
- "riscv64gc-unknown-none-elf" | |
steps: | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
target: ${{ matrix.target }} | |
components: llvm-tools | |
- name: Check out repository | |
uses: actions/checkout@v5 | |
- name: Install QEMU | |
run: | | |
sudo apt update | |
sudo apt install --no-install-recommends qemu-system | |
- name: Run tests AARCH32 | |
if: matrix.target == 'thumbv7em-none-eabi' | |
run: | | |
RUSTFLAGS="-D warnings -C link-arg=-Ttests/armv7m_mps2an500/link.ld" cargo test --target ${{ matrix.target }} --release | |
- name: Run tests AARCH64 | |
if: matrix.target == 'aarch64-unknown-none-softfloat' | |
run: | | |
RUSTFLAGS="-D warnings -C link-arg=-Ttests/aarch64_raspi3/link.ld" cargo test --target ${{ matrix.target }} --release | |
- name: Run tests RISCV64 | |
if: matrix.target == 'riscv64gc-unknown-none-elf' | |
run: | | |
RUSTFLAGS="-D warnings -C link-arg=-Ttests/riscv64_virt/link.ld" cargo test --target ${{ matrix.target }} --release |