refactor: rename ESP32 feature to ESP32-C3 #29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| host: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: app | |
| - uses: dtolnay/[email protected] | |
| with: | |
| components: clippy, rustfmt | |
| - name: Format | |
| run: cargo fmt --all -- --check | |
| working-directory: app | |
| - name: Clippy | |
| run: cargo clippy --all-targets -- -D warnings | |
| working-directory: app | |
| - name: Test host runner | |
| run: cargo test --all-targets | |
| working-directory: app | |
| - name: Test embedded host-function ABI | |
| run: cargo test --features esp32c3 | |
| working-directory: app | |
| - name: Test VMBC partition packer | |
| run: | | |
| python scripts/flash_vmbc.py programs/esp32-blinky.rss --output /tmp/rustscript.partition.bin | |
| test -s /tmp/rustscript.partition.bin | |
| working-directory: app | |
| - name: Examples smoke | |
| run: | | |
| cargo run --example run_file -- programs/blinky.rss | grep 'led:off' | |
| printf 'print(1 + 2);\n.quit\n' | cargo run --example repl | grep '3' | |
| working-directory: app | |
| esp32: | |
| name: ESP32-C3 factory firmware | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: app | |
| - uses: dtolnay/[email protected] | |
| with: | |
| components: llvm-tools-preview | |
| targets: riscv32imc-unknown-none-elf | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install PlatformIO | |
| run: python -m pip install platformio==6.1.19 | |
| - name: Build complete firmware | |
| run: pio run | |
| working-directory: app | |
| - name: Build and run Arduino target | |
| run: | | |
| pio run -e arduino | |
| .pio/build/arduino/program | tee /tmp/arduino.log | |
| grep 'micro-rustscript:gpio=low' /tmp/arduino.log | |
| grep 'rss:status=0' /tmp/arduino.log | |
| working-directory: app | |
| - name: Verify firmware artifacts | |
| run: | | |
| test -s .pio/build/esp32-c3-devkitm-1/firmware.elf | |
| test -s .pio/build/esp32-c3-devkitm-1/firmware.bin | |
| test -s dist/micro-rustscript-esp32-c3.factory.bin | |
| test -s .pio/generated/rustscript.partition.bin | |
| test -s .pio/build/arduino/program | |
| nm -C .pio/build/esp32-c3-devkitm-1/firmware.elf | grep rustscript_run_vmbc | |
| nm -C .pio/build/esp32-c3-devkitm-1/firmware.elf | grep rustscript_dispatch_host | |
| grep 'rustscript.*0x0b0000.*0x010000' partitions.csv | |
| stat --format='%n %s bytes' \ | |
| .pio/build/esp32-c3-devkitm-1/firmware.elf \ | |
| .pio/build/esp32-c3-devkitm-1/firmware.bin \ | |
| dist/micro-rustscript-esp32-c3.factory.bin \ | |
| .pio/generated/esp32-blinky.vmbc \ | |
| .pio/generated/rustscript.partition.bin | |
| test "$(stat --format=%s dist/micro-rustscript-esp32-c3.factory.bin)" -lt 1000000 | |
| working-directory: app | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: micro-rustscript-esp32-c3 | |
| path: | | |
| app/dist/micro-rustscript-esp32-c3.factory.bin | |
| app/.pio/build/esp32-c3-devkitm-1/firmware.elf | |
| app/.pio/generated/esp32-blinky.vmbc | |
| app/.pio/generated/rustscript.partition.bin | |
| app/scripts/flash_vmbc.py | |
| app/scripts/vmbc_image.py | |
| app/scripts/repl_vmbc.py | |
| app/partitions.csv |