19
19
- name : Checkout
20
20
uses : actions/checkout@v3
21
21
22
- - name : Install all Rust targets
23
- run : rustup target install thumbv6m-none-eabi thumbv7m-none-eabi thumbv7em-none-eabihf
22
+ - name : Configure Rust target (v6, v7, v8.b v8.m)
23
+ run : |
24
+ rustup target add thumbv6m-none-eabi
25
+ rustup target add thumbv7m-none-eabi
26
+ rustup target add thumbv7em-none-eabihf
27
+ rustup target add thumbv8m.base-none-eabi
28
+ rustup target add thumbv8m.main-none-eabi
24
29
25
30
- name : cargo fmt --check
26
31
run : find . -type f -name Cargo.toml -execdir cargo fmt --check --manifest-path {} +
@@ -29,76 +34,124 @@ jobs:
29
34
check :
30
35
name : check
31
36
runs-on : ubuntu-22.04
37
+ strategy :
38
+ matrix :
39
+ rticversion :
40
+ - v0.5
41
+ - v1
42
+ - v2
32
43
steps :
33
44
- name : Checkout
34
45
uses : actions/checkout@v3
35
46
36
47
- name : Cache Dependencies
37
48
uses : Swatinem/rust-cache@v2
38
49
39
- - name : Install all Rust targets
40
- run : rustup target install thumbv6m-none-eabi thumbv7m-none-eabi thumbv7em-none-eabihf
50
+ - name : Install Rust nightly
51
+ run : |
52
+ rustup toolchain install nightly
53
+ rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
54
+
55
+ - name : Configure Rust target (v6, v7, v8.b v8.m)
56
+ run : |
57
+ rustup target add thumbv6m-none-eabi
58
+ rustup target add thumbv7m-none-eabi
59
+ rustup target add thumbv7em-none-eabihf
60
+ rustup target add thumbv8m.base-none-eabi
61
+ rustup target add thumbv8m.main-none-eabi
62
+
63
+ - name : Install flip-link
64
+ run : cargo install flip-link
41
65
42
66
- name : cargo check
43
- run : find . -type f -name Cargo.toml -execdir cargo check --target-dir /tmp/build --manifest-path {} +
67
+ if : ${{ matrix.rticversion != 'v2' }}
68
+ run : find rtic_${{ matrix.rticversion }} -type f -name Cargo.toml -execdir cargo build --release --manifest-path {} +
69
+
70
+ - name : cargo check
71
+ if : ${{ matrix.rticversion == 'v2' }}
72
+ run : find rtic_${{ matrix.rticversion }} -type f -name Cargo.toml -execdir cargo +nightly build --release --manifest-path {} +
44
73
45
74
# Clippy
46
75
clippy :
47
76
name : Cargo clippy
48
77
runs-on : ubuntu-22.04
78
+ strategy :
79
+ matrix :
80
+ rticversion :
81
+ - v0.5
82
+ - v1
83
+ - v2
84
+
49
85
steps :
50
86
- name : Checkout
51
87
uses : actions/checkout@v3
52
88
53
89
- name : Cache Dependencies
54
90
uses : Swatinem/rust-cache@v2
55
91
56
- - name : Install all Rust targets
57
- run : rustup target install thumbv6m-none-eabi thumbv7m-none-eabi thumbv7em-none-eabihf
58
-
59
- - name : cargo clippy
60
- run : find . -type f -name Cargo.toml -execdir cargo clippy --target-dir /tmp/build --manifest-path {} +
92
+ - name : Install Rust nightly
93
+ run : |
94
+ rustup toolchain install nightly
95
+ rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
96
+ rustup component add clippy --toolchain nightly-x86_64-unknown-linux-gnu
61
97
98
+ - name : Configure Rust target (v6, v7, v8.b v8.m)
99
+ run : |
100
+ rustup target add thumbv6m-none-eabi
101
+ rustup target add thumbv7m-none-eabi
102
+ rustup target add thumbv7em-none-eabihf
103
+ rustup target add thumbv8m.base-none-eabi
104
+ rustup target add thumbv8m.main-none-eabi
62
105
63
- # Compilation
64
- buildv0_5 :
65
- name : build v0.5
66
- runs-on : ubuntu-22.04
67
- steps :
68
- - name : Checkout
69
- uses : actions/checkout@v3
70
-
71
- - name : Cache Dependencies
72
- uses : Swatinem/rust-cache@v2
106
+ - name : cargo clippy
107
+ if : ${{ matrix.rticversion != 'v2' }}
108
+ run : find rtic_${{ matrix.rticversion }} -type f -name Cargo.toml -execdir cargo clippy --target-dir /tmp/build --manifest-path {} +
73
109
74
- - name : Install all Rust targets
75
- run : rustup target install thumbv6m-none-eabi thumbv7m-none-eabi thumbv7em-none-eabihf
76
-
77
- - name : Install flip-link
78
- run : cargo install flip-link
110
+ - name : cargo clippy
111
+ if : ${{ matrix.rticversion == 'v2' }}
112
+ run : find rtic_${{ matrix.rticversion }} -type f -name Cargo.toml -execdir cargo +nightly clippy --target-dir /tmp/build --manifest-path {} +
79
113
80
- - name : cargo build
81
- run : find rtic_v0.5 -type f -name Cargo.toml -execdir cargo build --release --manifest-path {} +
82
114
83
115
# Compilation
84
- buildv1 :
85
- name : build v1
116
+ build :
117
+ name : build
86
118
runs-on : ubuntu-22.04
119
+ strategy :
120
+ matrix :
121
+ rticversion :
122
+ - v0.5
123
+ - v1
124
+ - v2
87
125
steps :
88
126
- name : Checkout
89
127
uses : actions/checkout@v3
90
128
91
129
- name : Cache Dependencies
92
130
uses : Swatinem/rust-cache@v2
93
131
94
- - name : Install all Rust targets
95
- run : rustup target install thumbv6m-none-eabi thumbv7m-none-eabi thumbv7em-none-eabihf
132
+ - name : Install Rust nightly
133
+ run : |
134
+ rustup toolchain install nightly
135
+ rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
136
+
137
+ - name : Configure Rust target (v6, v7, v8.b v8.m)
138
+ run : |
139
+ rustup target add thumbv6m-none-eabi
140
+ rustup target add thumbv7m-none-eabi
141
+ rustup target add thumbv7em-none-eabihf
142
+ rustup target add thumbv8m.base-none-eabi
143
+ rustup target add thumbv8m.main-none-eabi
96
144
97
145
- name : Install flip-link
98
146
run : cargo install flip-link
99
147
100
148
- name : cargo build
101
- run : find rtic_v1 -type f -name Cargo.toml -execdir cargo build --release --manifest-path {} +
149
+ if : ${{ matrix.rticversion != 'v2' }}
150
+ run : find rtic_${{ matrix.rticversion }} -type f -name Cargo.toml -execdir cargo build --release --manifest-path {} +
151
+
152
+ - name : cargo build
153
+ if : ${{ matrix.rticversion == 'v2' }}
154
+ run : find rtic_${{ matrix.rticversion }} -type f -name Cargo.toml -execdir cargo +nightly build --release --manifest-path {} +
102
155
103
156
check-dependabot-config :
104
157
name : Ensure that `dependabot.yml` is up to date
@@ -122,8 +175,7 @@ jobs:
122
175
- style
123
176
- check
124
177
- clippy
125
- - buildv0_5
126
- - buildv1
178
+ - build
127
179
- check-dependabot-config
128
180
runs-on : ubuntu-22.04
129
181
steps :
0 commit comments