From 9921c8b91f5081b923657b90e4e2690052e9f619 Mon Sep 17 00:00:00 2001 From: Anton Maklakov Date: Wed, 14 Nov 2018 14:13:28 +0800 Subject: [PATCH 1/3] ci: If there is no sdkconfig, we have to generate one --- .gitlab-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d9f4906f8..e61c77b84 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -121,12 +121,15 @@ build_template_app: - $BOT_LABEL_BUILD - $BOT_LABEL_REGULAR_TEST script: - - git clone https://github.com/espressif/esp-idf-template.git + # Set the variable for 'esp-idf-template' testing + - ESP_IDF_TEMPLATE_GIT=${ESP_IDF_TEMPLATE_GIT:-"https://github.com/espressif/esp-idf-template.git"} + - git clone ${ESP_IDF_TEMPLATE_GIT} - cd esp-idf-template # Try to use the same branch name for esp-idf-template that we're # using on esp-idf. If it doesn't exist then just stick to the default # branch - python $CHECKOUT_REF_SCRIPT esp-idf-template + - make defconfig # Test debug build (default) - make all V=1 # Now test release build From dbeb8ae02ac8dc3b7f34f21bd8633a936a398e9a Mon Sep 17 00:00:00 2001 From: Anton Maklakov Date: Wed, 14 Nov 2018 19:45:14 +0800 Subject: [PATCH 2/3] cmake: fix the creation dummy main to avoid rebuilding --- tools/cmake/idf_functions.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/cmake/idf_functions.cmake b/tools/cmake/idf_functions.cmake index fd5fce0c7..6ae7698da 100644 --- a/tools/cmake/idf_functions.cmake +++ b/tools/cmake/idf_functions.cmake @@ -188,7 +188,10 @@ function(idf_add_executable) # Create a dummy file to work around CMake requirement of having a source # file while adding an executable add_executable(${exe_target} "${CMAKE_CURRENT_BINARY_DIR}/dummy_main_src.c") - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dummy_main_src.c) + add_custom_command(OUTPUT dummy_main_src.c + COMMAND ${CMAKE_COMMAND} -E touch dummy_main_src.c + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + VERBATIM) add_custom_target(dummy_main_src DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/dummy_main_src.c) From 007a4fcc4e786cbfdcace4ea206a5299ad75484f Mon Sep 17 00:00:00 2001 From: Mahavir Jain Date: Wed, 14 Nov 2018 17:57:15 +0530 Subject: [PATCH 3/3] tools: fix cmake build script for sdkconfig test --- tools/ci/test_build_system_cmake.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci/test_build_system_cmake.sh b/tools/ci/test_build_system_cmake.sh index bb57375d1..c5e02fc4d 100755 --- a/tools/ci/test_build_system_cmake.sh +++ b/tools/ci/test_build_system_cmake.sh @@ -156,7 +156,7 @@ function run_tests() idf.py build take_build_snapshot # need to actually change config, or cmake is too smart to rebuild - sed -i s/CONFIG_FREERTOS_UNICORE=/CONFIG_FREERTOS_UNICORE=y/ sdkconfig + sed -i s/^\#\ CONFIG_FREERTOS_UNICORE\ is\ not\ set/CONFIG_FREERTOS_UNICORE=y/ sdkconfig idf.py build # check the sdkconfig.h file was rebuilt assert_rebuilt config/sdkconfig.h