Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 34 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,37 +24,64 @@ concurrency:

jobs:
build-check:
name: ${{ matrix.board }}
name: ${{ matrix.board.mcu }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board: ["esp32", "esp32c2", "esp32c3", "esp32c6", "esp32h2", "esp32s2", "esp32s3"]
board:
- mcu: "esp32"
devkit: "board-esp32-devkit-v1"
- mcu: "esp32c2"
- mcu: "esp32c3"
devkit: "board-esp32-c3-devkitm-1"
- mcu: "esp32c6"
devkit: "board-esp32-c6-devkitc-1"
- mcu: "esp32h2"
devkit: "board-esp32-h2-devkitm-1"
- mcu: "esp32s2"
devkit: "board-esp32-s2-devkitm-1"
- mcu: "esp32s3"
devkit: "board-esp32-s3-devkitc-1"
steps:
- uses: actions/checkout@v4
- name: Setup | Rust (RISC-V)
if: matrix.board != 'esp32' && matrix.board != 'esp32-2' && matrix.board != 'esp32s3'
if: matrix.board.mcu != 'esp32' && matrix.board.mcu != 'esp32s2' && matrix.board.mcu != 'esp32s3'
uses: dtolnay/rust-toolchain@v1
with:
target: riscv32imc-unknown-none-elf
toolchain: nightly
components: rust-src
- name: Setup | Rust (Xtensa)
if: matrix.board == 'esp32' || matrix.board == 'esp32s2' || matrix.board == 'esp32s3'
if: matrix.board.mcu == 'esp32' || matrix.board.mcu == 'esp32s2' || matrix.board.mcu == 'esp32s3'
uses: esp-rs/[email protected]
with:
default: true
buildtargets: ${{ matrix.board }}
buildtargets: ${{ matrix.board.mcu }}
ldproxy: false
- uses: Swatinem/rust-cache@v2
- name: Setup | ESP-IDF
shell: bash
run: |
git clone -b v5.1 --shallow-submodules --single-branch --recursive https://github.com/espressif/esp-idf.git /home/runner/work/esp-idf
/home/runner/work/esp-idf/install.sh ${{ matrix.board }}
/home/runner/work/esp-idf/install.sh ${{ matrix.board.mcu }}
- name: Build project
shell: bash
run: |
. /home/runner/work/esp-idf/export.sh
idf.py set-target ${{ matrix.board }}
idf.py set-target ${{ matrix.board.mcu }}
idf.py build
- name: Setup | Wokwi diagram
if: matrix.board.devkit != '' && matrix.board.mcu != 'esp32'
run: |
sed -i 's/board-esp32-devkit-v1/${{ matrix.board.devkit }}/g' diagram.json
sed -i 's/esp:TX0/esp:TX/g' diagram.json
sed -i 's/esp:RX0/esp:RX/g' diagram.json
- name: Wokwi CI check
if: matrix.board.devkit != ''
uses: wokwi/wokwi-ci-action@v1
with:
token: ${{ secrets.WOKWI_CLI_TOKEN }}
timeout: 10000
expect_text: 'Hello ESP-RS. https://github.com/esp-rs'
fail_text: 'Error'
2 changes: 1 addition & 1 deletion diagram.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"version": 1,
"author": "Espressif Systems",
"editor": "wokwi",
"parts": [ { "type": "wokwi-esp32-devkit-v1", "id": "esp", "top": 0, "left": 0, "attrs": {} } ],
"parts": [ { "type": "board-esp32-devkit-v1", "id": "esp", "top": 0, "left": 0, "attrs": {} } ],
"connections": [ [ "esp:TX0", "$serialMonitor:RX", "", [] ], [ "esp:RX0", "$serialMonitor:TX", "", [] ] ],
"dependencies": {}
}
Expand Down