15
15
OLDOLDOLDSTABLE_VERSION : 0.4
16
16
QEMU_VERSION : 8.2.0
17
17
QEMU_URL : https://download.qemu.org/qemu-8.2.0.tar.xz
18
+ QEMU_ESP : qemu_esp
19
+ QEMU_ESP_URL : https://github.com/espressif/qemu/releases/download/esp-develop-8.2.0-20240122/qemu-riscv32-softmmu-esp_develop_8.2.0_20240122-x86_64-linux-gnu.tar.xz
18
20
19
21
jobs :
20
22
# Run cargo xtask format-check
@@ -230,7 +232,7 @@ jobs:
230
232
run : |
231
233
sudo apt update
232
234
sudo apt install -y qemu-system-arm qemu-system-riscv32
233
- sudo apt-get install git libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev ninja-build
235
+ sudo apt install -y git libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev ninja-build
234
236
235
237
- if : ${{ steps.cache-qemu.outputs.cache-hit != 'true' }}
236
238
name : Download QEMU
@@ -250,8 +252,16 @@ jobs:
250
252
name : Build QEMU
251
253
run : |
252
254
cd qemu-${{ env.QEMU_VERSION }}
253
- make -j$(nproc)
255
+ ninja -C build
254
256
257
+ - name : Download ESP32 QEMU
258
+ run : wget "${{ env.QEMU_ESP_URL }}" --output-document=${{ env.QEMU_ESP}}.tar.xz
259
+
260
+ - name : Extract ESP32 QEMU
261
+ run : |
262
+ mkdir -p qemu-${{ env.QEMU_VERSION }}/build/esp32
263
+ tar --strip-components=1 -xvJf ${{ env.QEMU_ESP }}.tar.xz -C qemu-${{ env.QEMU_VERSION }}/build/esp32 qemu
264
+
255
265
- name : Archive QEMU build
256
266
run : |
257
267
cd qemu-${{ env.QEMU_VERSION }}/build
@@ -386,6 +396,75 @@ jobs:
386
396
if : ${{ matrix.backend != 'riscv32-imc-clint' }}
387
397
run : cargo xtask --deny-warnings --platform hifive1 --backend ${{ matrix.backend }} qemu
388
398
399
+ # Platform esp32c3: verify the example output with run-pass tests
400
+ testexamplesesp32c3 :
401
+ name : QEMU run (esp32c3)
402
+ needs : buildqemu
403
+ runs-on : ubuntu-22.04
404
+ strategy :
405
+ matrix :
406
+ toolchain :
407
+ - stable
408
+ steps :
409
+ - name : Checkout
410
+ uses : actions/checkout@v4
411
+
412
+ - name : Install Rust ${{ matrix.toolchain }}
413
+ run : |
414
+ rustup set profile minimal
415
+ rustup override set ${{ matrix.toolchain }}
416
+
417
+ - name : Configure Rust target
418
+ run : |
419
+ rustup target add riscv32imac-unknown-none-elf
420
+ rustup target add riscv32imc-unknown-none-elf
421
+
422
+ - name : Add Rust component llvm-tools-preview
423
+ run : rustup component add llvm-tools-preview
424
+
425
+ - name : Install libudev espflash dependency
426
+ run : |
427
+ sudo apt update
428
+ sudo apt install -y libudev-dev
429
+
430
+ # Use precompiled binutils
431
+ - name : Install cargo-binutils
432
+ uses : taiki-e/install-action@v2
433
+ with :
434
+ tool : cargo-binutils
435
+
436
+ # Use precompiled if possible
437
+ - name : Install cargo-binutils
438
+ uses : taiki-e/install-action@v2
439
+ with :
440
+ tool : espflash
441
+
442
+ - name : Install esptool.py
443
+ run : pip install esptool
444
+
445
+ - name : Cache Dependencies
446
+ uses : Swatinem/rust-cache@v2
447
+
448
+ - name : Install QEMU to get dependencies
449
+ run : |
450
+ sudo apt update
451
+ sudo apt install -y qemu-system-riscv32
452
+
453
+ - name : Download built QEMU
454
+ uses : actions/download-artifact@v4
455
+ with :
456
+ name : qemu
457
+
458
+ - name : Extract ESP32 QEMU into local path
459
+ run : sudo tar --strip-components=1 -xf qemu.tar -C /usr/local/ esp32/
460
+
461
+ - name : Check which QEMU is used
462
+ run : |
463
+ which qemu-system-riscv32
464
+
465
+ - name : Run-pass tests
466
+ run : cargo xtask -vvv --platform esp32-c3 qemu
467
+
389
468
# Run test suite
390
469
tests :
391
470
name : tests
@@ -825,6 +904,7 @@ jobs:
825
904
- checkexamplesesp32c3
826
905
- testexampleslm3s6965
827
906
- testexampleshifive1
907
+ - testexamplesesp32c3
828
908
- tests
829
909
- docs
830
910
- mdbook
0 commit comments