2022-11-19 22:03:55 +00:00
|
|
|
name: Build ESP32
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
inputs:
|
|
|
|
board:
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
|
2023-01-21 15:17:08 +00:00
|
|
|
jobs:
|
2022-11-19 22:03:55 +00:00
|
|
|
build-esp32:
|
|
|
|
runs-on: ubuntu-latest
|
2022-11-19 23:43:18 +00:00
|
|
|
steps:
|
2022-11-20 00:42:27 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-11-20 00:07:07 +00:00
|
|
|
- name: Build base
|
|
|
|
id: base
|
2022-11-20 01:23:35 +00:00
|
|
|
uses: ./.github/actions/setup-base
|
2022-11-19 22:03:55 +00:00
|
|
|
|
2022-11-19 23:43:18 +00:00
|
|
|
- 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 }}
|
2022-11-19 22:03:55 +00:00
|
|
|
|
2022-11-19 23:43:18 +00:00
|
|
|
- name: Unpack web ui
|
|
|
|
run: |
|
|
|
|
tar -xf build.tar -C data/static
|
|
|
|
rm build.tar
|
2022-11-19 22:03:55 +00:00
|
|
|
|
2023-01-12 15:33:55 +00:00
|
|
|
- name: Remove debug flags for release
|
|
|
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
2023-01-21 15:17:08 +00:00
|
|
|
run: |
|
2023-01-12 15:33:55 +00:00
|
|
|
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
|
|
|
|
|
2022-11-19 23:43:18 +00:00
|
|
|
- name: Build ESP32
|
|
|
|
run: bin/build-esp32.sh ${{ inputs.board }}
|
2022-11-19 22:03:55 +00:00
|
|
|
|
2022-11-19 23:43:18 +00:00
|
|
|
- name: Pull OTA Firmware
|
|
|
|
uses: dsaltares/fetch-gh-release-asset@master
|
|
|
|
with:
|
|
|
|
repo: "meshtastic/firmware-ota"
|
|
|
|
file: "firmware.bin"
|
|
|
|
target: "release/bleota.bin"
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2023-01-21 15:17:08 +00:00
|
|
|
|
2022-11-20 01:23:35 +00:00
|
|
|
- name: Get release version string
|
|
|
|
shell: bash
|
|
|
|
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
|
|
|
id: version
|
2022-11-19 22:03:55 +00:00
|
|
|
|
2022-11-19 23:43:18 +00:00
|
|
|
- name: Store binaries as an artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2022-11-20 01:23:35 +00:00
|
|
|
name: firmware-${{ inputs.board }}-${{ steps.version.outputs.version }}.zip
|
2022-11-19 23:43:18 +00:00
|
|
|
path: |
|
|
|
|
release/*.bin
|
|
|
|
release/*.elf
|