Skip to content

Commit dfef5ee

Browse files
committed
Update CI for nrf-rs
- Test against multiple rust versions - Determine minimum supported rust version and test against that - Use cargo build --examples for examples The steps have been mostly lifted from nrf-rs/nrf52-dk. I've gone with using cargo directly rather than actions-rs/cargo as it's easier for people to copy for running locally.
1 parent 8dae48e commit dfef5ee

File tree

2 files changed

+14
-25
lines changed

2 files changed

+14
-25
lines changed

.github/scripts/build-examples.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/ci.yaml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,36 @@ jobs:
99
build:
1010
runs-on: ubuntu-latest
1111

12+
strategy:
13+
matrix:
14+
rust:
15+
- stable
16+
- beta
17+
- nightly
18+
- 1.51.0 # Minimum supported rust version (MSRV)
19+
1220
steps:
1321
- uses: actions/checkout@v2
1422

1523
- name: Install Rust
1624
uses: actions-rs/toolchain@v1
1725
with:
18-
toolchain: stable
1926
profile: minimal
20-
target: thumbv6m-none-eabi
27+
toolchain: ${{ matrix.rust }}
2128
override: true
29+
target: thumbv6m-none-eabi
2230
components: rustfmt, clippy
2331

2432
- name: rustfmt
2533
run: cargo fmt -- --check
2634

27-
- name: clippy
28-
run: cargo clippy --color=always -- -D warnings
29-
3035
- name: build
3136
run: cargo build --target=thumbv6m-none-eabi
3237

38+
- name: clippy
39+
run: cargo clippy --color=always -- -D warnings
40+
3341
- name: build examples
34-
run: .github/scripts/build-examples.sh
42+
run: cargo build --examples --target=thumbv6m-none-eabi
3543

3644

0 commit comments

Comments
 (0)