Skip to content

Build

Build #344

Workflow file for this run

name: Build
on:
merge_group:
workflow_dispatch:
pull_request:
push:
branches:
- master
schedule:
- cron: "0 5 * * *"
jobs:
build:
name: Build Library
runs-on: ubuntu-latest
env: {"RUSTFLAGS": "-D warnings"}
strategy:
matrix:
target:
- "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@v4
- name: cargo build
run: cargo build --target ${{ matrix.target }}
format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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:
- "aarch64-unknown-none-softfloat"
- "riscv64gc-unknown-none-elf"
steps:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
target: ${{ matrix.target }}
components: llvm-tools-preview
- name: Check out repository
uses: actions/checkout@v4
- name: Install QEMU
run: |
sudo apt update
sudo apt install qemu-system
- 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