From 5db62f6f8c079aab2dea126a2a175c73459ffc3e Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Thu, 9 Nov 2023 12:08:33 +0100 Subject: [PATCH] ci: Update path --- .github/workflows/wokwi_projects.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/wokwi_projects.yml b/.github/workflows/wokwi_projects.yml index 6b0d6869..11ac6ec0 100644 --- a/.github/workflows/wokwi_projects.yml +++ b/.github/workflows/wokwi_projects.yml @@ -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 @@ -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 @@ -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 @@ -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 }}