Files
micropython/.github/workflows/ports_esp32.yml
T
Angus Gratton 2ccf78ae19 ci,esp32: Build oldest & newest ESP-IDF versions in CI.
Intended to catch problems where new features don't build
in old ESP-IDF.

Includes major refactor to the GitHub Actions Workflow for
esp32 port, including making a reusable workflow for both
Code Size and ESP32 build jobs.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2026-03-20 12:42:52 +11:00

64 lines
1.7 KiB
YAML

name: esp32 port
on:
push:
pull_request:
paths:
- '.github/workflows/*.yml'
- 'tools/**'
- 'py/**'
- 'extmod/**'
- 'shared/**'
- 'lib/**'
- 'drivers/**'
- 'ports/esp32/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
# Oldest and newest supported ESP-IDF versions, should match ports/esp32/README.md
IDF_OLDEST_VER: &oldest "v5.3"
IDF_NEWEST_VER: &newest "v5.5.1"
jobs:
build_idf:
strategy:
fail-fast: false
matrix:
idf_ver:
- *oldest
- *newest
ci_func: # names are functions in ci.sh
- esp32_build_cmod_spiram_s2
- esp32_build_s3_c3
- esp32_build_c2_c5_c6
- esp32_build_p4
exclude:
# Exclude some jobs on the oldest IDF version, to save resources
- idf_ver: *oldest
ci_func: esp32_build_c2_c5_c6
- idf_ver: *oldest
ci_func: esp32_build_p4
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
# Only the newest IDF version will build the ESP-IDF lockfiles correctly,
# so we need to disable MICROPY_MAINTAINER_BUILD on older versions.
- name: Disable extra checks for older ESP-IDF
id: check_newest_ver
if: ${{ matrix.idf_ver != env.IDF_NEWEST_VER }}
run: echo "MICROPY_MAINTAINER_BUILD=0" >> ${GITHUB_ENV}
- name: Setup ESP-IDF
uses: ./.github/actions/setup_esp32
with:
idf_ver: ${{ matrix.idf_ver }}
ccache_key: ${{ matrix.ci_func }}
- name: Build ci_${{matrix.ci_func }} on ESP-IDF ${{ matrix.idf_ver }}
run: tools/ci.sh ${{ matrix.ci_func }}