chore: Update to use espp IDF components from component registry, als… #106
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Package Main | |
| on: | |
| push: | |
| branches: [main] | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| env: | |
| APP_NAME: 'Esp Box Emu' | |
| IDF_TARGET: 'esp32s3' | |
| IDF_VERSION: 'v5.5.1' | |
| IDF_COMPONENT_MANAGER: "1" # whether to enable the component manager or not | |
| FLASH_TOTAL_OVERRIDE: '6291456' # 6MB flash app partition for main app | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| continue-on-error: false | |
| outputs: | |
| zipfile-id: ${{ steps.zip_step.outputs.artifact-id }} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Build Main Code | |
| uses: espressif/esp-idf-ci-action@v1 | |
| with: | |
| esp_idf_version: ${{ env.IDF_VERSION }} | |
| target: ${{ env.IDF_TARGET }} | |
| path: '.' | |
| command: './patches.sh && idf.py build' | |
| - name: Zip up firmware binaries | |
| run: | | |
| # zip the firmware bin files and flash args | |
| zip -j -r firmware-binaries.zip build/esp-box-emu.bin build/bootloader/bootloader.bin build/partition_table/partition-table.bin build/flash_args build/flasher_args.json | |
| - name: Upload Build Outputs | |
| uses: actions/upload-artifact@v4 | |
| id: zip_step | |
| with: | |
| name: firmware-binaries | |
| path: | | |
| build/bootloader/bootloader.bin | |
| build/partition_table/partition-table.bin | |
| build/esp-box-emu.bin | |
| build/flasher_args.json | |
| build/flash_args | |
| - name: Attach files to release | |
| uses: softprops/action-gh-release@v2 | |
| if: ${{ github.event.release && github.event.action == 'published' }} | |
| with: | |
| files: firmware-binaries.zip | |
| - name: Determine Size Delta | |
| # only run this on the esp-box build and if the release is published | |
| if: ${{ github.event.release && github.event.action == 'published' }} | |
| uses: esp-cpp/esp-idf-size-delta@v1 | |
| with: | |
| app_name: ${{ env.APP_NAME }} | |
| app_path: "." | |
| idf_target: ${{ env.IDF_TARGET }} | |
| idf_version: ${{ env.IDF_VERSION }} | |
| idf_component_manager: ${{ env.IDF_COMPONENT_MANAGER }} | |
| flash_total_override: ${{ env.FLASH_TOTAL_OVERRIDE }} | |
| post_comment: 'false' | |
| package: | |
| name: Package the binaries into an executables for Windows, MacOS, and Linux (Ubuntu) | |
| needs: build | |
| strategy: | |
| matrix: | |
| os: [windows-latest, macos-latest, ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: esp-cpp/esp-packaged-programmer-action@v1.0.5 | |
| with: | |
| zipfile-id: ${{ needs.build.outputs.zipfile-id }} | |
| programmer-name: 'esp-box-emu_programmer' |