github/workflows: Add esp32 to code size report.

Add an esp32 build (specifically ESP32_GENERIC) to the CI code-size check.
Multiple new steps must be done to prepare for building esp32, and caching
is used to speed up both the install of the IDF and the build process.

Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This commit is contained in:
Jeff Epler
2025-10-08 08:39:24 -05:00
committed by Damien George
parent 0aa6115aac
commit 6c7edce76c
3 changed files with 27 additions and 1 deletions

View File

@@ -30,6 +30,30 @@ jobs:
fetch-depth: 100
- name: Install packages
run: tools/ci.sh code_size_setup
# Needs to be kept in synch with ports_esp32.yml
- id: idf_ver
name: Read the ESP-IDF version (including Python version) and set outputs.IDF_VER
run: tools/ci.sh esp32_idf_ver | tee "${GITHUB_OUTPUT}"
- name: Cached ESP-IDF install
id: cache_esp_idf
uses: actions/cache@v4
with:
path: |
./esp-idf/
~/.espressif/
!~/.espressif/dist/
~/.cache/pip/
key: esp-idf-${{ steps.idf_ver.outputs.IDF_VER }}
- name: Install ESP-IDF packages
if: steps.cache_esp_idf.outputs.cache-hit != 'true'
run: tools/ci.sh esp32_idf_setup
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: code_size
- name: Build
run: tools/ci.sh code_size_build
- name: Compute code size difference

View File

@@ -35,6 +35,7 @@ jobs:
steps:
- uses: actions/checkout@v6
# Needs to be kept in synch with code_size.yml
- id: idf_ver
name: Read the ESP-IDF version (including Python version) and set outputs.IDF_VER
run: tools/ci.sh esp32_idf_ver | tee "${GITHUB_OUTPUT}"
@@ -54,6 +55,7 @@ jobs:
if: steps.cache_esp_idf.outputs.cache-hit != 'true'
run: tools/ci.sh esp32_idf_setup
# Needs to be kept in synch with code_size.yml
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:

View File

@@ -87,7 +87,7 @@ function _ci_is_git_merge {
function ci_code_size_build {
# check the following ports for the change in their code size
# Override the list by setting PORTS_TO_CHECK in the environment before invoking ci.
: ${PORTS_TO_CHECK:=bmusxpdv}
: ${PORTS_TO_CHECK:=bmus3xpdv}
SUBMODULES="lib/asf4 lib/berkeley-db-1.xx lib/btstack lib/cyw43-driver lib/lwip lib/mbedtls lib/micropython-lib lib/nxp_driver lib/pico-sdk lib/stm32lib lib/tinyusb"