1 #3
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: CI | |
on: [push] | |
jobs: | |
clippy: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
rust-toolchain: [nightly] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ matrix.rust-toolchain }} | |
components: rust-src, clippy, rustfmt | |
targets: x86_64-unknown-none, riscv64gc-unknown-none-elf, aarch64-unknown-none | |
- name: Check rust version | |
run: rustc --version --verbose | |
- name: Clippy for the default target | |
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }} | |
run: make clippy | |
- name: Clippy for x86_64 | |
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }} | |
run: make clippy ARCH=x86_64 | |
- name: Clippy for riscv64 | |
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }} | |
run: make clippy ARCH=riscv64 | |
- name: Clippy for aarch64 | |
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }} | |
run: make clippy ARCH=aarch64 | |
- name: Check code format | |
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }} | |
run: cargo fmt --all -- --check | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [x86_64, riscv64, aarch64] | |
rust-toolchain: [nightly] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ matrix.rust-toolchain }} | |
components: rust-src, llvm-tools | |
targets: x86_64-unknown-none, riscv64gc-unknown-none-elf, aarch64-unknown-none | |
- uses: Swatinem/rust-cache@v2 | |
- name: Build for ${{ matrix.arch }} | |
run: make build ARCH=${{ matrix.arch }} |