v2.1.1 #31
Workflow file for this run
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: 'Camera Display' | |
| IDF_VERSION: 'v5.5.1' | |
| IDF_COMPONENT_MANAGER: "1" # whether to enable the component manager or not | |
| FLASH_TOTAL_OVERRIDE: '4194304' # 4MB flash app partition for main app | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| continue-on-error: false | |
| strategy: | |
| matrix: | |
| build: | |
| # main (full) code | |
| - name: 'byte90' | |
| target: esp32s3 | |
| command: | | |
| idf.py -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.defaults.byte90" build | |
| - name: 'esp-box' | |
| target: esp32s3 | |
| command: | | |
| idf.py -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.defaults.esp-box" build | |
| - name: 't-deck' | |
| target: esp32s3 | |
| command: | | |
| idf.py -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.defaults.t-deck" build | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| fetch-tags: true | |
| ref: ${{ github.ref }} | |
| - name: Build Main Code | |
| uses: espressif/esp-idf-ci-action@v1 | |
| with: | |
| esp_idf_version: ${{ env.IDF_VERSION }} | |
| target: ${{ matrix.build.target }} | |
| path: '.' | |
| command: ${{ matrix.build.command }} | |
| - name: Upload Build Outputs | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.build.name }}-build-artifacts | |
| path: | | |
| build/*.bin | |
| build/*.elf | |
| build/bootloader/bootloader.bin | |
| build/partition_table/partition-table.bin | |
| build/flasher_args.json | |
| build/flash_args | |
| - name: Zip up build files for release using matrix build name + release tag name | |
| if: ${{ github.event.release && github.event.action == 'published' }} | |
| shell: bash | |
| run: | | |
| # zip up just the files we uploaded for the release | |
| zip_name="camera-display-${{ matrix.build.name }}_$(git describe --tags --dirty).zip" | |
| zip -r -j $zip_name build/*.bin build/*.elf build/bootloader/bootloader.bin build/partition_table/partition-table.bin build/flasher_args.json build/flash_args | |
| echo "artifact_path=$zip_name" >> "$GITHUB_ENV" | |
| - name: Attach files to release | |
| uses: softprops/action-gh-release@v2 | |
| if: ${{ github.event.release && github.event.action == 'published' }} | |
| with: | |
| files: ${{ env.artifact_path }} | |
| - 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' && matrix.build.name == 'esp-box' }} | |
| uses: esp-cpp/esp-idf-size-delta@v1 | |
| with: | |
| app_name: ${{ env.APP_NAME }} | |
| app_path: "." | |
| idf_target: ${{ matrix.build.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] | |
| build: | |
| - name: 'byte90' | |
| - name: 'esp-box' | |
| - name: 't-deck' | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: esp-cpp/esp-packaged-programmer-action@v1.0.5 | |
| with: | |
| zipfile-name: '${{ matrix.build.name }}-build-artifacts' | |
| programmer-name: 'camera-display-${{ matrix.build.name }}_programmer' |