-
Notifications
You must be signed in to change notification settings - Fork 58
44 lines (42 loc) · 1.43 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Rust Hypervisor Firmware Build
on: [pull_request, merge_group]
env:
RUSTFLAGS: "-D warnings"
jobs:
build:
name: Build
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-none.json
tests: true
- target: aarch64-unknown-none.json
tests: false
- target: riscv64gcv-unknown-none-elf.json
tests: false
steps:
- name: Code checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install Rust components
run: rustup component add rust-src clippy rustfmt
- name: Build (debug)
run: cargo build --target ${{ matrix.target }} -Zbuild-std=core -Zbuild-std-features=compiler-builtins-mem
- name: Build (release)
run: cargo build --release --target ${{ matrix.target }} -Zbuild-std=core -Zbuild-std-features=compiler-builtins-mem
- name: Clippy (default)
run: cargo clippy --target ${{ matrix.target }} -Zbuild-std=core
- name: Clippy (all targets, all features)
run: cargo clippy --all-targets --all-features
- name: Formatting
run: cargo fmt --all -- --check
- if: ${{ matrix.tests }}
name: Unit tests
run: |
sudo apt-get install -y mtools
bash scripts/run_unit_tests.sh