From 7acacb3bba6439938cc6a2b49f471e372a5369aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Thu, 9 Mar 2023 08:39:12 +0100 Subject: [PATCH] Add a separate workflow for s3 boards they use the same batch file but require a different OTA firmware. --- .github/workflows/build_esp32_s3.yml | 59 ++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/build_esp32_s3.yml diff --git a/.github/workflows/build_esp32_s3.yml b/.github/workflows/build_esp32_s3.yml new file mode 100644 index 000000000..7f556a991 --- /dev/null +++ b/.github/workflows/build_esp32_s3.yml @@ -0,0 +1,59 @@ +name: Build ESP32-S3 + +on: + workflow_call: + inputs: + board: + required: true + type: string + +jobs: + build-esp32-s3: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build base + id: base + uses: ./.github/actions/setup-base + + - name: Pull web ui + uses: dsaltares/fetch-gh-release-asset@master + with: + repo: "meshtastic/web" + file: "build.tar" + target: "build.tar" + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Unpack web ui + run: | + tar -xf build.tar -C data/static + rm build.tar + - name: Remove debug flags for release + if: ${{ github.event_name == 'workflow_dispatch' }} + run: | + sed -i '/DDEBUG_HEAP/d' ./arch/esp32/esp32.ini + sed -i '/DDEBUG_HEAP/d' ./arch/esp32/esp32s2.ini + sed -i '/DDEBUG_HEAP/d' ./arch/esp32/esp32s3.ini + - name: Build ESP32 + run: bin/build-esp32.sh ${{ inputs.board }} + + - name: Pull OTA Firmware + uses: dsaltares/fetch-gh-release-asset@master + with: + repo: "meshtastic/firmware-ota" + file: "firmware-s3.bin" + target: "release/bleota-s3.bin" + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Get release version string + shell: bash + run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT + id: version + + - name: Store binaries as an artifact + uses: actions/upload-artifact@v3 + with: + name: firmware-${{ inputs.board }}-${{ steps.version.outputs.version }}.zip + path: | + release/*.bin + release/*.elf