@@ -13,26 +13,41 @@ jobs:
1313 runs-on : ubuntu-latest
1414 continue-on-error : false
1515
16- outputs :
17- zipfile-id : ${{ steps.zip_step.outputs.artifact-id }}
16+ strategy :
17+ matrix :
18+ build :
19+ # main (full) code
20+ - name : ' esp-box'
21+ target : esp32s3
22+ command : |
23+ idf.py -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.defaults.esp-box" build
24+ - name : ' t-deck'
25+ target : esp32s3
26+ command : |
27+ idf.py -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.defaults.t-deck" build
28+ - name : ' wrover-kit'
29+ target : esp32
30+ command : |
31+ idf.py -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.defaults.wrover-kit" build
1832
1933 steps :
2034 - name : Checkout repo
2135 uses : actions/checkout@v4
36+ with :
37+ fetch-tags : true
2238
2339 - name : Build Main Code
2440 uses : espressif/esp-idf-ci-action@v1
2541 with :
2642 esp_idf_version : release-v5.4
27- target : esp32s3
43+ target : ${{ matrix.build.target }}
2844 path : ' .'
29- command : ' idf.py build'
45+ command : ${{ matrix. build.command }}
3046
3147 - name : Upload Build Outputs
3248 uses : actions/upload-artifact@v4
33- id : zip_step
3449 with :
35- name : build-artifacts
50+ name : ${{ matrix.build.name }}- build-artifacts
3651 path : |
3752 build/*.bin
3853 build/*.elf
@@ -41,27 +56,35 @@ jobs:
4156 build/flasher_args.json
4257 build/flash_args
4358
59+ - name : Zip up build files for release using matrix build name + release tag name
60+ if : ${{ github.event.release && github.event.action == 'published' }}
61+ shell : bash
62+ run : |
63+ # zip up just the files we uploaded for the release
64+ zip_name="wireless-debug-display-${{ matrix.build.name }}_$(git describe --tags --dirty).zip"
65+ cd ${{ matrix.build.path }}
66+ 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
67+ echo "artifact_path=${{ matrix.build.path }}/$zip_name" >> "$GITHUB_ENV"
68+
4469 - name : Attach files to release
4570 uses : softprops/action-gh-release@v2
4671 if : ${{ github.event.release && github.event.action == 'published' }}
4772 with :
48- files : |
49- build/*.bin
50- build/*.elf
51- build/bootloader/bootloader.bin
52- build/partition_table/partition-table.bin
53- build/flasher_args.json
54- build/flash_args
73+ files : ${{ env.artifact_path }}
5574
5675 package :
5776 name : Package the binaries into an executables for Windows, MacOS, and Linux (Ubuntu)
5877 needs : build
5978 strategy :
6079 matrix :
6180 os : [windows-latest, macos-latest, ubuntu-latest]
81+ build :
82+ - name : ' esp-box'
83+ - name : ' t-deck'
84+ - name : ' wrover-kit'
6285 runs-on : ${{ matrix.os }}
6386 steps :
64876588 with :
66- zipfile-id : ${{ needs .build.outputs.zipfile-id }}
67- programmer-name : ' wireless-debug-display_programmer '
89+ zipfile-name : ' ${{ matrix .build.name }}-build-artifacts '
90+ programmer-name : ' wireless-debug-display-${{ matrix.build.name }}_programmer '
0 commit comments