summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAngus Gratton <angus@redyak.com.au>2023-11-29 14:26:12 +1100
committerDamien George <damien@micropython.org>2023-12-06 12:12:52 +1100
commit9f620d28193709a5002a6f439b7495c9c3451792 (patch)
treedc6356ab7d19a7e8045962b2256da3b06ba9873a /tools
parent58112fc49a23de08e40dab578e23188f65089763 (diff)
github/workflows: Cache ESP-IDF checkout and installation.
Cache is keyed on the ESP-IDF version used in CI, so there shouldn't be any cache invalidation issues when ESP-IDF version changes. Restoring from cache takes approx 15s, compared to 2-3m to perform these steps (ESP-IDF tools install, ESP-IDF clone, ESP-IDF submodule clone) the first time. Cache size is approx 1.6GB, the git clone is tweaked as much as possible to keep the size down. Signed-off-by: Angus Gratton <angus@redyak.com.au>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/ci.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/ci.sh b/tools/ci.sh
index 8dcbbf776..34260334d 100755
--- a/tools/ci.sh
+++ b/tools/ci.sh
@@ -118,10 +118,15 @@ function ci_cc3200_build {
########################################################################################
# ports/esp32
-function ci_esp32_idf50_setup {
+# GitHub tag of ESP-IDF to use for CI (note: must be a tag or a branch)
+IDF_VER=v5.0.2
+
+function ci_esp32_idf_setup {
pip3 install pyelftools
- git clone https://github.com/espressif/esp-idf.git
- git -C esp-idf checkout v5.0.2
+ git clone --depth 1 --branch $IDF_VER https://github.com/espressif/esp-idf.git
+ # doing a treeless clone isn't quite as good as --shallow-submodules, but it
+ # is smaller than full clones and works when the submodule commit isn't a head.
+ git -C esp-idf submodule update --init --recursive --filter=tree:0
./esp-idf/install.sh
}