Add ESP-IDF native build check workflow #11
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 ENVIII(arduino-m5stack) | |
| env: | |
| SKETCH_NAMES_FIND_START: ./examples/UnitUnified/UnitENVIII | |
| REQUIRED_LIBRARIES: M5Unified,M5UnitUnified,BME68x Sensor library,bsec2 | |
| on: | |
| push: | |
| tags-ignore: | |
| - '*.*.*' | |
| - 'v*.*.*' | |
| branches: | |
| - '*' | |
| paths: | |
| - 'src/**.cpp' | |
| - 'src/**.hpp' | |
| - 'src/**.h' | |
| - 'src/**.c' | |
| - 'examples/UnitUnified/UnitENVIII/**.ino' | |
| - 'examples/UnitUnified/UnitENVIII/**.cpp' | |
| - 'examples/UnitUnified/UnitENVIII/**.hpp' | |
| - 'examples/UnitUnified/UnitENVIII/**.h' | |
| - 'examples/UnitUnified/UnitENVIII/**.c' | |
| - '.github/workflows/arduino-env3-m5-build-check.yml' | |
| pull_request: | |
| paths: | |
| - 'src/**.cpp' | |
| - 'src/**.hpp' | |
| - 'src/**.h' | |
| - 'src/**.c' | |
| - 'examples/UnitUnified/UnitENVIII/**.ino' | |
| - 'examples/UnitUnified/UnitENVIII/**.cpp' | |
| - 'examples/UnitUnified/UnitENVIII/**.hpp' | |
| - 'examples/UnitUnified/UnitENVIII/**.h' | |
| - 'examples/UnitUnified/UnitENVIII/**.c' | |
| - '.github/workflows/arduino-env3-m5-build-check.yml' | |
| workflow_dispatch: | |
| defaults: | |
| run: | |
| shell: bash | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: ${{ matrix.build-properties }}:${{ matrix.sketch }}:${{matrix.board}}@${{matrix.platform-version}} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 12 | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 20 | |
| matrix: | |
| platform-url: | |
| - https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json | |
| sketch: | |
| - PlotToSerial | |
| board: | |
| # Reduced from 21 -> 8 boards (chip-arch representatives + distinct FQBN build properties). | |
| # Library code is selected by M5.getBoard() at runtime; pure variant-header siblings compile identically. | |
| # chip-arch representatives: | |
| - m5stack_core # ESP32 (xtensa) representative; bsec2-included BME688 build | |
| - m5stack_cores3 # ESP32-S3 (xtensa-s3) representative; separate GCC target | |
| - m5stack_nano_c6 # ESP32-C6 (rv32) representative; bsec2 excluded | |
| - m5stack_tab5 # ESP32-P4 (rv32 single-float FPU) representative; bsec2 excluded | |
| # distinct build-property S3 boards: their board-config compile is already covered by the | |
| # arduino-m5 main matrix (other units); ENV3 code is variant-independent, so this ENV3-only | |
| # workflow keeps chip-arch representatives only (aligned with arduino-env3-esp-v3): | |
| # - m5stack_atoms3r # ESP32-S3: represented by m5stack_cores3 | |
| # - m5stack_cardputer # ESP32-S3: represented by m5stack_cores3 | |
| # - m5stack_papers3 # ESP32-S3: represented by m5stack_cores3 | |
| # - m5stack_sticks3 # ESP32-S3: represented by m5stack_cores3 | |
| # commented-out siblings (variant-header only, same compile config): | |
| # - arduino_nesso_n1 # ESP32-C6: represented by m5stack_nano_c6 (Hat path covered in include below) | |
| # - m5stack_atom # ESP32: represented by m5stack_core | |
| # - m5stack_atoms3 # ESP32-S3: represented by m5stack_cores3 | |
| # - m5stack_capsule # ESP32-S3: represented by m5stack_cores3 | |
| # - m5stack_core2 # ESP32: represented by m5stack_core | |
| # - m5stack_coreink # ESP32: represented by m5stack_core | |
| # - m5stack_dial # ESP32-S3: represented by m5stack_cores3 | |
| # - m5stack_dinmeter # ESP32-S3: represented by m5stack_cores3 | |
| # - m5stack_fire # ESP32: represented by m5stack_core | |
| # - m5stack_paper # ESP32: represented by m5stack_core | |
| # - m5stack_stamp_s3 # ESP32-S3: represented by m5stack_cores3 | |
| # - m5stack_stickc # ESP32: represented by m5stack_core | |
| # - m5stack_stickc_plus # ESP32: represented by m5stack_core | |
| # - m5stack_stickc_plus2 # ESP32: represented by m5stack_core | |
| platform-version: | |
| - 3.2.5 | |
| platform: | |
| - m5stack | |
| archi: | |
| - esp32 | |
| build-properties: | |
| - "-DUSING_UNIT_ENV3" | |
| include: | |
| # HatENV3 (#if USING_HAT_ENV3 -> addHatI2C path). Reduced from 5 -> 1 board. | |
| # StickC-family Hat representative; siblings differ only by variant header (same Hat compile config). | |
| - sketch: PlotToSerial | |
| platform-url: https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json | |
| platform-version: 3.2.5 | |
| platform: m5stack | |
| archi: esp32 | |
| board: m5stack_stickc_plus | |
| build-properties: "-DUSING_HAT_ENV3" | |
| # commented-out HatENV3 siblings (variant-header only, same compile config): | |
| # - board: m5stack_stickc_plus2 # ESP32 StickC family: represented by m5stack_stickc_plus | |
| # - board: m5stack_sticks3 # ESP32-S3 StickC family: represented by m5stack_stickc_plus | |
| # - board: m5stack_coreink # ESP32 StickC-form Hat: represented by m5stack_stickc_plus | |
| # - board: arduino_nesso_n1 # ESP32-C6 Hat: represented by m5stack_stickc_plus | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Prepare libraries list | |
| id: libs | |
| run: | | |
| { | |
| echo "yaml<<EOF" | |
| echo "$REQUIRED_LIBRARIES" | tr ',' '\n' | while read -r lib; do | |
| echo "- name: $lib" | |
| done | |
| echo "- source-path: ./" | |
| echo "EOF" | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Compile examples | |
| uses: arduino/compile-sketches@v1 | |
| with: | |
| fqbn: ${{ matrix.platform }}:${{ matrix.archi }}:${{ matrix.board }} | |
| platforms: | | |
| - name: ${{ matrix.platform }}:${{ matrix.archi }} | |
| source-url: ${{ matrix.platform-url }} | |
| version: ${{ matrix.platform-version }} | |
| libraries: ${{ steps.libs.outputs.yaml }} | |
| sketch-paths: | | |
| - ${{ env.SKETCH_NAMES_FIND_START }}/${{ matrix.sketch }} | |
| cli-compile-flags: | | |
| - --build-property | |
| - build.extra_flags=${{ matrix.build-properties }} |