5
5
name : Build rp2040-hal's features
6
6
runs-on : ubuntu-20.04
7
7
steps :
8
- - uses : actions/checkout@v3
8
+ - uses : actions/checkout@v4
9
9
- uses : dtolnay/rust-toolchain@stable
10
10
with :
11
11
target : thumbv6m-none-eabi
12
12
- name : Install cargo-hack
13
13
run : |
14
14
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
15
- - name : Build rp2040-hal's workspace (without the examples)
16
- run : cargo hack build --optional-deps --each-feature
17
- - run : cargo clean
18
- - name : Build rp2040-hal's workspace (with the examples)
19
- run : cargo hack build --examples --optional-deps --each-feature
15
+ - name : Build rp2040-hal
16
+ run : cd rp2040-hal && cargo hack build --optional-deps --each-feature --target=thumbv6m-none-eabi
17
+ - name : Build rp2040-hal-macros
18
+ run : cd rp2040-hal-macros && cargo hack build --optional-deps --each-feature
19
+ - name : Build on-target-tests
20
+ run : cd on-target-tests && cargo hack build --optional-deps --each-feature
21
+ - name : Build rp2040-hal-examples
22
+ run : cd rp2040-hal-examples && cargo hack build --optional-deps --each-feature
23
+ - name : Build rp-binary-info
24
+ run : cd rp-binary-info && cargo hack build --optional-deps --each-feature
20
25
tests :
21
26
name : Execute host-runable tests
22
27
runs-on : ubuntu-20.04
23
28
steps :
24
- - uses : actions/checkout@v3
29
+ - uses : actions/checkout@v4
25
30
- uses : dtolnay/rust-toolchain@stable
26
31
with :
27
32
target : thumbv6m-none-eabi
28
33
- name : Install cargo-hack
29
34
run : |
30
35
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
31
- - name : Test
32
- run : cargo hack test -p rp2040-hal --target x86_64-unknown-linux-gnu --optional-deps --each-feature --tests --features critical-section-impl
33
- - name : Test docs
34
- run : cargo hack test -p rp2040-hal --target x86_64-unknown-linux-gnu --optional-deps --each-feature --doc --features critical-section-impl
35
- - name : Test macros
36
- run : cargo hack test -p rp2040-hal-macros --target x86_64-unknown-linux-gnu --optional-deps --tests --each-feature
37
- - name : Test macro docs
38
- run : cargo hack test -p rp2040-hal-macros --target x86_64-unknown-linux-gnu --optional-deps --doc --each-feature
39
- - name : Clean
40
- run : cargo clean
36
+ - name : Test rp2040-hal
37
+ run : cd rp2040-hal && cargo hack test --optional-deps --each-feature --tests --features critical-section-impl
38
+ - name : Test rp2040-hal docs
39
+ run : cd rp2040-hal && cargo hack test --optional-deps --each-feature --doc --features critical-section-impl
40
+ - name : Test rp2040-hal-macros
41
+ run : cd rp2040-hal-macros && cargo hack test --optional-deps --tests --each-feature
42
+ - name : Test rp2040-hal-macros docs
43
+ run : cd rp2040-hal-macros && cargo hack test --optional-deps --doc --each-feature
44
+ - name : Test rp-binary-info
45
+ run : cd rp-binary-info && cargo hack test --optional-deps --each-feature --tests
46
+ - name : Test rp-binary-info docs
47
+ run : cd rp-binary-info && cargo hack test --optional-deps --each-feature --doc
41
48
udeps :
42
49
name : Check rp2040-hal for unused dependencies
43
50
runs-on : ubuntu-20.04
44
51
steps :
45
- - uses : actions/checkout@v3
52
+ - uses : actions/checkout@v4
46
53
- uses : dtolnay/rust-toolchain@master
47
54
with :
48
55
toolchain : nightly-2024-01-30
@@ -53,13 +60,21 @@ jobs:
53
60
- name : Install cargo-udeps
54
61
run : |
55
62
curl -sSL https://github.com/est31/cargo-udeps/releases/download/v0.1.45/cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - --strip-components=2 -C ~/.cargo/bin ./cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu/cargo-udeps
56
- - name : Check unused deps
57
- run : cargo hack udeps --optional-deps --each-feature
63
+ - name : Check unused deps in rp2040-hal
64
+ run : cd rp2040-hal && cargo hack udeps --optional-deps --each-feature --target=thumbv6m-none-eabi
65
+ - name : Check unused deps in rp2040-hal-macros
66
+ run : cd rp2040-hal-macros && cargo hack udeps --optional-deps --each-feature
67
+ - name : Check unused deps in rp2040-hal-examples
68
+ run : cd rp2040-hal-examples && cargo hack udeps --optional-deps --each-feature
69
+ - name : Check unused deps in on-target-tests
70
+ run : cd on-target-tests && cargo hack udeps --optional-deps --each-feature
71
+ - name : Check unused deps in rp-binary-info
72
+ run : cd rp-binary-info && cargo hack udeps --optional-deps --each-feature
58
73
msrv :
59
74
name : Verify build on MSRV
60
75
runs-on : ubuntu-20.04
61
76
steps :
62
- - uses : actions/checkout@v3
77
+ - uses : actions/checkout@v4
63
78
- uses : dtolnay/rust-toolchain@master
64
79
with :
65
80
toolchain : 1.77
68
83
run : |
69
84
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
70
85
- name : Use older version of regex
71
- run : cargo update -p regex --precise 1.9.3
72
- - name : Verify MSRV
73
- run : cargo hack build --examples --optional-deps --each-feature
86
+ run : cd rp2040-hal-examples && cargo update -p regex --precise 1.9.3
87
+ - name : Build rp2040-hal (on MSRV)
88
+ run : cd rp2040-hal && cargo hack build --optional-deps --each-feature --target=thumbv6m-none-eabi
89
+ - name : Build rp2040-hal-macros (on MSRV)
90
+ run : cd rp2040-hal-macros && cargo hack build --optional-deps --each-feature
91
+ - name : Build on-target-tests (on MSRV)
92
+ run : cd on-target-tests && cargo hack build --optional-deps --each-feature
93
+ - name : Build rp2040-hal-examples (on MSRV)
94
+ run : cd rp2040-hal-examples && cargo hack build --optional-deps --each-feature
95
+ - name : Build rp-binary-info (on MSRV)
96
+ run : cd rp-binary-info && cargo hack build --optional-deps --each-feature
0 commit comments