Skip to content

Fixes workflow

Fixes workflow #54

name: Build(arduino-esp32:2.x)
env:
SKETCH_NAMES_FIND_START: ./examples/UnitUnified
REQUIRED_LIBRARIES: M5Unified,M5UnitUnified
on:
push:
tags-ignore:
- '*.*.*'
- 'v*.*.*'
branches:
- '*'
paths:
- 'src/**.cpp'
- 'src/**.hpp'
- 'src/**.h'
- 'src/**.c'
- 'examples/UnitUnified/**.ino'
- 'examples/UnitUnified/**.cpp'
- 'examples/UnitUnified/**.hpp'
- 'examples/UnitUnified/**.h'
- 'examples/UnitUnified/**.c'
- '.github/workflows/arduino-esp-v2-build-check.yml'
pull_request:
paths:
- 'src/**.cpp'
- 'src/**.hpp'
- 'src/**.h'
- 'src/**.c'
- 'examples/UnitUnified/**.ino'
- 'examples/UnitUnified/**.cpp'
- 'examples/UnitUnified/**.hpp'
- 'examples/UnitUnified/**.h'
- 'examples/UnitUnified/**.c'
- '.github/workflows/arduino-esp-v2-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: ${{ github.event.repository.private && 'self-hosted' || 'ubuntu-latest' }}
timeout-minutes: 12
strategy:
fail-fast: false
max-parallel: 20
matrix:
platform-url:
- https://espressif.github.io/arduino-esp32/package_esp32_index.json
sketch:
- PlotToSerial
board:
# TODO: Restore full board list after CI validation
#- m5stack-atom
#- m5stack-atoms3
- m5stack-core-esp32
#- m5stack-core2
#- m5stack-coreink
#- m5stack-cores3
#- m5stack-fire
platform-version:
- 2.0.17
platform:
- esp32
archi:
- esp32
build-properties:
# TODO: Restore full build-properties after CI validation
- "-DUSING_UNIT_CARDKB"
#- "-DUSING_UNIT_CARDKB2 -DUSING_I2C_FOR_CARDKB2"
#- "-DUSING_UNIT_CARDKB2 -DUSING_UART_FOR_CARDKB2"
#- "-DUSING_UNIT_FACES_QWERTY"
#exclude:
# - board: m5stack-atom
# build-properties: "-DUSING_UNIT_FACES_QWERTY"
# - board: m5stack-atoms3
# build-properties: "-DUSING_UNIT_FACES_QWERTY"
# - board: m5stack-coreink
# build-properties: "-DUSING_UNIT_FACES_QWERTY"
#include:
# # SimpleDisplay: Core only
# - sketch: SimpleDisplay
# board: m5stack-core-esp32
# platform-version: 2.0.17
# platform: esp32
# archi: esp32
# platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
# build-properties: "-DUSING_UNIT_CARDKB"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python (self-hosted)
if: github.event.repository.private
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install yq (self-hosted)
if: github.event.repository.private
run: |
pip uninstall -y yq 2>/dev/null || true
mkdir -p $HOME/.local/bin
wget -qO $HOME/.local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
chmod +x $HOME/.local/bin/yq
echo "$HOME/.local/bin" >> $GITHUB_PATH
- 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: |
- source-url: https://github.com/m5stack/M5Unified.git
- source-url: https://github.com/m5stack/M5GFX.git
- source-url: https://github.com/m5stack/M5UnitUnified.git
- source-url: https://github.com/m5stack/M5HAL.git
- source-url: https://github.com/m5stack/M5Utility.git
- source-path: ./
sketch-paths: |
- examples/UnitUnified/${{ matrix.sketch }}
cli-compile-flags: |
- --build-property
- build.extra_flags=${{ matrix.build-properties }}