Skip to content

add esp32 for build examples workflow #29

add esp32 for build examples workflow

add esp32 for build examples workflow #29

name: Compile examples foolder
on: [push, pull_request]
jobs:
build-arduino:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: arduino/compile-sketches@v1
with:
libraries: |
- source-path: ./
sketch-paths:
./examples/Arduino_example/Arduino_example.ino
build-esp8266:
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, 'esp8266')
strategy:
fail-fast: false
matrix:
board:
- fqbn: esp8266:esp8266:nodemcu
- fqbn: esp8266:esp8266:d1_mini
core:
- version: 3.1.2
- version: 3.0.2
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Compile ESP8266 examples
uses: arduino/compile-sketches@v1
with:
platforms: |
- name: esp8266:esp8266
source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json
version: ${{ matrix.core.version }}
fqbn: ${{ matrix.board.fqbn }}
libraries: |
- source-path: ./
sketch-paths:
./examples/ESP8266_example/ESP8266_example.ino
build-esp32:
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, 'esp32')
strategy:
fail-fast: false
matrix:
idf_ver: ["release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3", "latest"]
idf_target: ["esp32", "esp32s2", "esp32s3", "esp32c2", "esp32c3"]
container: espressif/idf:${{ matrix.idf_ver }}
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: esp-idf build
env:
IDF_TARGET: ${{ matrix.idf_target }}
shell: bash
working-directory: examples/ESP8266_example
run: |
. ${IDF_PATH}/export.sh
export PEDANTIC_FLAGS="-DIDF_CI_BUILD -Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function"
export EXTRA_CFLAGS="${PEDANTIC_FLAGS} -Wstrict-prototypes"
export EXTRA_CXXFLAGS="${PEDANTIC_FLAGS}"
idf.py build