Skip to content

Commit a642a2a

Browse files
committed
ci: Update path
1 parent dd56f4f commit a642a2a

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

.github/workflows/wokwi_projects.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,14 @@ jobs:
2222
project:
2323
- name: "hardware-check"
2424
id: "360342886675214337"
25+
path: "intro/hardware-check"
2526
- name: http-client
2627
id: "333372159510446675"
28+
path: "intro/http-client"
2729
- name: button-interrupt
2830
id: "333374799393849940"
31+
path: "advanced/button-interrupt"
32+
2933
steps:
3034
- name: Checkout the repository
3135
uses: actions/checkout@v4
@@ -35,14 +39,17 @@ jobs:
3539
wget -q -O ${{ matrix.project.name }}.zip https://wokwi.com/api/projects/${{ matrix.project.id }}/zip
3640
unzip ${{ matrix.project.name }}.zip -d ${{ matrix.project.name }}
3741
mkdir -p ${{ matrix.project.name }}/src
38-
cp ${{ matrix.project.name }}/*.rs ${{ matrix.project.name }}/src/
42+
rm -rf ${{ matrix.project.path }}/src/*.rs
43+
cp ${{ matrix.project.name }}/*.rs ${{ matrix.project.path }}/src/
44+
rm -rf ${{ matrix.project.path }}/Cargo.toml
45+
cp ${{ matrix.project.name }}/Cargo.toml ${{ matrix.project.path }}/Cargo.toml
3946
4047
- name: Create wokwi.toml
41-
run: echo -e "[wokwi]\nversion = 1\nfirmware = '${{ matrix.project.name }}'\nelf = '${{ matrix.project.name }}'" > ${{ matrix.project.name }}/wokwi.toml
48+
run: echo -e "[wokwi]\nversion = 1\nfirmware = '${{ matrix.project.name }}'\nelf = '${{ matrix.project.name }}'" > ${{ matrix.project.path }}/wokwi.toml
4249

4350
- name: Update ownership
4451
run: |
45-
sudo chown 1000:1000 -R ${{ matrix.project.name }}
52+
sudo chown 1000:1000 -R ${{ matrix.project.path }}
4653
4754
- name: Pull Docker image
4855
run: docker image pull espressif/rust-std-training
@@ -53,14 +60,15 @@ jobs:
5360
image: espressif/rust-std-training:latest
5461
options: -u esp -v ${{ github.workspace }}:/home/esp/workspace
5562
run: |
56-
cd /home/esp/workspace/${{ matrix.project.name }}
57-
/home/esp/.cargo/bin/cargo build --release --out-dir /home/esp/workspace/${{ matrix.project.name }} -Z unstable-options
63+
cd /home/esp/workspace/${{ matrix.project.path }}
64+
/home/esp/.cargo/bin/cargo build --release --out-dir /home/esp/workspace/${{ matrix.project.path }}/${{ matrix.project.name }} -Z unstable-options
65+
rm -rf /home/esp/workspace/${{ matrix.project.path }}/target
5866
5967
- name: Wokwi CI check
6068
uses: wokwi/wokwi-ci-action@v1
6169
with:
6270
token: ${{ secrets.WOKWI_CLI_TOKEN }}
63-
path: ${{ matrix.project.name }}
71+
path: ${{ matrix.project.path }}
6472
timeout: 30000
6573
scenario: ${{ github.workspace }}/.github/${{ matrix.project.name }}.test.yaml
6674
fail_text: 'Error'
@@ -70,4 +78,4 @@ jobs:
7078
uses: actions/upload-artifact@v3
7179
with:
7280
name: ${{ matrix.project.name }}_${{ matrix.project.id }}
73-
path: ${{ matrix.project.name }}
81+
path: ${{ matrix.project.path }}

0 commit comments

Comments
 (0)