44 pull_request :
55 merge_group :
66
7- name : Run macro tests (tests )
7+ name : Run tests (build and trybuild )
88
99jobs :
10- run-tests :
10+ run-trybuild :
1111 strategy :
1212 matrix :
1313 os : [ macos-latest, ubuntu-latest ] # windows shows weird linking errors
@@ -16,12 +16,62 @@ jobs:
1616 - uses : actions/checkout@v4
1717 - uses : dtolnay/rust-toolchain@stable
1818 - name : Run tests
19- run : cargo test --package tests
19+ run : cargo test --package tests-trybuild
20+ run-build :
21+ strategy :
22+ matrix :
23+ # All generated code should be running on stable now, MRSV is 1.61.0
24+ toolchain : [ stable, nightly, 1.61.0 ]
25+ target :
26+ - riscv32i-unknown-none-elf
27+ - riscv32im-unknown-none-elf
28+ - riscv32imc-unknown-none-elf
29+ - riscv32imac-unknown-none-elf
30+ - riscv32imafc-unknown-none-elf
31+ - riscv64imac-unknown-none-elf
32+ - riscv64gc-unknown-none-elf
33+ example :
34+ - empty
35+ include :
36+ # Nightly is only for reference and allowed to fail
37+ - toolchain : nightly
38+ experimental : true
39+ exclude :
40+ - toolchain : 1.61.0
41+ target : riscv32im-unknown-none-elf
42+ - toolchain : 1.61.0
43+ target : riscv32imafc-unknown-none-elf
44+ runs-on : ubuntu-latest
45+ continue-on-error : ${{ matrix.experimental || false }}
46+ steps :
47+ - uses : actions/checkout@v4
48+ - uses : dtolnay/rust-toolchain@master
49+ with :
50+ toolchain : ${{ matrix.toolchain }}
51+ targets : ${{ matrix.target }}
52+ - name : Build (no features)
53+ run : RUSTFLAGS="-C link-arg=-Tdevice.x -C link-arg=-Tmemory.x -C link-arg=-Tlink.x" cargo build --package tests-build --target ${{ matrix.target }} --example ${{ matrix.example }}
54+ - name : Build (include device.x)
55+ run : RUSTFLAGS="-C link-arg=-Tmemory.x -C link-arg=-Tlink.x" cargo build --package tests-build --target ${{ matrix.target }} --example ${{ matrix.example }} --features device
56+ - name : Build (include memory.x)
57+ run : RUSTFLAGS="-C link-arg=-Tdevice.x -C link-arg=-Tlink.x" cargo build --package tests-build --target ${{ matrix.target }} --example ${{ matrix.example }} --features memory
58+ - name : Build (include device.x and memory.x)
59+ run : RUSTFLAGS="-C link-arg=-Tlink.x" cargo build --package tests-build --target ${{ matrix.target }} --example ${{ matrix.example }} --features device,memory
60+
61+ - name : Build (custom interrupts and exceptions)
62+ run : RUSTFLAGS="-C link-arg=-Tdevice.x -C link-arg=-Tmemory.x -C link-arg=-Tlink.x" cargo build --package tests-build --target ${{ matrix.target }} --example ${{ matrix.example }} --features no-interrupts,no-exceptions
63+ - name : Build (custom interrupts and exceptions, include device.x)
64+ run : RUSTFLAGS="-C link-arg=-Tmemory.x -C link-arg=-Tlink.x" cargo build --package tests-build --target ${{ matrix.target }} --example ${{ matrix.example }} --features no-interrupts,no-exceptions,device
65+ - name : Build (custom interrupts and exceptions, include memory.x)
66+ run : RUSTFLAGS="-C link-arg=-Tdevice.x -C link-arg=-Tlink.x" cargo build --package tests-build --target ${{ matrix.target }} --example ${{ matrix.example }} --features no-interrupts,no-exceptions,memory
67+ - name : Build (custom interrupts and exceptions, include device.x and memory.x)
68+ run : RUSTFLAGS="-C link-arg=-Tlink.x" cargo build --package tests-build --target ${{ matrix.target }} --example ${{ matrix.example }} --features no-interrupts,no-exceptions,device,memory
2069
2170 # Job to check that all the builds succeeded
2271 tests-check :
2372 needs :
24- - run-tests
73+ - run-trybuild
74+ - run-build
2575 runs-on : ubuntu-latest
2676 if : always()
2777 steps :
0 commit comments