-
Notifications
You must be signed in to change notification settings - Fork 10
78 lines (65 loc) · 1.87 KB
/
build.yml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Build
on:
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 }}
components: rustfmt
- 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@stable
with:
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