File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -218,6 +218,8 @@ build_esp_idf_tests:
218218
219219.build_examples_make_template : &build_examples_make_template
220220 << : *build_template
221+ # This is a workaround for a rarely encountered issue with building examples in CI.
222+ # Probably related to building of Kconfig in 'make clean' stage
221223 retry : 1
222224 artifacts :
223225 when : always
@@ -251,7 +253,6 @@ build_esp_idf_tests:
251253# same as above, but for CMake
252254.build_examples_cmake_template : &build_examples_cmake_template
253255 << : *build_template
254- retry : 1
255256 artifacts :
256257 when : always
257258 paths :
Original file line number Diff line number Diff line change 7575 [ -z ${JOB_PATTERN} ] && die " JOB_PATTERN is bad"
7676
7777 # parse number 'NUM' at the end of string 'some_your_text_NUM'
78- JOB_NUM=$( echo ${JOB_NAME} | sed -n -r ' s/^.*_([0-9]+)$/\1/p' )
78+ # NOTE: Getting rid of the leading zero to get the decimal
79+ JOB_NUM=$( echo ${JOB_NAME} | sed -n -r ' s/^.*_0*([0-9]+)$/\1/p' )
7980 [ -z ${JOB_NUM} ] && die " JOB_NUM is bad"
8081
8182 # count number of the jobs
@@ -120,14 +121,19 @@ build_example () {
120121 local BUILDLOG=${LOG_PATH} /ex_${ID} _log.txt
121122 touch ${BUILDLOG}
122123
124+ local FLASH_ARGS=build/download.config
125+
123126 make clean >> ${BUILDLOG} 2>&1 &&
124127 make defconfig >> ${BUILDLOG} 2>&1 &&
125128 make all >> ${BUILDLOG} 2>&1 &&
126- ( make print_flash_cmd | tail -n 1 > build/download.config ) >> ${BUILDLOG} 2>&1 ||
129+ make print_flash_cmd > ${FLASH_ARGS} .full 2 >>${BUILDLOG} ||
127130 {
128131 RESULT=$? ; FAILED_EXAMPLES+=" ${EXAMPLE_NAME} " ;
129132 }
130133
134+ tail -n 1 ${FLASH_ARGS} .full > ${FLASH_ARGS} || :
135+ test -s ${FLASH_ARGS} || die " Error: ${FLASH_ARGS} file is empty"
136+
131137 cat ${BUILDLOG}
132138 popd
133139
Original file line number Diff line number Diff line change 8080 [ -z ${JOB_PATTERN} ] && die " JOB_PATTERN is bad"
8181
8282 # parse number 'NUM' at the end of string 'some_your_text_NUM'
83- JOB_NUM=$( echo ${JOB_NAME} | sed -n -r ' s/^.*_([0-9]+)$/\1/p' )
83+ # NOTE: Getting rid of the leading zero to get the decimal
84+ JOB_NUM=$( echo ${JOB_NAME} | sed -n -r ' s/^.*_0*([0-9]+)$/\1/p' )
8485 [ -z ${JOB_NUM} ] && die " JOB_NUM is bad"
8586
8687 # count number of the jobs
You can’t perform that action at this time.
0 commit comments