14 # Common parameters for the 'make' during CI tests
15 MAKEFLAGS: "-j5 --no-keep-going"
17 # GitLab-CI environment
19 # more attempts for more robust
20 GET_SOURCES_ATTEMPTS: "10"
21 ARTIFACT_DOWNLOAD_ATTEMPTS: "10"
23 # We use get_sources.sh script to fetch the submodules and/or re-fetch the repo
24 # if it was corrupted (if submodule update fails this can happen)
26 GIT_SUBMODULE_STRATEGY: none
28 UNIT_TEST_BUILD_SYSTEM: make
31 IDF_PATH: "$CI_PROJECT_DIR"
34 APPLY_BOT_FILTER_SCRIPT: "$CI_PROJECT_DIR/tools/ci/apply_bot_filter.py"
35 CHECKOUT_REF_SCRIPT: "$CI_PROJECT_DIR/tools/ci/checkout_project_ref.py"
38 BOT_DOCKER_IMAGE_TAG: ":latest"
40 # When 'fetch' strategy is used, Gitlab removes untracked files before checking out
41 # new revision. However if the new revision doesn't include some of the submodules
42 # which were present in the old revision, such submodule directories would not be
43 # removed by the checkout. This extra step ensures that these stale submodules
45 .git_clean_stale_submodules: &git_clean_stale_submodules >
46 find . -name '.git' -not -path './.git' -printf '%P\n'
49 grep -q {} .gitmodules
50 || (echo "Removing {}, has .git directory but not in .gitmodules file"
53 # before each job, we need to check if this job is filtered by bot stage/job filter
54 .apply_bot_filter: &apply_bot_filter
55 python $APPLY_BOT_FILTER_SCRIPT || exit 0
58 - source tools/ci/setup_python.sh
59 - *git_clean_stale_submodules
60 # apply bot filter in before script
65 - echo -n $GITLAB_KEY > ~/.ssh/id_rsa_base64
66 - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
67 - chmod 600 ~/.ssh/id_rsa
68 - echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
70 # Set IS_PRIVATE or IS_PUBLIC depending on if our branch is public or not
72 # (the same regular expressions are used to set these are used in 'only:' sections below
73 - source tools/ci/configure_ci_environment.sh
75 # fetch the submodules (& if necessary re-fetch repo) from gitlab
76 - time ./tools/ci/get-full-sources.sh
78 # used for check scripts which we want to run unconditionally
79 .do_nothing_before_no_filter:
80 before_script: &do_nothing_before_no_filter
81 - source tools/ci/setup_python.sh
82 - *git_clean_stale_submodules
84 # used for everything else where we want to do no prep, except for bot filter
86 before_script: &do_nothing_before
87 - source tools/ci/setup_python.sh
88 - *git_clean_stale_submodules
89 # apply bot filter in before script
91 - echo "Not setting up GitLab key, not fetching submodules"
92 - source tools/ci/configure_ci_environment.sh
94 .add_gitlab_key_before:
95 before_script: &add_gitlab_key_before
96 - source tools/ci/setup_python.sh
97 - *git_clean_stale_submodules
98 # apply bot filter in before script
100 - echo "Not fetching submodules"
101 - source tools/ci/configure_ci_environment.sh
105 - echo -n $GITLAB_KEY > ~/.ssh/id_rsa_base64
106 - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
107 - chmod 600 ~/.ssh/id_rsa
108 - echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
112 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
120 - $BOT_TRIGGER_WITH_LABEL == null
122 - $BOT_LABEL_REGULAR_TEST
124 - git clone https://github.com/espressif/esp-idf-template.git
125 - cd esp-idf-template
126 # Try to use the same branch name for esp-idf-template that we're
127 # using on esp-idf. If it doesn't exist then just stick to the default
129 - python $CHECKOUT_REF_SCRIPT esp-idf-template
130 # Test debug build (default)
132 # Now test release build
134 - sed -i.bak -e's/CONFIG_OPTIMIZATION_LEVEL_DEBUG\=y/CONFIG_OPTIMIZATION_LEVEL_RELEASE=y/' sdkconfig
136 # Check if there are any stray printf/ets_printf references in WiFi libs
137 - cd ../components/esp32/lib
138 - test $(xtensa-esp32-elf-nm *.a | grep -w printf | wc -l) -eq 0
139 - test $(xtensa-esp32-elf-nm *.a | grep -w ets_printf | wc -l) -eq 0
142 .build_template: &build_template
144 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
151 .build_ssc_template: &build_ssc_template
158 SSC_CONFIG_FOLDER: "$CI_PROJECT_DIR/SSC/configs/ESP32_IDF"
161 - $BOT_TRIGGER_WITH_LABEL == null
163 - $BOT_LABEL_INTEGRATION_TEST
164 - $BOT_LABEL_REGULAR_TEST
166 - git clone $SSC_REPOSITORY
168 - python $CHECKOUT_REF_SCRIPT SSC
169 - MAKEFLAGS= ./ci_build_ssc.sh "${CI_JOB_NAME}" "${IDF_PATH}/.gitlab-ci.yml"
171 # don't forget to add to dependency to test_template when adding new build_ssc jobs
173 <<: *build_ssc_template
176 <<: *build_ssc_template
179 <<: *build_ssc_template
181 # If you want to add new build ssc jobs, please add it into dependencies of `assign_test` and `.test_template`
187 - tools/unit-test-app/output
188 - components/idf_test/unit_test/TestCaseAll.yml
189 - components/idf_test/unit_test/CIConfigs/*.yml
193 - $BOT_TRIGGER_WITH_LABEL == null
195 - $BOT_LABEL_UNIT_TEST
196 - $BOT_LABEL_REGULAR_TEST
198 - export PATH="$IDF_PATH/tools:$PATH"
199 - cd $CI_PROJECT_DIR/tools/unit-test-app
200 - export EXTRA_CFLAGS="-Werror -Werror=deprecated-declarations"
201 - export EXTRA_CXXFLAGS=${EXTRA_CFLAGS}
202 # Build with CMake first
203 - idf.py ut-clean-all-configs
204 - idf.py ut-build-all-configs
205 - python tools/UnitTestParser.py
206 # Check if test demands CMake or Make built binaries. If CMake leave the built artifacts as is then exit.
207 - if [ "$UNIT_TEST_BUILD_SYSTEM" == "cmake" ]; then exit 0; fi
208 # If Make, delete the CMake built artifacts
209 - rm -rf builds output sdkconfig
210 - rm -rf components/idf_test/unit_test/TestCaseAll.yml
211 - rm -rf components/idf_test/unit_test/CIConfigs/*.yml
212 # Then build with Make
213 - cd $CI_PROJECT_DIR/tools/unit-test-app
214 - MAKEFLAGS= make help # make sure kconfig tools are built in single process
215 - make ut-clean-all-configs
216 - make ut-build-all-configs
217 - python tools/UnitTestParser.py
219 .build_examples_make_template: &build_examples_make_template
225 - build_examples/*/*/*/build/*.bin
226 - build_examples/*/*/*/build/*.elf
227 - build_examples/*/*/*/build/*.map
228 - build_examples/*/*/*/build/download.config
229 - build_examples/*/*/*/build/bootloader/*.bin
234 LOG_PATH: "$CI_PROJECT_DIR/log_examples_make"
237 - $BOT_TRIGGER_WITH_LABEL == null
239 - $BOT_LABEL_EXAMPLE_TEST
240 - $BOT_LABEL_REGULAR_TEST
242 # it's not possible to build 100% out-of-tree and have the "artifacts"
243 # mechanism work, but this is the next best thing
244 - rm -rf build_examples
245 - mkdir build_examples
247 # build some of examples
248 - mkdir -p ${LOG_PATH}
249 - ${IDF_PATH}/tools/ci/build_examples.sh "${CI_JOB_NAME}"
251 # same as above, but for CMake
252 .build_examples_cmake_template: &build_examples_cmake_template
258 - build_examples_cmake/*/*/*/build/*.bin
259 - build_examples_cmake/*/*/*/build/*.elf
260 - build_examples_cmake/*/*/*/build/*.map
261 - build_examples_cmake/*/*/*/build/download.config
262 - build_examples_cmake/*/*/*/build/bootloader/*.bin
267 LOG_PATH: "$CI_PROJECT_DIR/log_examples_cmake"
270 - $BOT_TRIGGER_WITH_LABEL == null
272 - $BOT_LABEL_EXAMPLE_TEST
273 - $BOT_LABEL_REGULAR_TEST
275 # it's not possible to build 100% out-of-tree and have the "artifacts"
276 # mechanism work, but this is the next best thing
277 - rm -rf build_examples_cmake
278 - mkdir build_examples_cmake
279 - cd build_examples_cmake
280 # build some of examples
281 - mkdir -p ${LOG_PATH}
282 - ${IDF_PATH}/tools/ci/build_examples_cmake.sh "${CI_JOB_NAME}"
284 build_examples_make_00:
285 <<: *build_examples_make_template
287 build_examples_make_01:
288 <<: *build_examples_make_template
290 build_examples_make_02:
291 <<: *build_examples_make_template
293 build_examples_make_03:
294 <<: *build_examples_make_template
296 build_examples_make_04:
297 <<: *build_examples_make_template
299 build_examples_make_05:
300 <<: *build_examples_make_template
302 build_examples_make_06:
303 <<: *build_examples_make_template
305 build_examples_make_07:
306 <<: *build_examples_make_template
308 build_examples_cmake_00:
309 <<: *build_examples_cmake_template
311 build_examples_cmake_01:
312 <<: *build_examples_cmake_template
314 build_examples_cmake_02:
315 <<: *build_examples_cmake_template
317 build_examples_cmake_03:
318 <<: *build_examples_cmake_template
320 build_examples_cmake_04:
321 <<: *build_examples_cmake_template
323 build_examples_cmake_05:
324 <<: *build_examples_cmake_template
326 build_examples_cmake_06:
327 <<: *build_examples_cmake_template
329 build_examples_cmake_07:
330 <<: *build_examples_cmake_template
332 # If you want to add new build example jobs, please add it into dependencies of `.example_test_template`
336 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
342 # English version of documentation
343 - docs/en/doxygen-warning-log.txt
344 - docs/en/sphinx-warning-log.txt
345 - docs/en/sphinx-warning-log-sanitized.txt
346 - docs/en/_build/html
348 # Chinese version of documentation
349 - docs/zh_CN/doxygen-warning-log.txt
350 - docs/zh_CN/sphinx-warning-log.txt
351 - docs/zh_CN/sphinx-warning-log-sanitized.txt
352 - docs/zh_CN/_build/html
356 - $BOT_TRIGGER_WITH_LABEL == null
358 - $BOT_LABEL_BUILD_DOCS
359 - $BOT_LABEL_REGULAR_TEST
362 - ./check_lang_folder_sync.sh
365 - make html || cat /tmp/sphinx-err*.log
366 - ../check_doc_warnings.sh
370 - ../check_doc_warnings.sh
374 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
377 - $BOT_TRIGGER_WITH_LABEL == null
379 - $BOT_LABEL_REGULAR_TEST
381 tools/cmake/run_cmake_lint.sh
383 .host_test_template: &host_test_template
385 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
391 - $BOT_TRIGGER_WITH_LABEL == null
392 - $BOT_LABEL_HOST_TEST
393 - $BOT_LABEL_REGULAR_TEST
396 <<: *host_test_template
398 - cd components/nvs_flash/test_nvs_host
402 <<: *host_test_template
405 - components/nvs_flash/test_nvs_host/coverage_report
411 - $BOT_LABEL_NVS_COVERAGE
413 - cd components/nvs_flash/test_nvs_host
414 - make coverage_report
416 test_partition_table_on_host:
417 <<: *host_test_template
421 - cd components/partition_table/test_gen_esp32part_host
422 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./gen_esp32part_tests.py
425 <<: *host_test_template
428 - components/wear_levelling/test_wl_host/coverage_report.zip
431 - cd components/wear_levelling/test_wl_host
435 <<: *host_test_template
437 - cd components/fatfs/test_fatfs_host/
440 .host_fuzzer_test_template: &host_fuzzer_test_template
442 image: $CI_DOCKER_REGISTRY/afl-fuzzer-test
449 - ${FUZZER_TEST_DIR}/out/crashes
450 - ${FUZZER_TEST_DIR}/fuzz_output.log
454 # can only be triggered
457 - $BOT_LABEL_FUZZER_TEST
459 - export AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES=1 && export AFL_SKIP_CPUFREQ=1
460 - cd ${FUZZER_TEST_DIR}
461 # run AFL fuzzer for one hour
462 - ( ( make ${FUZZER_PARAMS} fuzz | tee fuzz_output.log | grep -v '\(Fuzzing test case\|Entering queue cycle\)' ) || pkill sleep ) &
463 - ( sleep 3600 || mkdir -p out/crashes/env_failed ) && pkill afl-fuz
464 # check no crashes found
465 - test -z "$(ls out/crashes/)" || exit 1
467 test_mdns_fuzzer_on_host:
468 <<: *host_fuzzer_test_template
470 BOT_NEEDS_TRIGGER_BY_NAME: 1
471 FUZZER_TEST_DIR: components/mdns/test_afl_fuzz_host
473 test_lwip_dns_fuzzer_on_host:
474 <<: *host_fuzzer_test_template
476 BOT_NEEDS_TRIGGER_BY_NAME: 1
477 FUZZER_TEST_DIR: components/lwip/test_afl_host
478 FUZZER_PARAMS: MODE=dns
480 test_lwip_dhcp_fuzzer_on_host:
481 <<: *host_fuzzer_test_template
483 BOT_NEEDS_TRIGGER_BY_NAME: 1
484 FUZZER_TEST_DIR: components/lwip/test_afl_host
485 FUZZER_PARAMS: MODE=dhcp_client
487 test_lwip_dhcps_fuzzer_on_host:
488 <<: *host_fuzzer_test_template
490 BOT_NEEDS_TRIGGER_BY_NAME: 1
491 FUZZER_TEST_DIR: components/lwip/test_afl_host
492 FUZZER_PARAMS: MODE=dhcp_server
495 <<: *host_test_template
497 - cd components/spiffs/test_spiffs_host/
500 test_multi_heap_on_host:
501 <<: *host_test_template
503 - cd components/heap/test_multi_heap_host
504 - ./test_all_configs.sh
507 <<: *host_test_template
509 - cd tools/kconfig_new/test
510 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./test_confserver.py
513 <<: *host_test_template
515 - ${IDF_PATH}/tools/ci/test_configure_ci_environment.sh
516 - rm -rf test_build_system
517 - mkdir test_build_system
518 - cd test_build_system
519 - ${IDF_PATH}/tools/ci/test_build_system.sh
521 test_build_system_cmake:
522 <<: *host_test_template
524 - ${IDF_PATH}/tools/ci/test_configure_ci_environment.sh
525 - rm -rf test_build_system
526 - mkdir test_build_system
527 - cd test_build_system
528 - ${IDF_PATH}/tools/ci/test_build_system_cmake.sh
531 <<: *host_test_template
535 - tools/test_idf_monitor/outputs/*
538 - cd ${IDF_PATH}/tools/test_idf_monitor
539 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./run_test_idf_monitor.py
542 <<: *host_test_template
546 - tools/test_idf_size/output
547 - tools/test_idf_size/.coverage
550 - cd ${IDF_PATH}/tools/test_idf_size
551 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./test.sh
553 test_esp_err_to_name_on_host:
554 <<: *host_test_template
558 - components/esp32/esp_err_to_name.c
561 - cd ${IDF_PATH}/tools/
562 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh -p 2.7.15 ./gen_esp_err_to_name.py
563 - git diff --exit-code -- ../components/esp32/esp_err_to_name.c || (echo 'Differences found. Please run gen_esp_err_to_name.py and commit the changes.'; exit 1)
564 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh -p 3.4.8 ./gen_esp_err_to_name.py
565 - git diff --exit-code -- ../components/esp32/esp_err_to_name.c || (echo 'Differences found between running under Python 2 and 3.'; exit 1)
568 <<: *host_test_template
572 - components/espcoredump/test/.coverage
573 - components/espcoredump/test/output
576 - cd components/espcoredump/test/
577 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./test_espcoredump.sh
581 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
587 - /^v\d+\.\d+(\.\d+)?($|-)/
590 before_script: *do_nothing_before
594 - echo -n $GH_PUSH_KEY > ~/.ssh/id_rsa_base64
595 - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
596 - chmod 600 ~/.ssh/id_rsa
597 - echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
598 - git remote remove github &>/dev/null || true
599 - git remote add github git@github.com:espressif/esp-idf.git
600 - tools/ci/push_to_github.sh
604 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
611 - /^v\d+\.\d+(\.\d+)?($|-)/
614 - $BOT_TRIGGER_WITH_LABEL == null
615 - $BOT_LABEL_BUILD_DOCS
618 before_script: *do_nothing_before
622 - echo -n $DOCS_DEPLOY_KEY > ~/.ssh/id_rsa_base64
623 - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
624 - chmod 600 ~/.ssh/id_rsa
625 - echo -e "Host $DOCS_SERVER\n\tStrictHostKeyChecking no\n\tUser $DOCS_SERVER_USER\n" >> ~/.ssh/config
626 - export GIT_VER=$(git describe --always)
629 - tar czvf $GIT_VER.tar.gz $GIT_VER
630 - scp $GIT_VER.tar.gz $DOCS_SERVER:$DOCS_PATH/en
631 - ssh $DOCS_SERVER -x "cd $DOCS_PATH/en && tar xzvf $GIT_VER.tar.gz && rm -f latest && ln -s $GIT_VER latest"
632 - cd ../../zh_CN/_build/
634 - tar czvf $GIT_VER.tar.gz $GIT_VER
635 - scp $GIT_VER.tar.gz $DOCS_SERVER:$DOCS_PATH/zh_CN
636 - ssh $DOCS_SERVER -x "cd $DOCS_PATH/zh_CN && tar xzvf $GIT_VER.tar.gz && rm -f latest && ln -s $GIT_VER latest"
637 # add link to preview doc
638 - echo "[document preview][en] $CI_DOCKER_REGISTRY/docs/esp-idf/en/${GIT_VER}/index.html"
639 - echo "[document preview][zh_CN] $CI_DOCKER_REGISTRY/docs/esp-idf/zh_CN/${GIT_VER}/index.html"
643 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
648 # can only be triggered
651 - $BOT_TRIGGER_WITH_LABEL == null
652 - $BOT_LABEL_BUILD_DOCS
655 - docs/_build/linkcheck
658 # must be triggered with CHECK_LINKS=Yes, otherwise exit without test
659 - test "$CHECK_LINKS" = "Yes" || exit 0
660 # can only run on master branch (otherwise the commit is not on Github yet)
661 - test "${CI_COMMIT_REF_NAME}" = "master" || exit 0
665 .check_job_template: &check_job_template
667 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
671 before_script: *do_nothing_before_no_filter
674 <<: *check_job_template
676 - tools/ci/check-line-endings.sh ${IDF_PATH}
679 <<: *check_job_template
682 - git log -n10 --oneline
683 # commit start with "WIP: " need to be squashed before merge
684 - 'git log --pretty=%s master.. -- | grep "^WIP: " && exit 1 || exit 0'
687 <<: *check_job_template
689 - tools/ci/check-executable.sh
691 check_examples_cmake_make:
692 <<: *check_job_template
696 - /^v\d+\.\d+(\.\d+)?($|-)/
697 before_script: *do_nothing_before
699 - tools/ci/check_examples_cmake_make.sh
703 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
709 - /^v\d+\.\d+(\.\d+)?($|-)/
711 before_script: *do_nothing_before
713 - tools/ci/check_ut_cmake_make.sh
715 check_submodule_sync:
716 <<: *check_job_template
720 # check if all submodules are correctly synced to public repostory
721 - git submodule update --init --recursive
723 check_artifacts_expire_time:
724 <<: *check_job_template
726 # check if we have set expire time for all artifacts
727 - python tools/ci/check_artifacts_expire_time.py
729 check_pipeline_triggered_by_label:
730 <<: *check_job_template
734 - $BOT_TRIGGER_WITH_LABEL
736 # If the pipeline is triggered with label, the pipeline will only succeeded if "regular_test" label is added.
737 # We want to make sure some jobs are always executed to detect regression.
738 - test "$BOT_LABEL_REGULAR_TEST" = "true" || exit -1
743 image: $CI_DOCKER_REGISTRY/ubuntu-test-env$BOT_DOCKER_IMAGE_TAG
745 # gitlab ci do not support match job with RegEx or wildcard now in dependencies.
746 # we have a lot build example jobs. now we don't use dependencies, just download all artificats of build stage.
751 - build_esp_idf_tests
753 TEST_FW_PATH: "$CI_PROJECT_DIR/tools/tiny-test-fw"
754 EXAMPLE_CONFIG_OUTPUT_PATH: "$CI_PROJECT_DIR/examples/test_configs"
757 - components/idf_test/*/CIConfigs
758 - components/idf_test/*/TC.sqlite
759 - $EXAMPLE_CONFIG_OUTPUT_PATH
763 - $BOT_TRIGGER_WITH_LABEL == null
764 - $BOT_LABEL_UNIT_TEST
765 - $BOT_LABEL_INTEGRATION_TEST
766 - $BOT_LABEL_EXAMPLE_TEST
767 before_script: *add_gitlab_key_before
769 # assign example tests
770 - python $TEST_FW_PATH/CIAssignExampleTest.py $IDF_PATH/examples $IDF_PATH/.gitlab-ci.yml $EXAMPLE_CONFIG_OUTPUT_PATH
771 # assign unit test cases
772 - python $TEST_FW_PATH/CIAssignUnitTest.py $IDF_PATH/components/idf_test/unit_test/TestCaseAll.yml $IDF_PATH/.gitlab-ci.yml $IDF_PATH/components/idf_test/unit_test/CIConfigs
773 # clone test script to assign tests
774 - git clone $TEST_SCRIPT_REPOSITORY
775 - cd auto_test_script
776 - python $CHECKOUT_REF_SCRIPT auto_test_script
777 # assgin integration test cases
778 - python CIAssignTestCases.py -t $IDF_PATH/components/idf_test/integration_test -c $IDF_PATH/.gitlab-ci.yml -b $IDF_PATH/SSC/ssc_bin
780 .example_test_template: &example_test_template
781 stage: integration_test
787 - /^v\d+\.\d+(\.\d+)?($|-)/
791 - $BOT_TRIGGER_WITH_LABEL == null
792 - $BOT_LABEL_EXAMPLE_TEST
795 - build_examples_make_00
796 - build_examples_make_01
797 - build_examples_make_02
798 - build_examples_make_03
799 - build_examples_make_04
800 - build_examples_make_05
801 - build_examples_make_06
802 - build_examples_make_07
803 - build_examples_cmake_00
804 - build_examples_cmake_01
805 - build_examples_cmake_02
806 - build_examples_cmake_03
807 - build_examples_cmake_04
808 - build_examples_cmake_05
809 - build_examples_cmake_06
810 - build_examples_cmake_07
817 TEST_FW_PATH: "$CI_PROJECT_DIR/tools/tiny-test-fw"
818 TEST_CASE_PATH: "$CI_PROJECT_DIR/examples"
819 CONFIG_FILE: "$CI_PROJECT_DIR/examples/test_configs/$CI_JOB_NAME.yml"
820 LOG_PATH: "$CI_PROJECT_DIR/TEST_LOGS"
821 ENV_FILE: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/EnvConfig.yml"
823 # first test if config file exists, if not exist, exit 0
824 - test -e $CONFIG_FILE || exit 0
825 # clone test env configs
826 - git clone $TEST_ENV_CONFIG_REPOSITORY
827 - cd ci-test-runner-configs
828 - python $CHECKOUT_REF_SCRIPT ci-test-runner-configs
831 - python Runner.py $TEST_CASE_PATH -c $CONFIG_FILE -e $ENV_FILE
833 .unit_test_template: &unit_test_template
834 <<: *example_test_template
838 - build_esp_idf_tests
843 - /^v\d+\.\d+(\.\d+)?($|-)/
847 - $BOT_TRIGGER_WITH_LABEL == null
848 - $BOT_LABEL_UNIT_TEST
850 TEST_FW_PATH: "$CI_PROJECT_DIR/tools/tiny-test-fw"
851 TEST_CASE_PATH: "$CI_PROJECT_DIR/tools/unit-test-app"
852 CONFIG_FILE: "$CI_PROJECT_DIR/components/idf_test/unit_test/CIConfigs/$CI_JOB_NAME.yml"
853 LOG_PATH: "$CI_PROJECT_DIR/TEST_LOGS"
854 ENV_FILE: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/EnvConfig.yml"
856 .test_template: &test_template
857 stage: integration_test
863 - /^v\d+\.\d+(\.\d+)?($|-)/
867 - $BOT_TRIGGER_WITH_LABEL == null
868 - $BOT_LABEL_INTEGRATION_TEST
880 LOCAL_ENV_CONFIG_PATH: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/ESP32_IDF"
881 LOG_PATH: "$CI_PROJECT_DIR/$CI_COMMIT_SHA"
882 TEST_CASE_FILE_PATH: "$CI_PROJECT_DIR/components/idf_test/integration_test"
883 MODULE_UPDATE_FILE: "$CI_PROJECT_DIR/components/idf_test/ModuleDefinition.yml"
884 CONFIG_FILE: "$CI_PROJECT_DIR/components/idf_test/integration_test/CIConfigs/$CI_JOB_NAME.yml"
885 before_script: *add_gitlab_key_before
887 # first test if config file exists, if not exist, exit 0
888 - test -e $CONFIG_FILE || exit 0
889 # clone local test env configs
890 - git clone $TEST_ENV_CONFIG_REPOSITORY
891 - cd ci-test-runner-configs
892 - python $CHECKOUT_REF_SCRIPT ci-test-runner-configs
894 - git clone $TEST_SCRIPT_REPOSITORY
895 - cd auto_test_script
896 - python $CHECKOUT_REF_SCRIPT auto_test_script
898 - python CIRunner.py -l "$LOG_PATH/$CI_JOB_NAME" -c $CONFIG_FILE -e $LOCAL_ENV_CONFIG_PATH -t $TEST_CASE_FILE_PATH -m $MODULE_UPDATE_FILE
912 # clone local test env configs
913 - git clone $TEST_ENV_CONFIG_REPOSITORY
914 - cd ci-test-runner-configs
915 - python $CHECKOUT_REF_SCRIPT ci-test-runner-configs
917 - git clone $TEST_SCRIPT_REPOSITORY
918 - cd auto_test_script
919 - git checkout ${CI_COMMIT_REF_NAME} || echo "Using default branch..."
921 - ./Tools/prepare_nvs_bin.sh
923 - python CIRunner.py -l "$LOG_PATH/$CI_JOB_NAME" -c $CONFIG_FILE -e $LOCAL_ENV_CONFIG_PATH -t $TEST_CASE_FILE_PATH -m $MODULE_UPDATE_FILE
926 <<: *example_test_template
932 <<: *example_test_template
938 <<: *example_test_template
939 image: $CI_DOCKER_REGISTRY/ubuntu-test-env$BOT_DOCKER_IMAGE_TAG
945 <<: *example_test_template
951 <<: *example_test_template
957 <<: *example_test_template
963 <<: *unit_test_template
969 <<: *unit_test_template
975 <<: *unit_test_template
981 <<: *unit_test_template
987 <<: *unit_test_template
993 <<: *unit_test_template
999 <<: *unit_test_template
1005 <<: *unit_test_template
1011 <<: *unit_test_template
1017 <<: *unit_test_template
1023 <<: *unit_test_template
1029 <<: *unit_test_template
1035 <<: *unit_test_template
1041 <<: *unit_test_template
1047 <<: *unit_test_template
1053 <<: *unit_test_template
1059 <<: *unit_test_template
1065 <<: *unit_test_template
1071 <<: *unit_test_template
1077 <<: *unit_test_template
1083 <<: *unit_test_template
1089 <<: *unit_test_template
1095 <<: *unit_test_template
1101 <<: *unit_test_template
1107 <<: *unit_test_template
1113 <<: *unit_test_template
1119 <<: *unit_test_template
1125 <<: *unit_test_template
1131 <<: *unit_test_template
1137 <<: *unit_test_template
1143 <<: *unit_test_template
1149 <<: *unit_test_template
1155 <<: *unit_test_template
1161 <<: *unit_test_template
1167 <<: *unit_test_template
1173 <<: *unit_test_template
1179 <<: *unit_test_template
1185 <<: *unit_test_template
1191 <<: *unit_test_template
1197 <<: *unit_test_template
1203 <<: *unit_test_template
1209 <<: *unit_test_template
1215 <<: *unit_test_template
1221 <<: *unit_test_template
1227 <<: *unit_test_template
1234 <<: *unit_test_template
1241 <<: *unit_test_template
1248 <<: *unit_test_template
1255 <<: *unit_test_template
1262 <<: *unit_test_template
1269 <<: *unit_test_template
1276 <<: *unit_test_template
1283 <<: *unit_test_template
1290 <<: *unit_test_template
1297 <<: *unit_test_template
1304 <<: *unit_test_template
1311 <<: *unit_test_template
1318 <<: *unit_test_template
1325 <<: *unit_test_template
1332 <<: *unit_test_template
1339 <<: *unit_test_template
1345 <<: *unit_test_template
1351 <<: *unit_test_template
1357 <<: *unit_test_template
1364 <<: *unit_test_template
1370 <<: *unit_test_template
1376 <<: *unit_test_template
1382 <<: *unit_test_template
1389 <<: *unit_test_template
1395 <<: *unit_test_template
1401 <<: *unit_test_template
1407 <<: *unit_test_template
1414 <<: *unit_test_template
1420 <<: *unit_test_template
1426 <<: *unit_test_template
1432 <<: *unit_test_template
1439 <<: *unit_test_template
1445 <<: *unit_test_template
1451 <<: *unit_test_template
1457 <<: *unit_test_template
1464 <<: *unit_test_template
1470 <<: *unit_test_template
1476 <<: *unit_test_template
1482 <<: *unit_test_template
1489 <<: *unit_test_template
1496 <<: *unit_test_template
1503 <<: *unit_test_template
1510 <<: *unit_test_template
1517 <<: *unit_test_template