Skip to content

Commit

Permalink
feat: Remove std builders
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioGasquez committed Jan 8, 2025
1 parent c43be5f commit 4ae3dd0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 112 deletions.
96 changes: 14 additions & 82 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

jobs:
projects:
name: "${{ matrix.project.name }} | ${{ matrix.project.mcu }} | ${{ matrix.project.env }} | ${{ matrix.project.id }}"
name: "${{ matrix.project.name }} | ${{ matrix.project.mcu }} | ${{ matrix.project.id }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -24,128 +24,60 @@ jobs:
# Templates
- name: template
id: "341952531613614675"
env: nostd
mcu: esp32
- name: template
id: "338154815612781140"
env: std
mcu: esp32
- name: template
id: "341956530834244180"
env: nostd
mcu: esp32c3
- name: template
id: "338322025101656660"
env: std
mcu: esp32c3
## Rust Board
- name: template
id: "341957109819114067"
env: nostd
mcu: esp32c3
- name: template
id: "338322111264195156"
env: std
mcu: esp32c3
- name: template
id: "377857146822034433"
env: nostd
mcu: esp32c6
- name: template
id: "377833187169638401"
env: std
mcu: esp32c6
- name: template
id: "379094104004151297"
env: nostd
mcu: esp32h2
- name: template
id: "379361398729686017"
env: std
mcu: esp32h2
- name: template
id: "341955277702038100"
env: nostd
mcu: esp32s2
- name: template
id: "338154940543271506"
env: std
mcu: esp32s2
- name: template
id: "349566517066596948"
env: nostd
mcu: esp32s3
- name: template
id: "345144250522927698"
env: std
mcu: esp32s3
# Examples
- name: blinky
id: "341952826535051858"
env: nostd
mcu: esp32
- name: blinky
id: "333363577816613460"
env: std
mcu: esp32
- name: blinky
id: "341956526159692371"
env: nostd
mcu: esp32c3
- name: blinky
id: "332188235906155092"
env: std
mcu: esp32c3
- name: blinky
id: "378092585951093761"
env: nostd
mcu: esp32c6
- name: blinky
id: "378092245692314625"
env: std
mcu: esp32c6
- name: blinky
id: "379361473820314625"
env: nostd
mcu: esp32h2
- name: blinky
id: "379361684344001537"
env: std
mcu: esp32h2
- name: blinky
id: "341955297469792851"
env: nostd
mcu: esp32s2
- name: blinky
id: "333363982163247699"
env: std
mcu: esp32s2
- name: blinky
id: "349568945405035090"
env: nostd
mcu: esp32s3
- name: blinky
id: "361808947755817985"
env: std
mcu: esp32s3
steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Download project code
run: |
wget -q -O ${{ matrix.project.mcu }}-${{ matrix.project.env }}_${{ matrix.project.id }}.zip https://wokwi.com/api/projects/${{ matrix.project.id }}/zip
unzip ${{ matrix.project.mcu }}-${{ matrix.project.env }}_${{ matrix.project.id }}.zip -d ${{ matrix.project.mcu }}-${{ matrix.project.env }}_${{ matrix.project.id }}
- name: Create wokwi.toml (nostd)
if: matrix.project.env == 'nostd'
run: echo -e "[wokwi]\nversion = 1\nfirmware = 'rust_project_${{ matrix.project.mcu }}'\nelf = 'rust_project_${{ matrix.project.mcu }}'" > ${{ matrix.project.mcu }}-${{ matrix.project.env }}_${{ matrix.project.id }}/wokwi.toml
- name: Create wokwi.toml (std)
if: matrix.project.env == 'std'
run: echo -e "[wokwi]\nversion = 1\nfirmware = 'rust-project-${{ matrix.project.mcu }}'\nelf = 'rust-project-${{ matrix.project.mcu }}'" > ${{ matrix.project.mcu }}-${{ matrix.project.env }}_${{ matrix.project.id }}/wokwi.toml
wget -q -O ${{ matrix.project.mcu }}_${{ matrix.project.id }}.zip https://wokwi.com/api/projects/${{ matrix.project.id }}/zip
unzip ${{ matrix.project.mcu }}_${{ matrix.project.id }}.zip -d ${{ matrix.project.mcu }}_${{ matrix.project.id }}
- name: Create wokwi.toml
run: echo -e "[wokwi]\nversion = 1\nfirmware = 'rust_project_${{ matrix.project.mcu }}'\nelf = 'rust_project_${{ matrix.project.mcu }}'" > ${{ matrix.project.mcu }}_${{ matrix.project.id }}/wokwi.toml

- name: Update ownership
run: |
sudo chown 1000:1000 -R ${{ matrix.project.mcu }}-${{ matrix.project.env }}_${{ matrix.project.id }}
sudo chown 1000:1000 -R ${{ matrix.project.mcu }}_${{ matrix.project.id }}
- name: Pull Docker image
run: docker image pull wokwi/builder-rust-${{ matrix.project.env }}-esp
Expand All @@ -157,17 +89,17 @@ jobs:
options: -u esp -v ${{ github.workspace }}:/home/esp/workspace
run: |
. /home/esp/export-esp.sh
cp /home/esp/workspace/${{ matrix.project.mcu }}-${{ matrix.project.env }}_${{ matrix.project.id }}/*.rs rust-project-${{ matrix.project.mcu }}/src/
cat /home/esp/workspace/${{ matrix.project.mcu }}-${{ matrix.project.env }}_${{ matrix.project.id }}/Cargo.toml > rust-project-${{ matrix.project.mcu }}/Cargo.toml
cp /home/esp/workspace/${{ matrix.project.mcu }}_${{ matrix.project.id }}/*.rs rust-project-${{ matrix.project.mcu }}/src/
cat /home/esp/workspace/${{ matrix.project.mcu }}_${{ matrix.project.id }}/Cargo.toml > rust-project-${{ matrix.project.mcu }}/Cargo.toml
cd rust-project-${{ matrix.project.mcu }}
cargo build --release --out-dir /home/esp/workspace/${{ matrix.project.mcu }}-${{ matrix.project.env }}_${{ matrix.project.id }} -Z unstable-options
cargo build --release --out-dir /home/esp/workspace/${{ matrix.project.mcu }}_${{ matrix.project.id }} -Z unstable-options
- name: Wokwi CI check
if: matrix.project.name == 'template'
uses: wokwi/wokwi-ci-action@v1
with:
token: ${{ secrets.WOKWI_CLI_TOKEN }}
path: ${{ matrix.project.mcu }}-${{ matrix.project.env }}_${{ matrix.project.id }}
path: ${{ matrix.project.mcu }}_${{ matrix.project.id }}
timeout: 10000
expect_text: 'Hello world!'
fail_text: 'Error'
Expand All @@ -177,7 +109,7 @@ jobs:
uses: wokwi/wokwi-ci-action@v1
with:
token: ${{ secrets.WOKWI_CLI_TOKEN }}
path: ${{ matrix.project.mcu }}-${{ matrix.project.env }}_${{ matrix.project.id }}
path: ${{ matrix.project.mcu }}_${{ matrix.project.id }}
timeout: 10000
scenario: ../blinky.test.yaml
fail_text: 'Error'
Expand All @@ -186,5 +118,5 @@ jobs:
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.project.name }}-${{ matrix.project.mcu }}-${{ matrix.project.env }}_${{ matrix.project.id }}
path: ${{ matrix.project.mcu }}-${{ matrix.project.env }}_${{ matrix.project.id }}
name: ${{ matrix.project.name }}_${{ matrix.project.mcu }}_${{ matrix.project.id }}
path: ${{ matrix.project.mcu }}_${{ matrix.project.id }}
43 changes: 13 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,20 @@
[![CI](https://github.com/SergioGasquez/wokwi-projects/actions/workflows/ci.yml/badge.svg)](https://github.com/SergioGasquez/wokwi-projects/actions/workflows/ci.yml)

## Templates
- `std`
- [ESP32](https://wokwi.com/projects/338154815612781140)
- [ESP32-C3](https://wokwi.com/projects/338322025101656660)
- [ESP32-C3 Rust Board](https://wokwi.com/projects/338322111264195156)
- [ESP32-C6](https://wokwi.com/projects/377833187169638401)
- [ESP32-H2](https://wokwi.com/projects/379361398729686017)
- [ESP32-S2](https://wokwi.com/projects/338154940543271506)
- [ESP32-S3](https://wokwi.com/projects/345144250522927698)
- `no_std`
- [ESP32](https://wokwi.com/projects/341952531613614675)
- [ESP32-C3](https://wokwi.com/projects/341956530834244180)
- [ESP32-C3 Rust Board](https://wokwi.com/projects/341957109819114067)
- [ESP32-C6](https://wokwi.com/projects/377857146822034433)
- [ESP32-H2](https://wokwi.com/projects/379094104004151297)
- [ESP32-S2](https://wokwi.com/projects/341955277702038100)
- [ESP32-S3](https://wokwi.com/projects/349566517066596948)
- [ESP32](https://wokwi.com/projects/341952531613614675)
- [ESP32-C3](https://wokwi.com/projects/341956530834244180)
- [ESP32-C3 Rust Board](https://wokwi.com/projects/341957109819114067)
- [ESP32-C6](https://wokwi.com/projects/377857146822034433)
- [ESP32-H2](https://wokwi.com/projects/379094104004151297)
- [ESP32-S2](https://wokwi.com/projects/341955277702038100)
- [ESP32-S3](https://wokwi.com/projects/349566517066596948)

## Examples
- `std`
- [ESP32 | std | Blinky](https://wokwi.com/projects/333363577816613460)
- [ESP32-C3 | std | Blinky](https://wokwi.com/projects/332188235906155092)
- [ESP32-C6 | std | Blinky](https://wokwi.com/projects/378092245692314625)
- [ESP32-H2 | std | Blinky](https://wokwi.com/projects/379361684344001537)
- [ESP32-S2 | std | Blinky](https://wokwi.com/projects/333363982163247699)
- [ESP32-S3 | std | Blinky](https://wokwi.com/projects/361808947755817985)
- `no_std`
- [ESP32 | no_std | Blinky](https://wokwi.com/projects/341952826535051858)
- [ESP32-C3 | no_std | Blinky](https://wokwi.com/projects/341956526159692371)
- [ESP32-C6 | no_std | Blinky](https://wokwi.com/projects/378092585951093761)
- [ESP32-H2 | no_std | Blinky](https://wokwi.com/projects/379361473820314625)
- [ESP32-S2 | no_std | Blinky](https://wokwi.com/projects/341955297469792851)
- [ESP32-S3 | no_std | Blinky](https://wokwi.com/projects/349568945405035090)
- [ESP32 | no_std | Blinky](https://wokwi.com/projects/341952826535051858)
- [ESP32-C3 | no_std | Blinky](https://wokwi.com/projects/341956526159692371)
- [ESP32-C6 | no_std | Blinky](https://wokwi.com/projects/378092585951093761)
- [ESP32-H2 | no_std | Blinky](https://wokwi.com/projects/379361473820314625)
- [ESP32-S2 | no_std | Blinky](https://wokwi.com/projects/341955297469792851)
- [ESP32-S3 | no_std | Blinky](https://wokwi.com/projects/349568945405035090)


0 comments on commit 4ae3dd0

Please sign in to comment.