* ci(idf): Use included IDF examples in CI * fix(example): sets Matter version to be 1.3 or higher * feat(matter): sets c++ 2a as default * feat(matter): Update README.md * fix(matter): instructions about using more than one sdkconfig file --------- Co-authored-by: Sugar Glider <rodrigo.garcia@espressif.com>
33 lines
1.2 KiB
Bash
33 lines
1.2 KiB
Bash
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
CHECK_REQUIREMENTS="./components/arduino-esp32/.github/scripts/sketch_utils.sh check_requirements"
|
|
|
|
# Export IDF environment
|
|
. ${IDF_PATH}/export.sh
|
|
|
|
# Find all examples in ./components/arduino-esp32/idf_component_examples
|
|
idf_component_examples=$(find ./components/arduino-esp32/idf_component_examples -mindepth 1 -maxdepth 1 -type d)
|
|
|
|
for example in $idf_component_examples; do
|
|
if [ -f "$example"/ci.json ]; then
|
|
# If the target is listed as false, skip the sketch. Otherwise, include it.
|
|
is_target=$(jq -r --arg target "$IDF_TARGET" '.targets[$target]' "$example"/ci.json)
|
|
if [[ "$is_target" == "false" ]]; then
|
|
printf "\n\033[93mSkipping %s for target %s\033[0m\n\n" "$example" "$IDF_TARGET"
|
|
continue
|
|
fi
|
|
fi
|
|
|
|
idf.py -C "$example" set-target "$IDF_TARGET"
|
|
|
|
has_requirements=$(${CHECK_REQUIREMENTS} "$example" "$example/sdkconfig")
|
|
if [ "$has_requirements" -eq 0 ]; then
|
|
printf "\n\033[93m%s does not meet the requirements for %s. Skipping...\033[0m\n\n" "$example" "$IDF_TARGET"
|
|
continue
|
|
fi
|
|
|
|
printf "\n\033[95mBuilding %s\033[0m\n\n" "$example"
|
|
idf.py -C "$example" -DEXTRA_COMPONENT_DIRS="$PWD/components" build
|
|
done
|