Skip to content

Commit 6c7edce

Browse files
jeplerdpgeorge
authored andcommitted
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>
1 parent 0aa6115 commit 6c7edce

3 files changed

Lines changed: 27 additions & 1 deletion

File tree

.github/workflows/code_size.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,30 @@ jobs:
3030
fetch-depth: 100
3131
- name: Install packages
3232
run: tools/ci.sh code_size_setup
33+
34+
# Needs to be kept in synch with ports_esp32.yml
35+
- id: idf_ver
36+
name: Read the ESP-IDF version (including Python version) and set outputs.IDF_VER
37+
run: tools/ci.sh esp32_idf_ver | tee "${GITHUB_OUTPUT}"
38+
- name: Cached ESP-IDF install
39+
id: cache_esp_idf
40+
uses: actions/cache@v4
41+
with:
42+
path: |
43+
./esp-idf/
44+
~/.espressif/
45+
!~/.espressif/dist/
46+
~/.cache/pip/
47+
key: esp-idf-${{ steps.idf_ver.outputs.IDF_VER }}
48+
- name: Install ESP-IDF packages
49+
if: steps.cache_esp_idf.outputs.cache-hit != 'true'
50+
run: tools/ci.sh esp32_idf_setup
51+
52+
- name: ccache
53+
uses: hendrikmuhs/ccache-action@v1.2
54+
with:
55+
key: code_size
56+
3357
- name: Build
3458
run: tools/ci.sh code_size_build
3559
- name: Compute code size difference

.github/workflows/ports_esp32.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
steps:
3636
- uses: actions/checkout@v6
3737

38+
# Needs to be kept in synch with code_size.yml
3839
- id: idf_ver
3940
name: Read the ESP-IDF version (including Python version) and set outputs.IDF_VER
4041
run: tools/ci.sh esp32_idf_ver | tee "${GITHUB_OUTPUT}"
@@ -54,6 +55,7 @@ jobs:
5455
if: steps.cache_esp_idf.outputs.cache-hit != 'true'
5556
run: tools/ci.sh esp32_idf_setup
5657

58+
# Needs to be kept in synch with code_size.yml
5759
- name: ccache
5860
uses: hendrikmuhs/ccache-action@v1.2
5961
with:

tools/ci.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function _ci_is_git_merge {
8787
function ci_code_size_build {
8888
# check the following ports for the change in their code size
8989
# Override the list by setting PORTS_TO_CHECK in the environment before invoking ci.
90-
: ${PORTS_TO_CHECK:=bmusxpdv}
90+
: ${PORTS_TO_CHECK:=bmus3xpdv}
9191

9292
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"
9393

0 commit comments

Comments
 (0)