-
Notifications
You must be signed in to change notification settings - Fork 105
57 lines (53 loc) · 1.67 KB
/
ci.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
on:
push:
branches: master
pull_request:
merge_group:
name: Continuous integration
jobs:
ci:
name: CI
runs-on: ubuntu-latest
needs: [check]
if: always()
steps:
- name: Done
run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
check:
runs-on: ubuntu-latest
strategy:
matrix: # All permutations of {rust, mcu}
rust:
- 1.65.0 # MSRV
- stable
mcu:
- stm32h743
- stm32h753
- stm32h743v
- stm32h753v
- stm32h747cm7
- stm32h7b3
- stm32h7b0
- stm32h735
env: # Peripheral Feature flags
FLAGS: rt,xspi,sdmmc,sdmmc-fatfs,fmc,usb_hs,rtc,ethernet,ltdc,crc,rand,can,defmt
steps:
- uses: actions/checkout@v4
- name: Cache cargo registry and index
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
- name: Cache cargo build
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-target-${{ matrix.rust }}-${{ hashFiles('**/Cargo.toml') }}-memory-${{ hashFiles('**/memory.x') }}
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
targets: thumbv7em-none-eabihf
- run: cargo build --verbose --release --examples --target thumbv7em-none-eabihf --features ${{ matrix.mcu }},${{ env.FLAGS }}
- run: cargo test --lib --target x86_64-unknown-linux-gnu --features ${{ matrix.mcu }},${{ env.FLAGS }}