-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'bugfix/xtensa_defines' into 'master'
Fix compilation for IDF <=4.2, run CI builds with multiple IDF versions See merge request idf/esp-dsp!57
- Loading branch information
Showing
20 changed files
with
176 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
#!/bin/bash | ||
# | ||
# Build the test app and all examples from the examples directory. | ||
# Expects EXAMPLE_TARGETS and TEST_TARGETS environment variables to be set. | ||
# Each variable is the list of IDF_TARGET values to build the examples and | ||
# the test app for, respectively. | ||
# | ||
# ----------------------------------------------------------------------------- | ||
# Safety settings (see https://gist.github.com/ilg-ul/383869cbb01f61a51c4d). | ||
|
||
if [[ -n "${DEBUG_SHELL}" ]] | ||
then | ||
set -x # Activate the expand mode if DEBUG is anything but empty. | ||
fi | ||
|
||
if [[ -z "${EXAMPLE_TARGETS}" || -z "${TEST_TARGETS}" ]] | ||
then | ||
echo "EXAMPLE_TARGETS and TEST_TARGETS environment variables must be set before calling this script" | ||
exit 1 | ||
fi | ||
|
||
set -o errexit # Exit if command failed. | ||
set -o pipefail # Exit if pipe failed. | ||
set -o nounset # Exit if variable not set. | ||
|
||
|
||
STARS='***************************************************' | ||
|
||
# ----------------------------------------------------------------------------- | ||
|
||
die() { | ||
echo "${1:-"Unknown Error"}" 1>&2 | ||
exit 1 | ||
} | ||
|
||
# build_for_targets <target list> | ||
# call this in the project directory | ||
function build_for_targets | ||
{ | ||
target_list="$1" | ||
for IDF_TARGET in ${target_list} | ||
do | ||
export IDF_TARGET | ||
if [[ "${IDF_TARGET}" = "esp32" ]] | ||
then | ||
echo "${STARS}" | ||
echo "Building in $PWD with Make" | ||
# -j option will be set via MAKEFLAGS in .gitlab-ci.yml | ||
# shellcheck disable=SC2015 | ||
make defconfig && make || die "Make build in ${PWD} has failed" | ||
rm -rf build | ||
fi | ||
|
||
echo "${STARS}" | ||
echo "Building in $PWD with CMake for ${IDF_TARGET}" | ||
if [[ ${IDF_TARGET} != "esp32" ]] | ||
then | ||
# IDF 4.0 doesn't support idf.py set-target, and only supports esp32. | ||
idf.py set-target "${IDF_TARGET}" | ||
fi | ||
idf.py build || die "CMake build in ${PWD} has failed for ${IDF_TARGET}" | ||
idf.py fullclean | ||
done | ||
} | ||
|
||
# Build the test app | ||
echo "${STARS}" | ||
pushd test_app | ||
build_for_targets "${TEST_TARGETS}" | ||
popd | ||
|
||
# Build the examples | ||
pushd examples | ||
EXAMPLES=$(find . -maxdepth 1 -mindepth 1 -type d | cut -d '/' -f 2) | ||
for NAME in ${EXAMPLES} | ||
do | ||
pushd "${NAME}" | ||
build_for_targets "${EXAMPLE_TARGETS}" | ||
popd | ||
done | ||
popd |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.