From 6c7edce76cadb2c54dae5c9d6e48c78e50aa815d Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 8 Oct 2025 08:39:24 -0500 Subject: [PATCH] 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 --- .github/workflows/code_size.yml | 24 ++++++++++++++++++++++++ .github/workflows/ports_esp32.yml | 2 ++ tools/ci.sh | 2 +- 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/.github/workflows/code_size.yml b/.github/workflows/code_size.yml index 7d3329613f..066f6806c4 100644 --- a/.github/workflows/code_size.yml +++ b/.github/workflows/code_size.yml @@ -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 diff --git a/.github/workflows/ports_esp32.yml b/.github/workflows/ports_esp32.yml index 92ac6df3b6..87ab6dbe35 100644 --- a/.github/workflows/ports_esp32.yml +++ b/.github/workflows/ports_esp32.yml @@ -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: diff --git a/tools/ci.sh b/tools/ci.sh index 8b12225660..85d736552a 100755 --- a/tools/ci.sh +++ b/tools/ci.sh @@ -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"