@@ -210,7 +210,7 @@ jobs:
210
210
run : |
211
211
cd qemu-${{ env.QEMU_VERSION }}
212
212
ninja -C build
213
-
213
+
214
214
- name : Download ESP32 QEMU
215
215
run : wget "${{ env.QEMU_ESP_URL }}" --output-document=${{ env.QEMU_ESP}}.tar.xz
216
216
@@ -230,150 +230,51 @@ jobs:
230
230
name : qemu
231
231
path : qemu.tar
232
232
233
- # Platform lm3s6965: verify the example output with run-pass tests
234
- testexampleslm3s6965 :
235
- name : QEMU run (lm3s6965)
233
+ # Verify the example output with run-pass tests
234
+ testexamples :
235
+ name : QEMU run
236
236
needs : buildqemu
237
237
runs-on : ubuntu-22.04
238
238
strategy :
239
239
matrix :
240
- backend :
241
- - thumbv7
242
- - thumbv6
243
- toolchain :
244
- - stable
245
- steps :
246
- - name : Checkout
247
- uses : actions/checkout@v4
248
-
249
- - name : Install Rust ${{ matrix.toolchain }}
250
- run : |
251
- rustup set profile minimal
252
- rustup override set ${{ matrix.toolchain }}
253
-
254
- - name : Configure Rust target (v6, v7)
255
- run : |
256
- rustup target add thumbv7m-none-eabi
257
- rustup target add thumbv6m-none-eabi
258
-
259
- - name : Add Rust component llvm-tools-preview
260
- run : rustup component add llvm-tools-preview
261
-
262
- # Use precompiled binutils
263
- - name : Install cargo-binutils
264
- uses : taiki-e/install-action@v2
265
- with :
266
- tool : cargo-binutils
267
-
268
- - name : Cache Dependencies
269
- uses : Swatinem/rust-cache@v2
270
-
271
- - name : Install QEMU to get dependencies
272
- run : |
273
- sudo apt update
274
- sudo apt install -y qemu-system-arm
275
-
276
- - name : Download built QEMU
277
- uses : actions/download-artifact@v4
278
- with :
279
- name : qemu
280
-
281
- - name : Extract QEMU into local path
282
- run : tar -xf qemu.tar -C /usr/local/bin
283
-
284
- - name : Check which QEMU is used
285
- run : |
286
- which qemu-system-arm
287
- which qemu-system-riscv32
288
-
289
- - name : Run-pass tests
290
- run : cargo xtask --deny-warnings --platform lm3s6965 --backend ${{ matrix.backend }} qemu
291
-
292
- # Platform hifive1: verify the example output with run-pass tests
293
- testexampleshifive1 :
294
- name : QEMU run (hifive1)
295
- needs : buildqemu
296
- runs-on : ubuntu-22.04
297
- strategy :
298
- matrix :
299
- backend :
300
- - riscv32-imc-clint
301
- - riscv32-imc-mecall
302
- toolchain :
303
- - stable
304
- steps :
305
- - name : Checkout
306
- uses : actions/checkout@v4
307
-
308
- - name : Install Rust ${{ matrix.toolchain }}
309
- run : |
310
- rustup set profile minimal
311
- rustup override set ${{ matrix.toolchain }}
312
-
313
- - name : Configure Rust target
314
- run : |
315
- rustup target add riscv32imc-unknown-none-elf
316
-
317
- - name : Add Rust component llvm-tools-preview
318
- run : rustup component add llvm-tools-preview
240
+ input :
241
+ - backend : thumbv7
242
+ platform : lm3s6965
243
+ rustup-target : thumbv7m-none-eabi
244
+ qemu-system : arm
319
245
320
- # Use precompiled binutils
321
- - name : Install cargo-binutils
322
- uses : taiki-e/install-action@v2
323
- with :
324
- tool : cargo-binutils
246
+ - backend : thumbv6
247
+ platform : lm3s6965
248
+ rustup-target : thumbv6m-none-eabi
249
+ qemu-system : arm
325
250
326
- - name : Cache Dependencies
327
- uses : Swatinem/rust-cache@v2
328
-
329
- - name : Install QEMU to get dependencies
330
- run : |
331
- sudo apt update
332
- sudo apt install -y qemu-system-riscv32
251
+ - backend : riscv32-imc-clint
252
+ platform : hifive1
253
+ rustup-target : riscv32imc-unknown-none-elf
254
+ qemu-system : riscv32
333
255
334
- - name : Download built QEMU
335
- uses : actions/download-artifact@v4
336
- with :
337
- name : qemu
338
-
339
- - name : Extract QEMU into local path
340
- run : tar -xf qemu.tar -C /usr/local/bin
256
+ - backend : riscv32-imc-mecall
257
+ platform : hifive1
258
+ rustup-target : riscv32imc-unknown-none-elf
259
+ qemu-system : riscv32
341
260
342
- - name : Check which QEMU is used
343
- run : |
344
- which qemu-system-arm
345
- which qemu-system-riscv32
346
-
347
- - name : Run-pass tests
348
- run : cargo xtask --deny-warnings --platform hifive1 --backend ${{ matrix.backend }} qemu
261
+ - backend : riscv-esp32-c3
262
+ platform : esp32-c3
263
+ rustup-target : riscv32imc-unknown-none-elf
264
+ qemu-system : riscv32
349
265
350
- # Platform esp32c3: verify the example output with run-pass tests
351
- testexamplesesp32c3 :
352
- name : QEMU run (esp32c3)
353
- needs : buildqemu
354
- runs-on : ubuntu-22.04
355
- strategy :
356
- matrix :
357
- toolchain :
358
- - stable
359
266
steps :
360
267
- name : Checkout
361
268
uses : actions/checkout@v4
362
269
363
- - name : Install Rust ${{ matrix.toolchain }}
364
- run : |
365
- rustup set profile minimal
366
- rustup override set ${{ matrix.toolchain }}
367
-
368
270
- name : Configure Rust target
369
- run : |
370
- rustup target add riscv32imac-unknown-none-elf
371
- rustup target add riscv32imc-unknown-none-elf
271
+ run : rustup target add ${{ matrix.input.rustup-target }}
372
272
373
273
- name : Add Rust component llvm-tools-preview
374
274
run : rustup component add llvm-tools-preview
375
275
376
- - name : Install libudev espflash dependency
276
+ - name : Install lubudev espflash dependency
277
+ if : ${{ matrix.input.platform == 'esp32-c3' }}
377
278
run : |
378
279
sudo apt update
379
280
sudo apt install -y libudev-dev
@@ -386,12 +287,11 @@ jobs:
386
287
387
288
# Use precompiled if possible
388
289
- name : Install espflash
290
+ if : ${{ matrix.input.platform == 'esp32-c3' }}
389
291
run : cargo install espflash --version 3.1.0 --force
390
- # uses: taiki-e/install-action@v2
391
- # with:
392
- # tool: espflash
393
292
394
293
- name : Install esptool.py
294
+ if : ${{ matrix.input.platform == 'esp32-c3' }}
395
295
run : pip install esptool
396
296
397
297
- name : Cache Dependencies
@@ -400,22 +300,22 @@ jobs:
400
300
- name : Install QEMU to get dependencies
401
301
run : |
402
302
sudo apt update
403
- sudo apt install -y qemu-system-riscv32
303
+ sudo apt install -y qemu-system-${{ matrix.input.qemu-system }}
404
304
405
305
- name : Download built QEMU
406
306
uses : actions/download-artifact@v4
407
307
with :
408
308
name : qemu
409
-
410
- - name : Extract ESP32 QEMU into local path
411
- run : sudo tar --strip-components=1 - xf qemu.tar -C /usr/local/ esp32/
309
+
310
+ - name : Extract QEMU into local path
311
+ run : tar -xf qemu.tar -C /usr/local/bin
412
312
413
313
- name : Check which QEMU is used
414
314
run : |
415
- which qemu-system-riscv32
416
-
315
+ which qemu-system-${{ matrix.input.qemu-system }}
316
+
417
317
- name : Run-pass tests
418
- run : cargo xtask -v --platform esp32-c3 qemu
318
+ run : cargo xtask --deny-warnings --platform ${{ matrix.input.platform }} --backend ${{ matrix.backend }} qemu
419
319
420
320
# Run test suite
421
321
tests :
@@ -852,9 +752,7 @@ jobs:
852
752
- clippylm3s6965
853
753
# - clippyhifive1 # TODO
854
754
- checkexamples
855
- - testexampleslm3s6965
856
- - testexampleshifive1
857
- - testexamplesesp32c3
755
+ - testexamples
858
756
- tests
859
757
- docs
860
758
- mdbook
0 commit comments