-
Notifications
You must be signed in to change notification settings - Fork 241
83 lines (83 loc) · 2.92 KB
/
build_and_test.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
83
on: [push, pull_request]
name: Build and Test check
jobs:
rp2040-hal-builds:
name: Build rp2040-hal's features
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
target: thumbv6m-none-eabi
- name: Install cargo-hack
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-hack
version: "=0.6.17"
- name: Build rp2040-hal's workspace (without the examples)
run: cargo hack build --optional-deps --each-feature
- run: cargo clean
- name: Build rp2040-hal's workspace (with the examples)
run: cargo hack build --examples --optional-deps --each-feature
tests:
name: Execute host-runable tests
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
target: thumbv6m-none-eabi
- name: Install cargo-hack
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-hack
version: "=0.6.17"
- name: Test
run: cargo hack test -p rp2040-hal --target x86_64-unknown-linux-gnu --optional-deps --each-feature --tests --features critical-section-impl
- name: Test docs
run: cargo hack test -p rp2040-hal --target x86_64-unknown-linux-gnu --optional-deps --each-feature --doc --features critical-section-impl
- name: Test macros
run: cargo hack test -p rp2040-hal-macros --target x86_64-unknown-linux-gnu --optional-deps --tests --each-feature
- name: Test macro docs
run: cargo hack test -p rp2040-hal-macros --target x86_64-unknown-linux-gnu --optional-deps --doc --each-feature
- name: Clean
run: cargo clean
udeps:
name: Check rp2040-hal for unused dependencies
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-01-30
target: thumbv6m-none-eabi
- name: Install cargo-hack
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-hack
version: "=0.6.17"
- name: Install cargo-udeps
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-udeps
version: "=0.1.45"
- name: Check unused deps
run: cargo hack udeps --optional-deps --each-feature
msrv:
name: Verifiy build on MSRV
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.75
target: thumbv6m-none-eabi
- name: Install cargo-hack
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-hack
version: "=0.6.17"
- name: Use older version of regex
run: cargo update -p regex --precise 1.9.3
- name: Verifiy MSRV
run: cargo hack build --examples --optional-deps --each-feature