From e800bd1438c26b2d45b46171ec4613366495d2b2 Mon Sep 17 00:00:00 2001 From: Felix Erdmann Date: Fri, 31 May 2024 16:59:36 +0200 Subject: [PATCH] ci: debug --- .github/workflows/compile-sketches.yml | 66 ++++++++++++-------------- 1 file changed, 31 insertions(+), 35 deletions(-) diff --git a/.github/workflows/compile-sketches.yml b/.github/workflows/compile-sketches.yml index 38e678c..008c8b0 100644 --- a/.github/workflows/compile-sketches.yml +++ b/.github/workflows/compile-sketches.yml @@ -19,14 +19,14 @@ jobs: matrix: board: # senseBox MCU - # - fqbn: sensebox:samd:sb:power=on - # platforms: | - # - name: arduino:samd - # - name: sensebox:samd - # source-url: https://raw.githubusercontent.com/mariopesch/senseBoxMCU-core/master/package_sensebox_index.json - # sketch-paths: | - # - ./senseBox-bike - # artifact-name-suffix: sensebox.samd.sb + - fqbn: sensebox:samd:sb:power=on + platforms: | + - name: arduino:samd + - name: sensebox:samd + source-url: https://raw.githubusercontent.com/mariopesch/senseBoxMCU-core/master/package_sensebox_index.json + sketch-paths: | + - ./senseBox-bike + artifact-name-suffix: sensebox.samd.sb # senseBox MCU S2 (ESP32) - fqbn: esp32:esp32:sensebox_mcu_esp32s2 platforms: | @@ -91,37 +91,33 @@ jobs: echo "Processing sketch path: $sketch_path" # replace ./ with nothing clean_sketch_path=${sketch_path//.\//} - # DEBUG sketch_path - ls -lah ${{ github.workspace }} - ls -lah ${{ github.workspace }}/$sketch_path/build/${{ matrix.board.artifact-name-suffix}} python3 lzss.py --encode ${{ github.workspace }}/$sketch_path/build/${{ matrix.board.artifact-name-suffix}}/$clean_sketch_path.ino.bin ${{ runner.temp }}/$clean_sketch_path.ino.lzss - ls -lah ${{ runner.temp }} echo "LZSS file created: ${{ runner.temp }}/$clean_sketch_path.ino.lzss" - ls -lah ${{ runner.temp }} - python3 bin2ota.py ESP ${{ runner.temp }}/$clean_sketch_path.ino.lzss ${{ runner.temp }}/$clean_sketch_path.ino.ota + python3 bin2ota.py ESP32 ${{ runner.temp }}/$clean_sketch_path.ino.lzss ${{ runner.temp }}/$clean_sketch_path.ino.ota echo "OTA file created: ${{ runner.temp }}/$clean_sketch_path.ino.ota" + mv ${{ runner.temp }}/$clean_sketch_path.ino.ota ${{ github.workspace }}/$sketch_path/build/${{ matrix.board.artifact-name-suffix}}/$clean_sketch_path.ino.ota fi done - # - name: Export binaries as artifacts - # uses: actions/upload-artifact@v4 - # with: - # name: ${{ matrix.board.artifact-name-suffix }} - # path: ${{ github.workspace }} + - name: Export binaries as artifacts + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.board.artifact-name-suffix }} + path: ${{ github.workspace }} - # release: - # needs: compile-sketches - # runs-on: ubuntu-latest - # steps: - # - name: Download Firmware Files - # uses: actions/download-artifact@v4 - # with: - # path: release - # - name: Release Firmware - # uses: ncipollo/release-action@v1 - # if: startsWith(github.ref, 'refs/tags/') - # with: - # artifacts: release/**/*.bin - # allowUpdates: true - # omitBodyDuringUpdate: true - # token: ${{ secrets.GITHUB_TOKEN }} + release: + needs: compile-sketches + runs-on: ubuntu-latest + steps: + - name: Download Firmware Files + uses: actions/download-artifact@v4 + with: + path: release + - name: Release Firmware + uses: ncipollo/release-action@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + artifacts: "release/**/*.bin, release/**/*.ota" + allowUpdates: true + omitBodyDuringUpdate: true + token: ${{ secrets.GITHUB_TOKEN }}