-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (41 loc) · 1.44 KB
/
nightly.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
on:
push:
branches: [ master ] # Do not run on staging / trying
pull_request:
# Checks the crate compiles on nightly rust, and that the logging options for the
# examples compile on nightly
name: Nightly rust examples
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
mcu:
- stm32h503
- stm32h562
- stm32h563
- stm32h573
env: # Peripheral Feature flags
FLAGS: rt,log
steps:
- uses: actions/checkout@v4
- name: Cache cargo registry and index
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
- name: Cache cargo build
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-target-nightly-${{ hashFiles('**/Cargo.toml') }}-memory-${{ hashFiles('**/*.x') }}
- name: Install nightly toolchain
run: rustup toolchain install nightly
- name: Install thumbv8m rust target
run: rustup +nightly target add thumbv8m.main-none-eabihf
- name: Build
run: cargo +nightly build --verbose --release --examples --target thumbv8m.main-none-eabihf --features ${{ matrix.mcu }},${{ env.FLAGS }}
- name: Test
run: cargo +nightly test --lib --target x86_64-unknown-linux-gnu --features ${{ matrix.mcu }},${{ env.FLAGS }}