2017-06-19 01:59:18 +00:00
|
|
|
# This file is sourced in to the CI environment
|
2017-03-22 10:39:28 +00:00
|
|
|
# in .gitlab-ci.yml
|
|
|
|
#
|
2017-06-19 01:59:18 +00:00
|
|
|
|
|
|
|
# Sets the error behaviour options for shell throughout the CI environment
|
2017-03-22 10:39:28 +00:00
|
|
|
#
|
2017-06-19 01:59:18 +00:00
|
|
|
set -o errexit # Exit if command failed.
|
2018-03-27 05:13:35 +00:00
|
|
|
set -o pipefail # Exit if pipe failed.
|
|
|
|
|
2019-05-30 06:12:36 +00:00
|
|
|
# We can use the appropriate CI variable for debugging
|
|
|
|
DEBUG_SHELL=${DEBUG_SHELL:-"0"}
|
|
|
|
[ "${DEBUG_SHELL}" = "1" ] && set -x
|
2017-03-22 10:39:28 +00:00
|
|
|
|
2017-05-31 09:20:29 +00:00
|
|
|
[ -z $CI_COMMIT_REF_NAME ] && echo "This internal script should only be run by a Gitlab CI runner." && exit 1
|
2017-03-22 10:39:28 +00:00
|
|
|
|
2018-11-27 11:16:18 +00:00
|
|
|
# Compiler flags to thoroughly check the IDF code in some CI jobs
|
|
|
|
# (Depends on default options '-Wno-error=XXX' used in the IDF build system)
|
2019-04-17 06:31:07 +00:00
|
|
|
export PEDANTIC_CFLAGS="-DIDF_CI_BUILD -Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function"
|