@@ -40,6 +40,14 @@ pre_commit:
4040 - ./install.sh
4141 - . ./export.sh
4242
43+ .setup_idf_master : &setup_idf_master
44+ - cd $CI_PROJECT_DIR
45+ - git clone --depth=1 -b master ${ESP_IDF_HTTP}
46+ - cd esp-idf
47+ - git submodule update --init --depth=1
48+ - ./install.sh
49+ - . ./export.sh
50+
4351.build_basic_thread_border_router : &build_basic_thread_border_router
4452 - cd $IDF_PATH/examples/openthread/ot_rcp
4553 - idf.py set-target esp32h2
@@ -106,9 +114,12 @@ build_examples:
106114 image : espressif/idf:latest
107115 script :
108116 - *submodule_update
117+ - cd $ESP_THREAD_BR_PATH
118+ - python3 ${CI_TOOLS_PATH}/get_component_version.py $ESP_THREAD_BR_PATH/examples/basic_thread_border_router/main/idf_component.yml build_examples_result.txt esp_ot_cli_extension
119+ - python3 ${CI_TOOLS_PATH}/get_component_version.py $ESP_THREAD_BR_PATH/examples/basic_thread_border_router/main/idf_component.yml build_examples_result.txt esp_rcp_update
109120 - *build_basic_thread_border_router
110121 - cd $ESP_THREAD_BR_PATH
111- - echo "build_examples_result=true " > build_examples_result.txt
122+ - echo "Success " > build_examples_result.txt
112123 artifacts :
113124 when : always
114125 paths :
@@ -134,10 +145,12 @@ build_idf_otbr_examples:
134145 image : $ESP_ENV_IMAGE
135146 allow_failure : true
136147 script :
137- - *setup_idf
148+ - *setup_idf_master
149+ - cd $ESP_THREAD_BR_PATH
150+ - python3 ${CI_TOOLS_PATH}/get_component_version.py $IDF_PATH/examples/openthread/ot_br/main/idf_component.yml build_idf_otbr_example_result.txt esp_ot_cli_extension
138151 - *build_idf_example_ot_br
139152 - cd $ESP_THREAD_BR_PATH
140- - echo "build_idf_otbr_example_result=true " > build_idf_otbr_example_result.txt
153+ - echo "Success " > build_idf_otbr_example_result.txt
141154 artifacts :
142155 when : always
143156 paths :
@@ -151,10 +164,12 @@ build_idf_otbr_autostart_examples:
151164 image : $ESP_ENV_IMAGE
152165 allow_failure : true
153166 script :
154- - *setup_idf
167+ - *setup_idf_master
168+ - cd $ESP_THREAD_BR_PATH
169+ - python3 ${CI_TOOLS_PATH}/get_component_version.py $IDF_PATH/examples/openthread/ot_br/main/idf_component.yml build_idf_otbr_autostart_example_result.txt esp_ot_cli_extension
155170 - *build_idf_example_ot_br_autostart
156171 - cd $ESP_THREAD_BR_PATH
157- - echo "build_idf_otbr_autostart_example_result=true " > build_idf_otbr_autostart_example_result.txt
172+ - echo "Success " > build_idf_otbr_autostart_example_result.txt
158173 artifacts :
159174 when : always
160175 paths :
@@ -168,10 +183,12 @@ build_idf_otcli_examples:
168183 image : $ESP_ENV_IMAGE
169184 allow_failure : true
170185 script :
171- - *setup_idf
186+ - *setup_idf_master
187+ - cd $ESP_THREAD_BR_PATH
188+ - python3 ${CI_TOOLS_PATH}/get_component_version.py $IDF_PATH/examples/openthread/ot_cli/main/idf_component.yml build_idf_otcli_example_result.txt esp_ot_cli_extension
172189 - *build_idf_example_ot_cli
173190 - cd $ESP_THREAD_BR_PATH
174- - echo "build_idf_otcli_example_result=true " > build_idf_otcli_example_result.txt
191+ - echo "Success " > build_idf_otcli_example_result.txt
175192 artifacts :
176193 when : always
177194 paths :
@@ -208,29 +225,8 @@ check_build_result:
208225 - build_idf_otcli_examples
209226 script :
210227 - *submodule_update
211- - chmod 700 ./check_components_version.sh
212- - ALLOW_EXT_CMD_FAILURE_OUTPUT=$(./check_components_version.sh "components/esp_ot_cli_extension")
213- - ALLOW_EXT_CMD_FAILURE_VALUE=$(echo "$ALLOW_EXT_CMD_FAILURE_OUTPUT" | cut -d'=' -f2)
214- - echo "ALLOW_EXT_CMD_FAILURE_VALUE=$ALLOW_EXT_CMD_FAILURE_VALUE"
215- - ALLOW_RCP_UPDATE_FAILURE_OUTPUT=$(./check_components_version.sh "components/esp_rcp_update")
216- - ALLOW_RCP_UPDATE_FAILURE_VALUE=$(echo "$ALLOW_RCP_UPDATE_FAILURE_OUTPUT" | cut -d'=' -f2)
217- - echo "ALLOW_RCP_UPDATE_FAILURE_VALUE=$ALLOW_RCP_UPDATE_FAILURE_VALUE"
218- - |
219- if [ "$ALLOW_EXT_CMD_FAILURE_VALUE" == "true" ] || [ "$ALLOW_RCP_UPDATE_FAILURE_VALUE" == "true" ]; then
220- echo "allow failure"
221- exit 0;
222- else
223- if [ -f "build_examples_result.txt" ] &&
224- [ -f "build_idf_otbr_example_result.txt" ] &&
225- [ -f "build_idf_otbr_autostart_example_result.txt" ] &&
226- [ -f "build_idf_otcli_example_result.txt" ]; then
227- echo "Success!!!"
228- exit 0
229- else
230- echo "Fail!!!"
231- exit 1
232- fi
233- fi
228+ - chmod 700 ./check_build_results.sh
229+ - ./check_build_results.sh
234230 tags :
235231 - build
236232
0 commit comments