-
Notifications
You must be signed in to change notification settings - Fork 60
82 lines (80 loc) · 2.19 KB
/
ci.yaml
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
79
80
81
82
name: CI
on:
push:
branches:
- master
pull_request: {}
jobs:
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
target: thumbv6m-none-eabi
- uses: actions-rs/cargo@v1
with:
command: clippy
# dummy feature to satisfy build.rs
args: --features mcu-STM32L083VZTx -- -D warnings
package:
name: Cargo package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: thumbv6m-none-eabi
- uses: actions-rs/cargo@v1
with:
command: package
args: --no-verify
build_and_test:
strategy:
matrix:
channel: [stable, nightly]
features:
# STM32L0x1, TSSOP14 package, 512 bytes flash, product category 1
- rt mcu-STM32L011D3Px
# STM32L0x1, UFQFPN32 package, 1 KiB flash, product category 2
- rt mcu-STM32L031K6Ux
# STM32L0x2, LQFP32 package, 2 KiB flash, product category 3, enable usbd
- rt mcu-STM32L052K8Tx stm32-usbd
# STM32L0x3, TFBGA64 package, 6 KiB flash, product category 5, enable usbd
- rt mcu-STM32L073RBHx stm32-usbd
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: thumbv6m-none-eabi
- name: Examples
uses: actions-rs/cargo@v1
env:
RUSTFLAGS: "-D warnings"
with:
command: build
args: --release --examples --features "${{ matrix.features }}"