Skip to content

Commit ec9c7c3

Browse files
authored
chore(CI): Update CI to build for each hardware target (#11)
1 parent ed3c302 commit ec9c7c3

File tree

5 files changed

+44
-15
lines changed

5 files changed

+44
-15
lines changed

.github/workflows/package_main.yml

Lines changed: 38 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -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:
6487
- uses: esp-cpp/[email protected]
6588
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'

sdkconfig.defaults.esp-box

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_HARDWARE_BOX=y

sdkconfig.defaults.esp32s3

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# on the ESP32S3, which has native USB, we need to set the console so that the
2+
# CLI can be configured correctly:
3+
CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y

sdkconfig.defaults.t-deck

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_HARDWARE_TDECK=y

sdkconfig.defaults.wrover-kit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_HARDWARE_WROVER_KIT=y

0 commit comments

Comments
 (0)