Skip to content

Commit

Permalink
Merge branch 'bugfix/idf_ci_build_is_not_set_v4.4' into 'release/v4.4'
Browse files Browse the repository at this point in the history
ci: Fix environment variable IDF_CI_BUILD is not set (v4.4)

See merge request espressif/esp-idf!27681
  • Loading branch information
ginkgm committed Dec 28, 2023
2 parents 54c529a + f810eb7 commit c1c6921
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ variables:
# target test repo parameters
TEST_ENV_CONFIG_REPO: "https://gitlab-ci-token:${BOT_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/qa/ci-test-runner-configs.git"

IDF_CI_BUILD: 1

.setup_tools_unless_target_test: &setup_tools_unless_target_test |
if [[ -n "$IDF_DONT_USE_MIRRORS" ]]; then
export IDF_MIRROR_PREFIX_MAP=
Expand Down
4 changes: 4 additions & 0 deletions Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ mainmenu "Espressif IoT Development Framework Configuration"
bool
option env="IDF_ENV_FPGA"

config IDF_CI_BUILD
bool
default y if "$(IDF_CI_BUILD)" = "y" || "$(IDF_CI_BUILD)" = 1

config IDF_TARGET_ARCH_RISCV
bool
default "n"
Expand Down
2 changes: 1 addition & 1 deletion components/esp_common/include/esp_attr.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ FORCE_INLINE_ATTR TYPE& operator<<=(TYPE& a, int b) { a = a << b; return a; }
/* Use IDF_DEPRECATED attribute to mark anything deprecated from use in
ESP-IDF's own source code, but not deprecated for external users.
*/
#ifdef IDF_CI_BUILD
#ifdef CONFIG_IDF_CI_BUILD
#define IDF_DEPRECATED(REASON) __attribute__((deprecated(REASON)))
#else
#define IDF_DEPRECATED(REASON)
Expand Down
4 changes: 2 additions & 2 deletions components/esp_hw_support/test/test_rtc_clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ TEST_CASE("Test fast switching between PLL and XTAL", "[rtc_clk]")

/* In CI environments, the 32kXTAL runners don't have 8MB psram for bank switching.
So can only test one config or the other. */
#if !IDF_CI_BUILD || !CONFIG_SPIRAM_BANKSWITCH_ENABLE
#if !defined(CONFIG_IDF_CI_BUILD) || !CONFIG_SPIRAM_BANKSWITCH_ENABLE

#define COUNT_TEST 3
#define TIMEOUT_TEST_MS (5 + CONFIG_ESP32_RTC_CLK_CAL_CYCLES / 16)
Expand Down Expand Up @@ -322,7 +322,7 @@ TEST_CASE("Test starting 'External 32kHz XTAL' on the board without it.", "[rtc_
start_freq(RTC_SLOW_FREQ_RTC, 0);
}

#endif // !IDF_CI_BUILD || !CONFIG_SPIRAM_BANKSWITCH_ENABLE
#endif // !defined(CONFIG_IDF_CI_BUILD) || !CONFIG_SPIRAM_BANKSWITCH_ENABLE

#endif // !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32S3, ESP32C3)

Expand Down
2 changes: 1 addition & 1 deletion tools/ci/configure_ci_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ DEBUG_SHELL=${DEBUG_SHELL:-"0"}
# 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)

PEDANTIC_FLAGS="-DIDF_CI_BUILD -Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function"
PEDANTIC_FLAGS="-Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function"
export PEDANTIC_CFLAGS="${PEDANTIC_FLAGS} -Wstrict-prototypes"
export PEDANTIC_CXXFLAGS="${PEDANTIC_FLAGS}"

Expand Down

0 comments on commit c1c6921

Please sign in to comment.