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 # Set the variable for 'esp-idf-template' testing
125 - ESP_IDF_TEMPLATE_GIT=${ESP_IDF_TEMPLATE_GIT:-"https://github.com/espressif/esp-idf-template.git"}
126 - git clone ${ESP_IDF_TEMPLATE_GIT}
127 - cd esp-idf-template
128 # Try to use the same branch name for esp-idf-template that we're
129 # using on esp-idf. If it doesn't exist then just stick to the default
131 - python $CHECKOUT_REF_SCRIPT esp-idf-template
133 # Test debug build (default)
135 # Now test release build
137 - sed -i.bak -e's/CONFIG_OPTIMIZATION_LEVEL_DEBUG\=y/CONFIG_OPTIMIZATION_LEVEL_RELEASE=y/' sdkconfig
139 # Check if there are any stray printf/ets_printf references in WiFi libs
140 - cd ../components/esp32/lib
141 - test $(xtensa-esp32-elf-nm *.a | grep -w printf | wc -l) -eq 0
142 - test $(xtensa-esp32-elf-nm *.a | grep -w ets_printf | wc -l) -eq 0
145 .build_template: &build_template
147 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
154 .build_ssc_template: &build_ssc_template
161 SSC_CONFIG_FOLDER: "$CI_PROJECT_DIR/SSC/configs/ESP32_IDF"
164 - $BOT_TRIGGER_WITH_LABEL == null
166 - $BOT_LABEL_INTEGRATION_TEST
167 - $BOT_LABEL_REGULAR_TEST
169 - git clone $SSC_REPOSITORY
171 - python $CHECKOUT_REF_SCRIPT SSC
172 - MAKEFLAGS= ./ci_build_ssc.sh "${CI_JOB_NAME}" "${IDF_PATH}/.gitlab-ci.yml"
174 # don't forget to add to dependency to test_template when adding new build_ssc jobs
176 <<: *build_ssc_template
179 <<: *build_ssc_template
182 <<: *build_ssc_template
184 # If you want to add new build ssc jobs, please add it into dependencies of `assign_test` and `.test_template`
190 - tools/unit-test-app/output
191 - components/idf_test/unit_test/TestCaseAll.yml
192 - components/idf_test/unit_test/CIConfigs/*.yml
196 - $BOT_TRIGGER_WITH_LABEL == null
198 - $BOT_LABEL_UNIT_TEST
199 - $BOT_LABEL_REGULAR_TEST
201 - export PATH="$IDF_PATH/tools:$PATH"
202 - cd $CI_PROJECT_DIR/tools/unit-test-app
203 - export EXTRA_CFLAGS="-Werror -Werror=deprecated-declarations"
204 - export EXTRA_CXXFLAGS=${EXTRA_CFLAGS}
205 # Build with CMake first
206 - idf.py ut-clean-all-configs
207 - idf.py ut-build-all-configs
208 - python tools/UnitTestParser.py
209 # Check if test demands CMake or Make built binaries. If CMake leave the built artifacts as is then exit.
210 - if [ "$UNIT_TEST_BUILD_SYSTEM" == "cmake" ]; then exit 0; fi
211 # If Make, delete the CMake built artifacts
212 - rm -rf builds output sdkconfig
213 - rm -rf components/idf_test/unit_test/TestCaseAll.yml
214 - rm -rf components/idf_test/unit_test/CIConfigs/*.yml
215 # Then build with Make
216 - cd $CI_PROJECT_DIR/tools/unit-test-app
217 - MAKEFLAGS= make help # make sure kconfig tools are built in single process
218 - make ut-clean-all-configs
219 - make ut-build-all-configs
220 - python tools/UnitTestParser.py
222 .build_examples_make_template: &build_examples_make_template
224 # This is a workaround for a rarely encountered issue with building examples in CI.
225 # Probably related to building of Kconfig in 'make clean' stage
230 - build_examples/*/*/*/build/*.bin
231 - build_examples/*/*/*/build/*.elf
232 - build_examples/*/*/*/build/*.map
233 - build_examples/*/*/*/build/download.config
234 - build_examples/*/*/*/build/bootloader/*.bin
239 LOG_PATH: "$CI_PROJECT_DIR/log_examples_make"
242 - $BOT_TRIGGER_WITH_LABEL == null
244 - $BOT_LABEL_EXAMPLE_TEST
245 - $BOT_LABEL_REGULAR_TEST
247 # it's not possible to build 100% out-of-tree and have the "artifacts"
248 # mechanism work, but this is the next best thing
249 - rm -rf build_examples
250 - mkdir build_examples
252 # build some of examples
253 - mkdir -p ${LOG_PATH}
254 - ${IDF_PATH}/tools/ci/build_examples.sh "${CI_JOB_NAME}"
256 # same as above, but for CMake
257 .build_examples_cmake_template: &build_examples_cmake_template
262 - build_examples_cmake/*/*/*/build/*.bin
263 - build_examples_cmake/*/*/*/build/*.elf
264 - build_examples_cmake/*/*/*/build/*.map
265 - build_examples_cmake/*/*/*/build/download.config
266 - build_examples_cmake/*/*/*/build/bootloader/*.bin
271 LOG_PATH: "$CI_PROJECT_DIR/log_examples_cmake"
274 - $BOT_TRIGGER_WITH_LABEL == null
276 - $BOT_LABEL_EXAMPLE_TEST
277 - $BOT_LABEL_REGULAR_TEST
279 # it's not possible to build 100% out-of-tree and have the "artifacts"
280 # mechanism work, but this is the next best thing
281 - rm -rf build_examples_cmake
282 - mkdir build_examples_cmake
283 - cd build_examples_cmake
284 # build some of examples
285 - mkdir -p ${LOG_PATH}
286 - ${IDF_PATH}/tools/ci/build_examples_cmake.sh "${CI_JOB_NAME}"
288 build_examples_make_00:
289 <<: *build_examples_make_template
291 build_examples_make_01:
292 <<: *build_examples_make_template
294 build_examples_make_02:
295 <<: *build_examples_make_template
297 build_examples_make_03:
298 <<: *build_examples_make_template
300 build_examples_make_04:
301 <<: *build_examples_make_template
303 build_examples_make_05:
304 <<: *build_examples_make_template
306 build_examples_make_06:
307 <<: *build_examples_make_template
309 build_examples_make_07:
310 <<: *build_examples_make_template
312 build_examples_cmake_00:
313 <<: *build_examples_cmake_template
315 build_examples_cmake_01:
316 <<: *build_examples_cmake_template
318 build_examples_cmake_02:
319 <<: *build_examples_cmake_template
321 build_examples_cmake_03:
322 <<: *build_examples_cmake_template
324 build_examples_cmake_04:
325 <<: *build_examples_cmake_template
327 build_examples_cmake_05:
328 <<: *build_examples_cmake_template
330 build_examples_cmake_06:
331 <<: *build_examples_cmake_template
333 build_examples_cmake_07:
334 <<: *build_examples_cmake_template
336 # If you want to add new build example jobs, please add it into dependencies of `.example_test_template`
340 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
346 # English version of documentation
347 - docs/en/doxygen-warning-log.txt
348 - docs/en/sphinx-warning-log.txt
349 - docs/en/sphinx-warning-log-sanitized.txt
350 - docs/en/_build/html
352 # Chinese version of documentation
353 - docs/zh_CN/doxygen-warning-log.txt
354 - docs/zh_CN/sphinx-warning-log.txt
355 - docs/zh_CN/sphinx-warning-log-sanitized.txt
356 - docs/zh_CN/_build/html
360 - $BOT_TRIGGER_WITH_LABEL == null
362 - $BOT_LABEL_BUILD_DOCS
363 - $BOT_LABEL_REGULAR_TEST
366 - ./check_lang_folder_sync.sh
370 - ../check_doc_warnings.sh
374 - ../check_doc_warnings.sh
378 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
381 - $BOT_TRIGGER_WITH_LABEL == null
383 - $BOT_LABEL_REGULAR_TEST
385 tools/cmake/run_cmake_lint.sh
387 .host_test_template: &host_test_template
389 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
395 - $BOT_TRIGGER_WITH_LABEL == null
396 - $BOT_LABEL_HOST_TEST
397 - $BOT_LABEL_REGULAR_TEST
400 <<: *host_test_template
402 - cd components/nvs_flash/test_nvs_host
406 <<: *host_test_template
409 - components/nvs_flash/test_nvs_host/coverage_report
415 - $BOT_LABEL_NVS_COVERAGE
417 - cd components/nvs_flash/test_nvs_host
418 - make coverage_report
420 test_partition_table_on_host:
421 <<: *host_test_template
425 - cd components/partition_table/test_gen_esp32part_host
426 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./gen_esp32part_tests.py
429 <<: *host_test_template
432 - components/wear_levelling/test_wl_host/coverage_report.zip
435 - cd components/wear_levelling/test_wl_host
439 <<: *host_test_template
441 - cd components/fatfs/test_fatfs_host/
445 <<: *host_test_template
447 - cd tools/ldgen/test
448 - ./test_fragments.py
449 - ./test_generation.py
451 .host_fuzzer_test_template: &host_fuzzer_test_template
453 image: $CI_DOCKER_REGISTRY/afl-fuzzer-test
460 - ${FUZZER_TEST_DIR}/out/crashes
461 - ${FUZZER_TEST_DIR}/fuzz_output.log
465 # can only be triggered
468 - $BOT_LABEL_FUZZER_TEST
470 - export AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES=1 && export AFL_SKIP_CPUFREQ=1
471 - cd ${FUZZER_TEST_DIR}
472 # run AFL fuzzer for one hour
473 - ( ( make ${FUZZER_PARAMS} fuzz | tee fuzz_output.log | grep -v '\(Fuzzing test case\|Entering queue cycle\)' ) || pkill sleep ) &
474 - ( sleep 3600 || mkdir -p out/crashes/env_failed ) && pkill afl-fuz
475 # check no crashes found
476 - test -z "$(ls out/crashes/)" || exit 1
478 test_mdns_fuzzer_on_host:
479 <<: *host_fuzzer_test_template
481 BOT_NEEDS_TRIGGER_BY_NAME: 1
482 FUZZER_TEST_DIR: components/mdns/test_afl_fuzz_host
484 test_lwip_dns_fuzzer_on_host:
485 <<: *host_fuzzer_test_template
487 BOT_NEEDS_TRIGGER_BY_NAME: 1
488 FUZZER_TEST_DIR: components/lwip/test_afl_host
489 FUZZER_PARAMS: MODE=dns
491 test_lwip_dhcp_fuzzer_on_host:
492 <<: *host_fuzzer_test_template
494 BOT_NEEDS_TRIGGER_BY_NAME: 1
495 FUZZER_TEST_DIR: components/lwip/test_afl_host
496 FUZZER_PARAMS: MODE=dhcp_client
498 test_lwip_dhcps_fuzzer_on_host:
499 <<: *host_fuzzer_test_template
501 BOT_NEEDS_TRIGGER_BY_NAME: 1
502 FUZZER_TEST_DIR: components/lwip/test_afl_host
503 FUZZER_PARAMS: MODE=dhcp_server
506 <<: *host_test_template
508 - cd components/spiffs/test_spiffs_host/
511 test_multi_heap_on_host:
512 <<: *host_test_template
514 - cd components/heap/test_multi_heap_host
515 - ./test_all_configs.sh
518 <<: *host_test_template
520 - cd tools/kconfig_new/test
521 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./test_confserver.py
524 <<: *host_test_template
526 - ${IDF_PATH}/tools/ci/test_configure_ci_environment.sh
527 - rm -rf test_build_system
528 - mkdir test_build_system
529 - cd test_build_system
530 - ${IDF_PATH}/tools/ci/test_build_system.sh
532 test_build_system_cmake:
533 <<: *host_test_template
535 - ${IDF_PATH}/tools/ci/test_configure_ci_environment.sh
536 - rm -rf test_build_system
537 - mkdir test_build_system
538 - cd test_build_system
539 - ${IDF_PATH}/tools/ci/test_build_system_cmake.sh
542 <<: *host_test_template
546 - tools/test_idf_monitor/outputs/*
549 - cd ${IDF_PATH}/tools/test_idf_monitor
550 - ./run_test_idf_monitor.py
553 <<: *host_test_template
557 - tools/test_idf_size/output
558 - tools/test_idf_size/.coverage
561 - cd ${IDF_PATH}/tools/test_idf_size
562 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./test.sh
564 test_esp_err_to_name_on_host:
565 <<: *host_test_template
569 - components/esp32/esp_err_to_name.c
572 - cd ${IDF_PATH}/tools/
573 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh -p 2.7.15 ./gen_esp_err_to_name.py
574 - 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)
575 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh -p 3.4.8 ./gen_esp_err_to_name.py
576 - git diff --exit-code -- ../components/esp32/esp_err_to_name.c || (echo 'Differences found between running under Python 2 and 3.'; exit 1)
579 <<: *host_test_template
583 - components/espcoredump/test/.coverage
584 - components/espcoredump/test/output
587 - cd components/espcoredump/test/
588 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./test_espcoredump.sh
592 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
598 - /^v\d+\.\d+(\.\d+)?($|-)/
601 before_script: *do_nothing_before
605 - echo -n $GH_PUSH_KEY > ~/.ssh/id_rsa_base64
606 - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
607 - chmod 600 ~/.ssh/id_rsa
608 - echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
609 - git remote remove github &>/dev/null || true
610 - git remote add github git@github.com:espressif/esp-idf.git
611 - tools/ci/push_to_github.sh
615 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
622 - /^v\d+\.\d+(\.\d+)?($|-)/
625 - $BOT_TRIGGER_WITH_LABEL == null
626 - $BOT_LABEL_BUILD_DOCS
629 before_script: *do_nothing_before
633 - echo -n $DOCS_DEPLOY_KEY > ~/.ssh/id_rsa_base64
634 - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
635 - chmod 600 ~/.ssh/id_rsa
636 - echo -e "Host $DOCS_SERVER\n\tStrictHostKeyChecking no\n\tUser $DOCS_SERVER_USER\n" >> ~/.ssh/config
637 - export GIT_VER=$(git describe --always)
640 - tar czvf $GIT_VER.tar.gz $GIT_VER
641 - scp $GIT_VER.tar.gz $DOCS_SERVER:$DOCS_PATH/en
642 - ssh $DOCS_SERVER -x "cd $DOCS_PATH/en && tar xzvf $GIT_VER.tar.gz && rm -f latest && ln -s $GIT_VER latest"
643 - cd ../../zh_CN/_build/
645 - tar czvf $GIT_VER.tar.gz $GIT_VER
646 - scp $GIT_VER.tar.gz $DOCS_SERVER:$DOCS_PATH/zh_CN
647 - ssh $DOCS_SERVER -x "cd $DOCS_PATH/zh_CN && tar xzvf $GIT_VER.tar.gz && rm -f latest && ln -s $GIT_VER latest"
648 # add link to preview doc
649 - echo "[document preview][en] $CI_DOCKER_REGISTRY/docs/esp-idf/en/${GIT_VER}/index.html"
650 - echo "[document preview][zh_CN] $CI_DOCKER_REGISTRY/docs/esp-idf/zh_CN/${GIT_VER}/index.html"
654 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
659 # can only be triggered
662 - $BOT_TRIGGER_WITH_LABEL == null
663 - $BOT_LABEL_BUILD_DOCS
666 - docs/_build/linkcheck
669 # must be triggered with CHECK_LINKS=Yes, otherwise exit without test
670 - test "$CHECK_LINKS" = "Yes" || exit 0
671 # can only run on master branch (otherwise the commit is not on Github yet)
672 - test "${CI_COMMIT_REF_NAME}" = "master" || exit 0
676 .check_job_template: &check_job_template
678 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
682 before_script: *do_nothing_before_no_filter
685 <<: *check_job_template
687 - tools/ci/check-line-endings.sh ${IDF_PATH}
690 <<: *check_job_template
693 - git log -n10 --oneline
694 # commit start with "WIP: " need to be squashed before merge
695 - 'git log --pretty=%s master.. -- | grep "^WIP: " && exit 1 || exit 0'
698 <<: *check_job_template
700 - tools/ci/check-executable.sh
702 check_examples_cmake_make:
703 <<: *check_job_template
707 - /^v\d+\.\d+(\.\d+)?($|-)/
708 before_script: *do_nothing_before
710 - tools/ci/check_examples_cmake_make.sh
714 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
720 - /^v\d+\.\d+(\.\d+)?($|-)/
722 before_script: *do_nothing_before
724 - tools/ci/check_ut_cmake_make.sh
726 check_submodule_sync:
727 <<: *check_job_template
731 # check if all submodules are correctly synced to public repostory
732 - git submodule update --init --recursive
734 check_artifacts_expire_time:
735 <<: *check_job_template
737 # check if we have set expire time for all artifacts
738 - python tools/ci/check_artifacts_expire_time.py
740 check_pipeline_triggered_by_label:
741 <<: *check_job_template
745 - $BOT_TRIGGER_WITH_LABEL
747 # If the pipeline is triggered with label, the pipeline will only succeeded if "regular_test" label is added.
748 # We want to make sure some jobs are always executed to detect regression.
749 - test "$BOT_LABEL_REGULAR_TEST" = "true" || exit -1
754 image: $CI_DOCKER_REGISTRY/ubuntu-test-env$BOT_DOCKER_IMAGE_TAG
756 # gitlab ci do not support match job with RegEx or wildcard now in dependencies.
757 # we have a lot build example jobs. now we don't use dependencies, just download all artificats of build stage.
762 - build_esp_idf_tests
764 TEST_FW_PATH: "$CI_PROJECT_DIR/tools/tiny-test-fw"
765 EXAMPLE_CONFIG_OUTPUT_PATH: "$CI_PROJECT_DIR/examples/test_configs"
768 - components/idf_test/*/CIConfigs
769 - components/idf_test/*/TC.sqlite
770 - $EXAMPLE_CONFIG_OUTPUT_PATH
774 - $BOT_TRIGGER_WITH_LABEL == null
775 - $BOT_LABEL_UNIT_TEST
776 - $BOT_LABEL_INTEGRATION_TEST
777 - $BOT_LABEL_EXAMPLE_TEST
778 before_script: *add_gitlab_key_before
780 # assign example tests
781 - python $TEST_FW_PATH/CIAssignExampleTest.py $IDF_PATH/examples $IDF_PATH/.gitlab-ci.yml $EXAMPLE_CONFIG_OUTPUT_PATH
782 # assign unit test cases
783 - 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
784 # clone test script to assign tests
785 - git clone $TEST_SCRIPT_REPOSITORY
786 - cd auto_test_script
787 - python $CHECKOUT_REF_SCRIPT auto_test_script
788 # assgin integration test cases
789 - python CIAssignTestCases.py -t $IDF_PATH/components/idf_test/integration_test -c $IDF_PATH/.gitlab-ci.yml -b $IDF_PATH/SSC/ssc_bin
791 .example_test_template: &example_test_template
792 stage: integration_test
798 - /^v\d+\.\d+(\.\d+)?($|-)/
802 - $BOT_TRIGGER_WITH_LABEL == null
803 - $BOT_LABEL_EXAMPLE_TEST
806 - build_examples_make_00
807 - build_examples_make_01
808 - build_examples_make_02
809 - build_examples_make_03
810 - build_examples_make_04
811 - build_examples_make_05
812 - build_examples_make_06
813 - build_examples_make_07
814 - build_examples_cmake_00
815 - build_examples_cmake_01
816 - build_examples_cmake_02
817 - build_examples_cmake_03
818 - build_examples_cmake_04
819 - build_examples_cmake_05
820 - build_examples_cmake_06
821 - build_examples_cmake_07
828 TEST_FW_PATH: "$CI_PROJECT_DIR/tools/tiny-test-fw"
829 TEST_CASE_PATH: "$CI_PROJECT_DIR/examples"
830 CONFIG_FILE: "$CI_PROJECT_DIR/examples/test_configs/$CI_JOB_NAME.yml"
831 LOG_PATH: "$CI_PROJECT_DIR/TEST_LOGS"
832 ENV_FILE: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/EnvConfig.yml"
834 # first test if config file exists, if not exist, exit 0
835 - test -e $CONFIG_FILE || exit 0
836 # clone test env configs
837 - git clone $TEST_ENV_CONFIG_REPOSITORY
838 - cd ci-test-runner-configs
839 - python $CHECKOUT_REF_SCRIPT ci-test-runner-configs
842 - python Runner.py $TEST_CASE_PATH -c $CONFIG_FILE -e $ENV_FILE
844 .unit_test_template: &unit_test_template
845 <<: *example_test_template
849 - build_esp_idf_tests
854 - /^v\d+\.\d+(\.\d+)?($|-)/
858 - $BOT_TRIGGER_WITH_LABEL == null
859 - $BOT_LABEL_UNIT_TEST
861 TEST_FW_PATH: "$CI_PROJECT_DIR/tools/tiny-test-fw"
862 TEST_CASE_PATH: "$CI_PROJECT_DIR/tools/unit-test-app"
863 CONFIG_FILE: "$CI_PROJECT_DIR/components/idf_test/unit_test/CIConfigs/$CI_JOB_NAME.yml"
864 LOG_PATH: "$CI_PROJECT_DIR/TEST_LOGS"
865 ENV_FILE: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/EnvConfig.yml"
867 .test_template: &test_template
868 stage: integration_test
874 - /^v\d+\.\d+(\.\d+)?($|-)/
878 - $BOT_TRIGGER_WITH_LABEL == null
879 - $BOT_LABEL_INTEGRATION_TEST
891 LOCAL_ENV_CONFIG_PATH: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/ESP32_IDF"
892 LOG_PATH: "$CI_PROJECT_DIR/$CI_COMMIT_SHA"
893 TEST_CASE_FILE_PATH: "$CI_PROJECT_DIR/components/idf_test/integration_test"
894 MODULE_UPDATE_FILE: "$CI_PROJECT_DIR/components/idf_test/ModuleDefinition.yml"
895 CONFIG_FILE: "$CI_PROJECT_DIR/components/idf_test/integration_test/CIConfigs/$CI_JOB_NAME.yml"
896 before_script: *add_gitlab_key_before
898 # first test if config file exists, if not exist, exit 0
899 - test -e $CONFIG_FILE || exit 0
900 # clone local test env configs
901 - git clone $TEST_ENV_CONFIG_REPOSITORY
902 - cd ci-test-runner-configs
903 - python $CHECKOUT_REF_SCRIPT ci-test-runner-configs
905 - git clone $TEST_SCRIPT_REPOSITORY
906 - cd auto_test_script
907 - python $CHECKOUT_REF_SCRIPT auto_test_script
909 - 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
923 # clone local test env configs
924 - git clone $TEST_ENV_CONFIG_REPOSITORY
925 - cd ci-test-runner-configs
926 - python $CHECKOUT_REF_SCRIPT ci-test-runner-configs
928 - git clone $TEST_SCRIPT_REPOSITORY
929 - cd auto_test_script
930 - git checkout ${CI_COMMIT_REF_NAME} || echo "Using default branch..."
932 - ./Tools/prepare_nvs_bin.sh
934 - 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
937 <<: *example_test_template
943 <<: *example_test_template
949 <<: *example_test_template
950 image: $CI_DOCKER_REGISTRY/ubuntu-test-env$BOT_DOCKER_IMAGE_TAG
953 - Example_ShieldBox_Basic
956 <<: *example_test_template
962 <<: *example_test_template
968 <<: *example_test_template
974 <<: *example_test_template
975 image: $CI_DOCKER_REGISTRY/ubuntu-test-env$BOT_DOCKER_IMAGE_TAG
978 - $BOT_LABEL_IPERF_STRESS_TEST
984 <<: *unit_test_template
990 <<: *unit_test_template
996 <<: *unit_test_template
1002 <<: *unit_test_template
1008 <<: *unit_test_template
1014 <<: *unit_test_template
1020 <<: *unit_test_template
1026 <<: *unit_test_template
1032 <<: *unit_test_template
1038 <<: *unit_test_template
1044 <<: *unit_test_template
1050 <<: *unit_test_template
1056 <<: *unit_test_template
1062 <<: *unit_test_template
1068 <<: *unit_test_template
1074 <<: *unit_test_template
1080 <<: *unit_test_template
1086 <<: *unit_test_template
1092 <<: *unit_test_template
1098 <<: *unit_test_template
1104 <<: *unit_test_template
1110 <<: *unit_test_template
1116 <<: *unit_test_template
1122 <<: *unit_test_template
1128 <<: *unit_test_template
1134 <<: *unit_test_template
1140 <<: *unit_test_template
1146 <<: *unit_test_template
1152 <<: *unit_test_template
1158 <<: *unit_test_template
1164 <<: *unit_test_template
1170 <<: *unit_test_template
1176 <<: *unit_test_template
1182 <<: *unit_test_template
1188 <<: *unit_test_template
1194 <<: *unit_test_template
1200 <<: *unit_test_template
1206 <<: *unit_test_template
1212 <<: *unit_test_template
1218 <<: *unit_test_template
1224 <<: *unit_test_template
1230 <<: *unit_test_template
1236 <<: *unit_test_template
1242 <<: *unit_test_template
1248 <<: *unit_test_template
1254 <<: *unit_test_template
1260 <<: *unit_test_template
1267 <<: *unit_test_template
1274 <<: *unit_test_template
1281 <<: *unit_test_template
1288 <<: *unit_test_template
1295 <<: *unit_test_template
1302 <<: *unit_test_template
1309 <<: *unit_test_template
1316 <<: *unit_test_template
1323 <<: *unit_test_template
1330 <<: *unit_test_template
1337 <<: *unit_test_template
1344 <<: *unit_test_template
1351 <<: *unit_test_template
1358 <<: *unit_test_template
1365 <<: *unit_test_template
1372 <<: *unit_test_template
1379 <<: *unit_test_template
1386 <<: *unit_test_template
1392 <<: *unit_test_template
1398 <<: *unit_test_template
1404 <<: *unit_test_template
1411 <<: *unit_test_template
1417 <<: *unit_test_template
1423 <<: *unit_test_template
1429 <<: *unit_test_template
1436 <<: *unit_test_template
1442 <<: *unit_test_template
1448 <<: *unit_test_template
1454 <<: *unit_test_template
1461 <<: *unit_test_template
1467 <<: *unit_test_template
1473 <<: *unit_test_template
1479 <<: *unit_test_template
1486 <<: *unit_test_template
1492 <<: *unit_test_template
1498 <<: *unit_test_template
1504 <<: *unit_test_template
1511 <<: *unit_test_template
1517 <<: *unit_test_template
1523 <<: *unit_test_template
1529 <<: *unit_test_template
1536 <<: *unit_test_template
1543 <<: *unit_test_template
1550 <<: *unit_test_template
1557 <<: *unit_test_template
1564 <<: *unit_test_template