Skip to content

Commit

Permalink
ci: Update path
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioGasquez committed Nov 9, 2023
1 parent dd56f4f commit 5db62f6
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/wokwi_projects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,16 @@ jobs:
project:
- name: "hardware-check"
id: "360342886675214337"
path: "intro/hardware-check"
- name: http-client
id: "333372159510446675"
path: "intro/http-client"
arg: --example http_client
- name: button-interrupt
id: "333374799393849940"
path: "advanced/button-interrupt"
arg: --example solution

steps:
- name: Checkout the repository
uses: actions/checkout@v4
Expand All @@ -36,13 +42,15 @@ jobs:
unzip ${{ matrix.project.name }}.zip -d ${{ matrix.project.name }}
mkdir -p ${{ matrix.project.name }}/src
cp ${{ matrix.project.name }}/*.rs ${{ matrix.project.name }}/src/
mkdir -p wokwi
mv ${{ matrix.project.name }} wokwi/${{ matrix.project.name }}
- name: Create wokwi.toml
run: echo -e "[wokwi]\nversion = 1\nfirmware = '${{ matrix.project.name }}'\nelf = '${{ matrix.project.name }}'" > ${{ matrix.project.name }}/wokwi.toml
run: echo -e "[wokwi]\nversion = 1\nfirmware = '${{ matrix.project.name }}'\nelf = '${{ matrix.project.name }}'" > wokwi/${{ matrix.project.name }}/wokwi.toml

- name: Update ownership
run: |
sudo chown 1000:1000 -R ${{ matrix.project.name }}
sudo chown 1000:1000 -R wokwi/${{ matrix.project.name }}
- name: Pull Docker image
run: docker image pull espressif/rust-std-training
Expand All @@ -53,8 +61,8 @@ jobs:
image: espressif/rust-std-training:latest
options: -u esp -v ${{ github.workspace }}:/home/esp/workspace
run: |
cd /home/esp/workspace/${{ matrix.project.name }}
/home/esp/.cargo/bin/cargo build --release --out-dir /home/esp/workspace/${{ matrix.project.name }} -Z unstable-options
cd /home/esp/workspace/wokwi/${{ matrix.project.name }}
/home/esp/.cargo/bin/cargo build --release ${{ matrix.project.arg }} --out-dir /home/esp/workspace/${{ matrix.project.name }} -Z unstable-options
- name: Wokwi CI check
uses: wokwi/wokwi-ci-action@v1
Expand All @@ -70,4 +78,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.project.name }}_${{ matrix.project.id }}
path: ${{ matrix.project.name }}
path: wokwi/${{ matrix.project.name }}

0 comments on commit 5db62f6

Please sign in to comment.