|
| 1 | +name: Build(esp-idf-native) |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags-ignore: |
| 6 | + - '*.*.*' |
| 7 | + - 'v*.*.*' |
| 8 | + branches: |
| 9 | + - '*' |
| 10 | + paths: |
| 11 | + - 'src/**.cpp' |
| 12 | + - 'src/**.hpp' |
| 13 | + - 'src/**.h' |
| 14 | + - 'src/**.c' |
| 15 | + - 'CMakeLists.txt' |
| 16 | + - 'idf_component.yml' |
| 17 | + - 'examples/UnitUnified/**.cpp' |
| 18 | + - 'examples/UnitUnified/**.hpp' |
| 19 | + - 'examples/UnitUnified/**.h' |
| 20 | + - 'examples/UnitUnified/**.c' |
| 21 | + - 'examples/UnitUnified/**/CMakeLists.txt' |
| 22 | + - 'examples/UnitUnified/**/Kconfig.projbuild' |
| 23 | + - 'examples/UnitUnified/common/**' |
| 24 | + - '.github/workflows/esp-idf-build-check.yml' |
| 25 | + pull_request: |
| 26 | + paths: |
| 27 | + - 'src/**.cpp' |
| 28 | + - 'src/**.hpp' |
| 29 | + - 'src/**.h' |
| 30 | + - 'src/**.c' |
| 31 | + - 'CMakeLists.txt' |
| 32 | + - 'idf_component.yml' |
| 33 | + - 'examples/UnitUnified/**.cpp' |
| 34 | + - 'examples/UnitUnified/**.hpp' |
| 35 | + - 'examples/UnitUnified/**.h' |
| 36 | + - 'examples/UnitUnified/**.c' |
| 37 | + - 'examples/UnitUnified/**/CMakeLists.txt' |
| 38 | + - 'examples/UnitUnified/**/Kconfig.projbuild' |
| 39 | + - 'examples/UnitUnified/common/**' |
| 40 | + - '.github/workflows/esp-idf-build-check.yml' |
| 41 | + workflow_dispatch: |
| 42 | + |
| 43 | +defaults: |
| 44 | + run: |
| 45 | + shell: bash |
| 46 | + |
| 47 | +concurrency: |
| 48 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 49 | + cancel-in-progress: true |
| 50 | + |
| 51 | +# Cross design: variant coverage on esp32s3, chip coverage on the other SoCs with the default |
| 52 | +# UART variant (UnitFinger). UnitFinger PlotToSerial gets all three FPC1020A wirings |
| 53 | +# (Unit / Hat / Faces); the other UnitFinger examples compile with the default variant only. |
| 54 | +# UnitFinger2 has a single unit/wiring variant (no Kconfig choice), so its examples build |
| 55 | +# without a variant selection and only on esp32s3 — the FPC1020A chip job covers the SoCs. |
| 56 | +jobs: |
| 57 | + # Variant coverage: every example / wiring variant on esp32s3 (LCD-capable dual-core Xtensa with PSRAM). |
| 58 | + build-variants: |
| 59 | + name: ${{ matrix.idf }} esp32s3 ${{ matrix.example_config.label }} |
| 60 | + runs-on: ubuntu-latest |
| 61 | + timeout-minutes: 30 |
| 62 | + strategy: |
| 63 | + fail-fast: false |
| 64 | + max-parallel: 20 |
| 65 | + matrix: |
| 66 | + # idf boundaries: 5.1.7 = oldest legacy-driver (5.0.x dropped: M5GFX needs esp_mm added |
| 67 | + # in 5.1), 5.4.4 = new driver/*_master.h + touch_sens.h era, 5.5.4 = latest. |
| 68 | + idf: [v5.1.7, v5.4.4, v5.5.4] |
| 69 | + # Cross design: PlotToSerial gets all three FPC1020A variants — primary example. |
| 70 | + # Capture / Characteristic / User compile with the default UnitFinger variant only. |
| 71 | + example_config: |
| 72 | + - label: UnitFinger-PlotToSerial-Unit (full) |
| 73 | + example_path: examples/UnitUnified/UnitFinger/PlotToSerial |
| 74 | + variant: USING_UNIT_FINGER |
| 75 | + - label: UnitFinger-PlotToSerial-Hat (full) |
| 76 | + example_path: examples/UnitUnified/UnitFinger/PlotToSerial |
| 77 | + variant: USING_HAT_FINGER |
| 78 | + - label: UnitFinger-PlotToSerial-Faces (full) |
| 79 | + example_path: examples/UnitUnified/UnitFinger/PlotToSerial |
| 80 | + variant: USING_FACES_FINGER |
| 81 | + - label: UnitFinger-Capture-Unit |
| 82 | + example_path: examples/UnitUnified/UnitFinger/Capture |
| 83 | + variant: USING_UNIT_FINGER |
| 84 | + - label: UnitFinger-Characteristic-Unit |
| 85 | + example_path: examples/UnitUnified/UnitFinger/Characteristic |
| 86 | + variant: USING_UNIT_FINGER |
| 87 | + - label: UnitFinger-User-Unit |
| 88 | + example_path: examples/UnitUnified/UnitFinger/User |
| 89 | + variant: USING_UNIT_FINGER |
| 90 | + - label: UnitFinger2-PlotToSerial |
| 91 | + example_path: examples/UnitUnified/UnitFinger2/PlotToSerial |
| 92 | + variant: '' |
| 93 | + - label: UnitFinger2-Automatic |
| 94 | + example_path: examples/UnitUnified/UnitFinger2/Automatic |
| 95 | + variant: '' |
| 96 | + - label: UnitFinger2-Capture |
| 97 | + example_path: examples/UnitUnified/UnitFinger2/Capture |
| 98 | + variant: '' |
| 99 | + - label: UnitFinger2-User |
| 100 | + example_path: examples/UnitUnified/UnitFinger2/User |
| 101 | + variant: '' |
| 102 | + steps: |
| 103 | + - name: Checkout |
| 104 | + uses: actions/checkout@v4 |
| 105 | + |
| 106 | + - name: Select Kconfig variant |
| 107 | + # The example's own sdkconfig.defaults is not read (top CMakeLists points SDKCONFIG_DEFAULTS |
| 108 | + # at common/sdkconfig.defaults). Append the choice to common/ in the CI workspace only. |
| 109 | + # UnitFinger2 has no variant choice, so the step is skipped for its examples. |
| 110 | + if: matrix.example_config.variant != '' |
| 111 | + run: | |
| 112 | + echo "" >> examples/UnitUnified/common/sdkconfig.defaults |
| 113 | + echo "CONFIG_EXAMPLE_${{ matrix.example_config.variant }}=y" >> examples/UnitUnified/common/sdkconfig.defaults |
| 114 | +
|
| 115 | + - name: ESP-IDF build |
| 116 | + uses: espressif/esp-idf-ci-action@v1 |
| 117 | + with: |
| 118 | + esp_idf_version: ${{ matrix.idf }} |
| 119 | + target: esp32s3 |
| 120 | + path: ${{ matrix.example_config.example_path }} |
| 121 | + |
| 122 | + # Chip coverage: UnitFinger PlotToSerial (default UART variant) on every other supported SoC. |
| 123 | + # esp32 = classic Xtensa dual-core (M5Unified touch-deprecation path). esp32c3 / esp32c6 / |
| 124 | + # esp32h2 = RISC-V single-core, exercises the app_main CONFIG_FREERTOS_UNICORE feedIdle branch. |
| 125 | + # esp32p4 (M5Stack Tab5) = RISC-V dual-core; sdkconfig.defaults.esp32p4 overlay |
| 126 | + # (chip-rev minimum keys) is auto-applied. |
| 127 | + build-chips: |
| 128 | + name: ${{ matrix.idf }} ${{ matrix.target }} UnitFinger-PlotToSerial-Unit |
| 129 | + runs-on: ubuntu-latest |
| 130 | + timeout-minutes: 30 |
| 131 | + strategy: |
| 132 | + fail-fast: false |
| 133 | + max-parallel: 20 |
| 134 | + matrix: |
| 135 | + target: [esp32, esp32c3, esp32c6, esp32h2, esp32p4] |
| 136 | + idf: [v5.1.7, v5.4.4, v5.5.4] |
| 137 | + exclude: |
| 138 | + # esp32p4 stable from IDF v5.3 (M5GFX P4 verified on 5.4/5.5). 5.1.7 not applicable. |
| 139 | + - target: esp32p4 |
| 140 | + idf: v5.1.7 |
| 141 | + steps: |
| 142 | + - name: Checkout |
| 143 | + uses: actions/checkout@v4 |
| 144 | + |
| 145 | + - name: Select Kconfig variant |
| 146 | + run: | |
| 147 | + echo "" >> examples/UnitUnified/common/sdkconfig.defaults |
| 148 | + echo "CONFIG_EXAMPLE_USING_UNIT_FINGER=y" >> examples/UnitUnified/common/sdkconfig.defaults |
| 149 | +
|
| 150 | + - name: ESP-IDF build |
| 151 | + uses: espressif/esp-idf-ci-action@v1 |
| 152 | + with: |
| 153 | + esp_idf_version: ${{ matrix.idf }} |
| 154 | + target: ${{ matrix.target }} |
| 155 | + path: examples/UnitUnified/UnitFinger/PlotToSerial |
0 commit comments