Skip to content

Commit

Permalink
ci: make check config step go faster (almost 9X)
Browse files Browse the repository at this point in the history
Avoids hitting idf components server and reconfiguring target
  • Loading branch information
greenaddress authored and JamieDriver committed Aug 21, 2024
1 parent 0d6ce77 commit 804278c
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions tools/check_default_configs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,24 @@ if [ -f /.dockerenv ]; then
. ${HOME}/esp/esp-idf/export.sh
fi

rm -fr sdkconfig sdkconfig.defaults build
for filename in production/*.defaults configs/*.defaults; do
export IDF_COMPONENT_API_CACHE_EXPIRATION_MINUTES=500
export IDF_COMPONENT_CHECK_NEW_VERSION=0
export IDF_CCACHE_ENABLE=1

if [[ $filename == *"s3"* ]]; then
esp_variant=esp32s3
else
esp_variant=esp32
fi
rm -fr sdkconfig sdkconfig.defaults build managed_components

idf.py -D SDKCONFIG_DEFAULTS="${filename}" set-target ${esp_variant} reconfigure save-defconfig
idf.py set-target esp32s3
for filename in production/*s3*.defaults configs/*s3*.defaults; do
rm -fr sdkconfig sdkconfig.defaults
idf.py -D SDKCONFIG_DEFAULTS="${filename}" reconfigure save-defconfig
tail -n +4 sdkconfig.defaults | LC_ALL=C sort -o ${filename}
done

idf.py set-target esp32
for filename in production/*.defaults configs/*.defaults; do
[[ $filename == *"s3"* ]] && continue
rm -fr sdkconfig sdkconfig.defaults
idf.py -D SDKCONFIG_DEFAULTS="${filename}" reconfigure save-defconfig
tail -n +4 sdkconfig.defaults | LC_ALL=C sort -o ${filename}
done
rm -fr sdkconfig sdkconfig.defaults build
rm -fr sdkconfig sdkconfig.defaults build managed_components

0 comments on commit 804278c

Please sign in to comment.