55name : Build
66
77jobs :
8- # Define Rust versions dynamically. Test stable and MSRV.
9- setup :
10- runs-on : ubuntu-latest
11- outputs :
12- rust-versions : ${{ steps.set-matrix.outputs.rust_versions }}
13- stable-targets : ${{ steps.set-matrix.outputs.stable_targets }}
14- steps :
15- - id : set-matrix
16- run : |
17- echo 'rust_versions=["stable", "1.83"]' >> "$GITHUB_OUTPUT"
18- echo 'stable_targets=["armv7a-none-eabi","armv7a-none-eabihf","armv7r-none-eabi","armv7r-none-eabihf","armv8r-none-eabihf"]' >> "$GITHUB_OUTPUT"
19-
20- # Build the workspace for a target architecture
21- build-tier2 :
8+ # Build the workspace for a target architecture using the MSRV
9+ build-tier2-msrv :
2210 runs-on : ubuntu-24.04
23- needs : setup
2411 strategy :
2512 matrix :
26- rust : ${{ fromJSON(needs.setup.outputs.rust-versions) }}
27- target : ${{ fromJSON(needs.setup.outputs.stable-targets) }}
28- exclude :
29- - rust : 1.83
30- target : armv7a-none-eabihf
31- - rust : 1.83
32- target : armv8r-none-eabihf
13+ target :
14+ - armv7a-none-eabi
15+ - armv7r-none-eabi
16+ - armv7r-none-eabihf
3317 steps :
3418 - name : Checkout
3519 uses : actions/checkout@v7
3620 - name : Install Just
3721 uses : taiki-e/install-action@just
3822 - name : Install Rust
3923 run : |
40- rustup install ${{ matrix.rust }}
41- rustup default ${{ matrix.rust }}
42- rustup target add ${{ matrix.target }}
24+ rustup install 1.83
25+ rustup target add ${{ matrix.target }} --toolchain=1.83
4326 - name : Build
4427 run : |
45- just build-tier2 ${{ matrix.target }}
28+ RUSTUP_TOOLCHAIN=1.83 just build-tier2 ${{ matrix.target }}
4629
47- build-tier2-nightly :
30+ # Build the workspace for a target architecture using latest stable
31+ build-tier2-stable :
4832 runs-on : ubuntu-24.04
49- needs : setup
5033 strategy :
5134 matrix :
5235 target :
53- # These targets made Tier 2 on 2026-06-04
54- # They'll move to build-tier2 once they reach stable
55- - thumbv7r-none-eabi
56- - thumbv7r-none-eabihf
57- - thumbv7a-none-eabi
58- - thumbv7a-none-eabihf
59- - thumbv8r-none-eabihf
36+ - armv7a-none-eabi
37+ - armv7a-none-eabihf
38+ - armv7r-none-eabi
39+ - armv7r-none-eabihf
40+ - armv8r-none-eabihf
6041 steps :
6142 - name : Checkout
6243 uses : actions/checkout@v7
6344 - name : Install Just
6445 uses : taiki-e/install-action@just
6546 - name : Install Rust
6647 run : |
67- rustup install nightly-2026-06-04
68- rustup default nightly-2026-06-04
69- rustup target add ${{ matrix.target }}
48+ rustup install stable
49+ rustup target add ${{ matrix.target }} --toolchain=stable
7050 - name : Build
7151 run : |
72- just build-tier2 ${{ matrix.target }}
52+ RUSTUP_TOOLCHAIN=stable just build-tier2 ${{ matrix.target }}
7353
74- # These targets need build-std, and have no atomics so we have to skip
75- # the 'critical-section-multi-core' feature
76- build-tier3-no-atomics :
54+ # Build the workspace for all target architectures using rust-toolchain.toml
55+ build-nightly :
7756 runs-on : ubuntu-24.04
78- needs : setup
79- strategy :
80- matrix :
81- target :
82- - armv4t-none-eabi
83- - thumbv4t-none-eabi
84- - armv5te-none-eabi
85- - thumbv5te-none-eabi
8657 steps :
8758 - name : Checkout
8859 uses : actions/checkout@v7
8960 - name : Install Just
9061 uses : taiki-e/install-action@just
91- - name : Install Rust
92- run : |
93- rustup install stable
94- rustup default stable
95- rustup component add rust-src
9662 - name : Build
9763 run : |
98- just build-tier3-no-atomics ${{ matrix.target }}
64+ just build-all
9965
100- # Build the host-only stuff
66+ # Build the host-only stuff on stable and MSRV
10167 build-arm-targets :
10268 runs-on : ubuntu-24.04
103- needs : setup
10469 strategy :
10570 matrix :
106- rust : ${{ fromJSON(needs.setup.outputs.rust-versions) }}
71+ rust :
72+ - 1.83
73+ - stable
10774 steps :
10875 - name : Checkout
10976 uses : actions/checkout@v7
@@ -112,67 +79,59 @@ jobs:
11279 - name : Install Rust
11380 run : |
11481 rustup install ${{ matrix.rust }}
115- rustup default ${{ matrix.rust }}
11682 - name : Build
11783 run : |
118- just build-arm-targets
84+ RUSTUP_TOOLCHAIN=${{ matrix.rust }} just build-arm-targets
11985
12086 # Gather all the above build jobs together for the purposes of getting an overall pass-fail
12187 build-all :
12288 runs-on : ubuntu-24.04
123- needs : [build-tier2, build-tier3-no-atomics, build-tier2-nightly, build-arm-targets]
89+ needs :
90+ - build-tier2-msrv
91+ - build-tier2-stable
92+ - build-nightly
93+ - build-arm-targets
12494 steps :
12595 - run : /bin/true
12696
127- # Build the docs for the workspace
97+ # Build the docs for the workspace on nightly
12898 docs :
12999 runs-on : ubuntu-24.04
130- needs : setup
131- strategy :
132- matrix :
133- rust : ${{ fromJSON(needs.setup.outputs.rust-versions) }}
134- target : ${{ fromJSON(needs.setup.outputs.stable-targets) }}
135- exclude :
136- - rust : 1.83
137- target : armv7a-none-eabihf
138- - rust : 1.83
139- target : armv8r-none-eabihf
140100 steps :
141101 - name : Checkout
142102 uses : actions/checkout@v7
143- - name : Install Rust
144- run : |
145- rustup install ${{ matrix.rust }}
146- rustup default ${{ matrix.rust }}
147- rustup target add ${{ matrix.target }}
103+ - name : Install Just
104+ uses : taiki-e/install-action@just
148105 - name : Build docs
149106 run : |
150- cargo doc --target ${{ matrix.target }}
151- cargo doc --target ${{ matrix.target }} --all-features
107+ just doc-all
152108
153109 # Build the docs for the host tools
154110 docs-host :
155111 runs-on : ubuntu-24.04
156- needs : setup
157112 strategy :
158113 matrix :
159- rust : ${{ fromJSON(needs.setup.outputs.rust-versions) }}
114+ rust :
115+ - 1.83
116+ - stable
160117 steps :
161118 - name : Checkout
162119 uses : actions/checkout@v7
120+ - name : Install Just
121+ uses : taiki-e/install-action@just
163122 - name : Install Rust
164123 run : |
165124 rustup install ${{ matrix.rust }}
166- rustup default ${{ matrix.rust }}
167125 - name : Build docs
168126 run : |
169- cd arm-targets
170- cargo doc
127+ RUSTUP_TOOLCHAIN=${{ matrix.rust }} just doc-arm-targets
171128
172129 # Gather all the above doc jobs together for the purposes of getting an overall pass-fail
173130 docs-all :
174131 runs-on : ubuntu-24.04
175- needs : [docs, docs-host]
132+ needs :
133+ - docs
134+ - docs-host
176135 steps :
177136 - run : /bin/true
178137
@@ -184,41 +143,25 @@ jobs:
184143 uses : actions/checkout@v7
185144 - name : Install Just
186145 uses : taiki-e/install-action@just
187- - name : Install Rust
188- run : |
189- rustup install stable
190- rustup default stable
191- rustup component add rustfmt
192146 - name : Format
193147 run : |
194148 just fmt-check
195149
196150 # Run clippy on the workpace
197151 clippy :
198152 runs-on : ubuntu-24.04
199- needs : setup
200- strategy :
201- matrix :
202- target : ${{ fromJSON(needs.setup.outputs.stable-targets) }}
203153 steps :
204154 - name : Checkout
205155 uses : actions/checkout@v7
206156 - name : Install Just
207157 uses : taiki-e/install-action@just
208- - name : Install Rust
209- run : |
210- rustup toolchain install 1.92
211- rustup default 1.92
212- rustup target add ${{ matrix.target }}
213- rustup component add clippy
214158 - name : Clippy
215159 run : |
216- just clippy-target ${{ matrix.target }}
160+ just clippy-targets
217161
218162 # Run clippy on the examples
219163 clippy-examples :
220164 runs-on : ubuntu-24.04
221- needs : setup
222165 steps :
223166 - name : Checkout
224167 uses : actions/checkout@v7
@@ -228,31 +171,18 @@ jobs:
228171 run : |
229172 sudo apt-get update
230173 sudo apt-get install -y gcc-arm-none-eabi libclang1
231- - name : Install Rust
232- run : |
233- rustup toolchain install 1.92
234- rustup default 1.92
235- rustup target add armv7r-none-eabihf
236- rustup target add armv8r-none-eabihf
237- rustup component add clippy
238174 - name : Clippy
239175 run : |
240176 just clippy-examples
241177
242178 # Run clippy on the host tools
243179 clippy-host :
244180 runs-on : ubuntu-24.04
245- needs : setup
246181 steps :
247182 - name : Checkout
248183 uses : actions/checkout@v7
249184 - name : Install Just
250185 uses : taiki-e/install-action@just
251- - name : Install Rust
252- run : |
253- rustup toolchain install 1.92
254- rustup default 1.92
255- rustup component add clippy
256186 - name : Clippy
257187 run : |
258188 just clippy-host
@@ -272,10 +202,6 @@ jobs:
272202 uses : actions/checkout@v7
273203 - name : Install Just
274204 uses : taiki-e/install-action@just
275- - name : Install Rust
276- run : |
277- rustup install stable
278- rustup default stable
279205 - run : |
280206 just test-cargo
281207
@@ -459,23 +385,33 @@ jobs:
459385 test-qemu-all :
460386 runs-on : ubuntu-24.04
461387 needs :
462- [
463- test-qemu-v4t,
464- test-qemu-v5te,
465- test-qemu-v6,
466- test-qemu-v7a,
467- test-qemu-v7r,
468- test-qemu-v8r,
469- test-qemu-v8r-smp,
470- test-qemu-v8r-el2,
471- ]
388+ - test-qemu-v4t
389+ - test-qemu-v5te
390+ - test-qemu-v6
391+ - test-qemu-v7a
392+ - test-qemu-v7r
393+ - test-qemu-v8r
394+ - test-qemu-v8r-smp
395+ - test-qemu-v8r-el2
472396 steps :
473397 - run : /bin/true
474398
475399 # Gather all the above xxx-all jobs together for the purposes of getting an overall pass-fail
476400 all :
477401 runs-on : ubuntu-24.04
478- needs : [docs-all, build-all, fmt-all, unit-test-all, test-qemu-all] # not gating on clippy-all
479- if : failure()
402+ if : always()
403+ # not gating on clippy-all
404+ needs :
405+ - docs-all
406+ - build-all
407+ - fmt-all
408+ - unit-test-all
409+ - test-qemu-all
410+ timeout-minutes : 2
480411 steps :
481- - run : exit 1
412+ - name : Ensure all required jobs succeed
413+ run : |
414+ echo "Our needs:"
415+ echo '${{ toJSON(needs) }}'
416+ echo "Checking..."
417+ echo '${{ toJSON(needs) }}' | jq -e 'to_entries | all(.value.result == "success")'
0 commit comments