-
Notifications
You must be signed in to change notification settings - Fork 3
82 lines (76 loc) · 2.42 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
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: test suite
on: [push, pull_request]
jobs:
sync-readme:
name: check that README.md files are synced
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: diff README.md micropb/README.md
check-and-test:
name: check and test workspace with ${{matrix.toolchain}}
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- 1.74.0
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.toolchain}}
components: clippy
- uses: arduino/setup-protoc@v3
- run: cargo clippy --workspace --tests --no-default-features --exclude arm-app -- -Dwarnings
- run: cargo clippy --workspace --tests --all-features --exclude arm-app -- -Dwarnings
- run: cargo test --workspace --exclude arm-app
build:
name: build workspace with ${{matrix.toolchain}}
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- 1.74.0
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.toolchain}}
- uses: arduino/setup-protoc@v3
- run: cargo build --workspace --exclude no-panicking --exclude arm-app
- run: cargo build -p no-panicking --profile release-lto
build-arm-app:
name: build arm-app with ${{matrix.toolchain}}
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- 1.74.0
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.toolchain}}
target: thumbv7em-none-eabihf
- uses: arduino/setup-protoc@v3
- run: cd examples/arm-app && cargo build --profile release-lto --target thumbv7em-none-eabihf
miri:
name: miri testing on unsafe code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: miri
- uses: arduino/setup-protoc@v3
- run: MIRIFLAGS=-"Zmiri-tree-borrows" cargo +nightly miri test -p micropb -p basic-proto
documentation:
name: document released packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: RUSTDOCFLAGS="-D warnings" cargo doc -p micropb -p micropb-gen