summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAngus Gratton <angus@redyak.com.au>2023-11-29 15:39:10 +1100
committerDamien George <damien@micropython.org>2023-12-06 12:13:56 +1100
commitb6df8f84526bc1d32b419c1e4f706a9ec699957f (patch)
treea94ea54a467b6c05b16885f25c63f452a87b3ee1 /tools
parent9f620d28193709a5002a6f439b7495c9c3451792 (diff)
github/workflows: Use build matrix for esp32 port.
Allows splitting the esp32 job into multiple parts without too much boilerplate. The matrix is parameterised using the name of the function to call in tools/ci.sh, to minimise the dependency on GitHub Actions. This can get esp32 build times down around 3m if IDF is cached already. If the cache is cold, the cache preparation step on each job can double up against each other. However, restructuring the workflow to not do this seems either complex or requires copy-pasting the entire cache step. Signed-off-by: Angus Gratton <angus@redyak.com.au>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/ci.sh19
1 files changed, 15 insertions, 4 deletions
diff --git a/tools/ci.sh b/tools/ci.sh
index 34260334d..23fa38909 100755
--- a/tools/ci.sh
+++ b/tools/ci.sh
@@ -130,19 +130,30 @@ function ci_esp32_idf_setup {
./esp-idf/install.sh
}
-function ci_esp32_build {
+function ci_esp32_build_common {
source esp-idf/export.sh
make ${MAKEOPTS} -C mpy-cross
make ${MAKEOPTS} -C ports/esp32 submodules
+}
+
+function ci_esp32_build_cmod_s2 {
+ ci_esp32_build_common
+
make ${MAKEOPTS} -C ports/esp32 \
USER_C_MODULES=../../../examples/usercmodule/micropython.cmake \
FROZEN_MANIFEST=$(pwd)/ports/esp32/boards/manifest_test.py
- make ${MAKEOPTS} -C ports/esp32 BOARD=ESP32_GENERIC_C3
- make ${MAKEOPTS} -C ports/esp32 BOARD=ESP32_GENERIC_S2
- make ${MAKEOPTS} -C ports/esp32 BOARD=ESP32_GENERIC_S3
# Test building native .mpy with xtensawin architecture.
ci_native_mpy_modules_build xtensawin
+
+ make ${MAKEOPTS} -C ports/esp32 BOARD=ESP32_GENERIC_S2
+}
+
+function ci_esp32_build_s3_c3 {
+ ci_esp32_build_common
+
+ make ${MAKEOPTS} -C ports/esp32 BOARD=ESP32_GENERIC_S3
+ make ${MAKEOPTS} -C ports/esp32 BOARD=ESP32_GENERIC_C3
}
########################################################################################