Skip to content

Commit

Permalink
wokwi config
Browse files Browse the repository at this point in the history
  • Loading branch information
kassane committed Apr 2, 2024
1 parent 6022202 commit e63c7fc
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Wokwi-CI Build

on: [push]

jobs:
build:
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-latest]
target: [esp32, esp32s2, esp32s3]
runs-on: ${{ matrix.runs-on }}
container:
image: jmeeuws/esp-dlang
steps:
- uses: actions/checkout@v4
- name: update image
run: |
apt-get update && \
apt-get -y install \
docker cmake
- name: build D basic-example
run: |
cd examples/idf-project/main
dub build --compiler=/opt/ldc-xtensa/bin/ldc2 --build=release
- uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: v4.4.7
target: ${{ matrix.target }}
path: 'examples/idf-project'
- name: Copy diagram ${{ matrix.target }}
run: |
cp .github/workflows/wokwi/diagram-${{ matrix.target }}.json diagram.json
- uses: wokwi/wokwi-ci-action@v1
with:
token: ${{ secrets.WOKWI_CLI_TOKEN }}
timeout: 5000
expect_text: 'Hello, dlang says: i = 0'
8 changes: 8 additions & 0 deletions .github/workflows/wokwi/diagram-esp32.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"version": 1,
"author": "Juraj Michálek",
"editor": "wokwi",
"parts": [ { "type": "board-esp32-devkit-c-v4", "id": "esp", "top": 0, "left": 0, "attrs": {} } ],
"connections": [ [ "esp:TX", "$serialMonitor:RX", "", [] ], [ "esp:RX", "$serialMonitor:TX", "", [] ] ],
"dependencies": {}
}
8 changes: 8 additions & 0 deletions .github/workflows/wokwi/diagram-esp32s2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"version": 1,
"author": "Juraj Michálek",
"editor": "wokwi",
"parts": [ { "type": "board-esp32-s2-devkitm-1", "id": "esp", "top": 0, "left": 0, "attrs": {} } ],
"connections": [ [ "esp:TX", "$serialMonitor:RX", "", [] ], [ "esp:RX", "$serialMonitor:TX", "", [] ] ],
"dependencies": {}
}
8 changes: 8 additions & 0 deletions .github/workflows/wokwi/diagram-esp32s3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"version": 1,
"author": "Juraj Michálek",
"editor": "wokwi",
"parts": [ { "type": "board-esp32-s3-devkitc-1", "id": "esp", "top": 0, "left": 0, "attrs": { "flashSize":"8"} } ],
"connections": [ [ "esp:TX", "$serialMonitor:RX", "", [] ], [ "esp:RX", "$serialMonitor:TX", "", [] ] ],
"dependencies": {}
}
4 changes: 4 additions & 0 deletions wokwi.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[wokwi]
version = 1
elf = "examples/idf-project/build/example.elf"
firmware = "examples/idf-project/build/example.bin"

0 comments on commit e63c7fc

Please sign in to comment.