89 lines
3.2 KiB
YAML
89 lines
3.2 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- '**.md'
|
|
- 'circuit'
|
|
|
|
|
|
#env:
|
|
# UPLOAD_USER_FIRMWARE: false
|
|
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-20.04
|
|
continue-on-error: false
|
|
strategy:
|
|
matrix:
|
|
target-hardware: [esp32c3,esp32]
|
|
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
# - name: Generate release tag
|
|
# id: tag
|
|
# if: env.UPLOAD_USER_FIRMWARE == 'true' && steps.script.outputs.status == 'success' && !cancelled()
|
|
# run: |
|
|
# echo "::set-output name=release_tag::UserBuild_$(date +"%Y.%m.%d_%H-%M")"
|
|
# echo "::set-output name=status::success"
|
|
|
|
|
|
- name: Build for esp32/esp32c3
|
|
if: matrix.target-hardware != 'esp8266'
|
|
uses: espressif/esp-idf-ci-action@v1
|
|
with:
|
|
esp_idf_version: v5.2.1
|
|
target: ${{ matrix.target-hardware }}
|
|
path: './'
|
|
|
|
# - name: Merge bin files (esp32)
|
|
# if: matrix.target-hardware == 'esp32'
|
|
# run: |
|
|
# git clone https://github.com/espressif/esptool.git
|
|
# git -C ./esptool/ checkout tags/v4.7.0 -b merge_wirless_bin
|
|
# sudo python3 ./esptool/esptool.py --chip ${{ matrix.target-hardware }} merge_bin -o build/wireless_esp_dap_full.bin 0x1000 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0x10000 build/wireless_tools_esp32.bin
|
|
# sudo mv build/wireless_tools_esp32.bin build/wireless_esp_dap_app.bin
|
|
|
|
# - name: Merge bin files (esp32c3)
|
|
# if: matrix.target-hardware == 'esp32c3'
|
|
# run: |
|
|
# git clone https://github.com/espressif/esptool.git
|
|
# git -C ./esptool/ checkout tags/v4.7.0 -b merge_wirless_bin
|
|
# sudo python3 ./esptool/esptool.py --chip ${{ matrix.target-hardware }} merge_bin -o build/wireless_esp_dap_full.bin 0x0 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0x10000 build/wireless_tools_esp32.bin
|
|
# sudo mv build/wireless_tools_esp32.bin build/wireless_esp_dap_app.bin
|
|
|
|
- name: merge bin files (esp32)
|
|
if: matrix.target-hardware == 'esp32'
|
|
uses: espressif/esp-idf-ci-action@v1
|
|
with:
|
|
esp_idf_version: v5.2.1
|
|
target: ${{ matrix.target-hardware }}
|
|
path: './'
|
|
command: esptool.py --chip ${{ matrix.target-hardware }} merge_bin -o build/wireless_tools_esp32_full.bin 0x1000 build/bootloader/bootloader.bin 0xF000 build/partition_table/partition-table.bin 0x20000 build/wireless_tools_esp32.bin
|
|
|
|
|
|
- name: merge bin files (esp32c3)
|
|
if: matrix.target-hardware == 'esp32c3'
|
|
uses: espressif/esp-idf-ci-action@v1
|
|
with:
|
|
esp_idf_version: v5.2.1
|
|
target: ${{ matrix.target-hardware }}
|
|
path: './'
|
|
command: esptool.py --chip ${{ matrix.target-hardware }} merge_bin -o build/wireless_tools_esp32_full.bin 0x0 build/bootloader/bootloader.bin 0xF000 build/partition_table/partition-table.bin 0x20000 build/wireless_tools_esp32.bin
|
|
|
|
|
|
- name: Upload firmware
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: firmware_${{ matrix.target-hardware }}.zip
|
|
path: |
|
|
build/wireless_tools_esp32_full.bin
|
|
build/wireless_tools_esp32.bin
|
|
build/bootloader/bootloader.bin
|
|
build/partition_table/partition-table.bin
|