From bbd0696992e8e76cacd77f6d8df5feed4427e93c 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 8e938da6d..c72a6a831 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -109,12 +109,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 26e7d01d42501ae16b1bc51dd24af9b73f376e52 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 8f22ea28b..0d1c1832f 100644 --- a/tools/cmake/idf_functions.cmake +++ b/tools/cmake/idf_functions.cmake @@ -154,7 +154,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 b837e64640a3d804ffd30b56248119100541d2bf 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