13 # Common parameters for the 'make' during CI tests
14 MAKEFLAGS: "-j5 --no-keep-going"
16 # GitLab-CI environment
18 # more attempts for more robust
19 GET_SOURCES_ATTEMPTS: "10"
20 ARTIFACT_DOWNLOAD_ATTEMPTS: "10"
22 # We use get_sources.sh script to fetch the submodules and/or re-fetch the repo
23 # if it was corrupted (if submodule update fails this can happen)
25 GIT_SUBMODULE_STRATEGY: none
27 UNIT_TEST_BUILD_SYSTEM: make
30 IDF_PATH: "$CI_PROJECT_DIR"
33 APPLY_BOT_FILTER_SCRIPT: "$CI_PROJECT_DIR/tools/ci/apply_bot_filter.py"
34 CHECKOUT_REF_SCRIPT: "$CI_PROJECT_DIR/tools/ci/checkout_project_ref.py"
37 BOT_DOCKER_IMAGE_TAG: ":latest"
39 # When 'fetch' strategy is used, Gitlab removes untracked files before checking out
40 # new revision. However if the new revision doesn't include some of the submodules
41 # which were present in the old revision, such submodule directories would not be
42 # removed by the checkout. This extra step ensures that these stale submodules
44 .git_clean_stale_submodules: &git_clean_stale_submodules >
45 find . -name '.git' -not -path './.git' -printf '%P\n'
48 grep -q {} .gitmodules
49 || (echo "Removing {}, has .git directory but not in .gitmodules file"
52 # before each job, we need to check if this job is filtered by bot stage/job filter
53 .apply_bot_filter: &apply_bot_filter
54 python $APPLY_BOT_FILTER_SCRIPT || exit 0
57 - source tools/ci/setup_python.sh
58 - *git_clean_stale_submodules
59 # apply bot filter in before script
64 - echo -n $GITLAB_KEY > ~/.ssh/id_rsa_base64
65 - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
66 - chmod 600 ~/.ssh/id_rsa
67 - echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
69 # Set IS_PRIVATE or IS_PUBLIC depending on if our branch is public or not
71 # (the same regular expressions are used to set these are used in 'only:' sections below
72 - source tools/ci/configure_ci_environment.sh
74 # fetch the submodules (& if necessary re-fetch repo) from gitlab
75 - time ./tools/ci/get-full-sources.sh
77 # used for check scripts which we want to run unconditionally
78 .do_nothing_before_no_filter:
79 before_script: &do_nothing_before_no_filter
80 - source tools/ci/setup_python.sh
81 - *git_clean_stale_submodules
83 # used for everything else where we want to do no prep, except for bot filter
85 before_script: &do_nothing_before
86 - source tools/ci/setup_python.sh
87 - *git_clean_stale_submodules
88 # apply bot filter in before script
90 - echo "Not setting up GitLab key, not fetching submodules"
91 - source tools/ci/configure_ci_environment.sh
93 .add_gitlab_key_before:
94 before_script: &add_gitlab_key_before
95 - source tools/ci/setup_python.sh
96 - *git_clean_stale_submodules
97 # apply bot filter in before script
99 - echo "Not fetching submodules"
100 - source tools/ci/configure_ci_environment.sh
104 - echo -n $GITLAB_KEY > ~/.ssh/id_rsa_base64
105 - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
106 - chmod 600 ~/.ssh/id_rsa
107 - echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
111 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
118 - $BOT_TRIGGER_WITH_LABEL == null
120 - $BOT_LABEL_REGULAR_TEST
122 # Set the variable for 'esp-idf-template' testing
123 - ESP_IDF_TEMPLATE_GIT=${ESP_IDF_TEMPLATE_GIT:-"https://github.com/espressif/esp-idf-template.git"}
124 - git clone ${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
131 # Test debug build (default)
133 # Now test release build
135 - sed -i.bak -e's/CONFIG_OPTIMIZATION_LEVEL_DEBUG\=y/CONFIG_OPTIMIZATION_LEVEL_RELEASE=y/' sdkconfig
137 # Check if there are any stray printf/ets_printf references in WiFi libs
138 - cd ../components/esp32/lib
139 - test $(xtensa-esp32-elf-nm *.a | grep -w printf | wc -l) -eq 0
140 - test $(xtensa-esp32-elf-nm *.a | grep -w ets_printf | wc -l) -eq 0
143 .build_template: &build_template
145 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
152 .build_ssc_template: &build_ssc_template
159 SSC_CONFIG_FOLDER: "$CI_PROJECT_DIR/SSC/configs/ESP32_IDF"
162 - $BOT_TRIGGER_WITH_LABEL == null
164 - $BOT_LABEL_INTEGRATION_TEST
165 - $BOT_LABEL_REGULAR_TEST
167 - git clone $SSC_REPOSITORY
169 - python $CHECKOUT_REF_SCRIPT SSC
170 - MAKEFLAGS= ./ci_build_ssc.sh "${CI_JOB_NAME}" "${IDF_PATH}/.gitlab-ci.yml"
172 # don't forget to add to dependency to test_template when adding new build_ssc jobs
174 <<: *build_ssc_template
177 <<: *build_ssc_template
180 <<: *build_ssc_template
182 # If you want to add new build ssc jobs, please add it into dependencies of `assign_test` and `.test_template`
185 .build_esp_idf_unit_test_template: &build_esp_idf_unit_test_template
189 - tools/unit-test-app/output
190 - components/idf_test/unit_test/TestCaseAll.yml
194 - $BOT_TRIGGER_WITH_LABEL == null
196 - $BOT_LABEL_UNIT_TEST
197 - $BOT_LABEL_REGULAR_TEST
199 build_esp_idf_tests_make:
200 <<: *build_esp_idf_unit_test_template
202 - export EXTRA_CFLAGS="-Werror -Werror=deprecated-declarations"
203 - export EXTRA_CXXFLAGS=${EXTRA_CFLAGS}
204 - cd $CI_PROJECT_DIR/tools/unit-test-app
205 - MAKEFLAGS= make help # make sure kconfig tools are built in single process
206 - make ut-clean-all-configs
207 - make ut-build-all-configs
208 - python tools/UnitTestParser.py
209 - if [ "$UNIT_TEST_BUILD_SYSTEM" == "make" ]; then exit 0; fi
210 # If Make, delete the CMake built artifacts
211 - rm -rf builds output sdkconfig
212 - rm -rf $CI_PROJECT_DIR/components/idf_test/unit_test/TestCaseAll.yml
213 - rm -rf $CI_PROJECT_DIR/components/idf_test/unit_test/CIConfigs/*.yml
215 build_esp_idf_tests_cmake:
216 <<: *build_esp_idf_unit_test_template
218 - export PATH="$IDF_PATH/tools:$PATH"
219 - export EXTRA_CFLAGS="-Werror -Werror=deprecated-declarations"
220 - export EXTRA_CXXFLAGS=${EXTRA_CFLAGS}
221 - cd $CI_PROJECT_DIR/tools/unit-test-app
222 # Build with CMake first
223 - idf.py ut-clean-all-configs
224 - idf.py ut-build-all-configs
225 - python tools/UnitTestParser.py
226 # Check if test demands CMake or Make built binaries. If CMake leave the built artifacts as is then exit.
227 - if [ "$UNIT_TEST_BUILD_SYSTEM" == "cmake" ]; then exit 0; fi
228 # If Make, delete the CMake built artifacts
229 - rm -rf builds output sdkconfig
230 - rm -rf $CI_PROJECT_DIR/components/idf_test/unit_test/TestCaseAll.yml
231 - rm -rf $CI_PROJECT_DIR/components/idf_test/unit_test/CIConfigs/*.yml
233 .build_examples_make_template: &build_examples_make_template
235 # This is a workaround for a rarely encountered issue with building examples in CI.
236 # Probably related to building of Kconfig in 'make clean' stage
241 - build_examples/*/*/*/build/*.bin
242 - build_examples/*/*/*/sdkconfig
243 - build_examples/*/*/*/build/*.elf
244 - build_examples/*/*/*/build/*.map
245 - build_examples/*/*/*/build/download.config
246 - build_examples/*/*/*/build/bootloader/*.bin
250 LOG_PATH: "$CI_PROJECT_DIR/log_examples_make"
253 - $BOT_TRIGGER_WITH_LABEL == null
255 - $BOT_LABEL_EXAMPLE_TEST
256 - $BOT_LABEL_REGULAR_TEST
258 # it's not possible to build 100% out-of-tree and have the "artifacts"
259 # mechanism work, but this is the next best thing
260 - rm -rf build_examples
261 - mkdir build_examples
263 # build some of examples
264 - mkdir -p ${LOG_PATH}
265 - ${IDF_PATH}/tools/ci/build_examples.sh "${CI_JOB_NAME}"
267 # same as above, but for CMake
268 .build_examples_cmake_template: &build_examples_cmake_template
273 - build_examples_cmake/*/*/*/build/*.bin
274 - build_examples_cmake/*/*/*/sdkconfig
275 - build_examples_cmake/*/*/*/build/*.elf
276 - build_examples_cmake/*/*/*/build/*.map
277 - build_examples_cmake/*/*/*/build/download.config
278 - build_examples_cmake/*/*/*/build/bootloader/*.bin
282 LOG_PATH: "$CI_PROJECT_DIR/log_examples_cmake"
285 - $BOT_TRIGGER_WITH_LABEL == null
287 - $BOT_LABEL_EXAMPLE_TEST
288 - $BOT_LABEL_REGULAR_TEST
290 # it's not possible to build 100% out-of-tree and have the "artifacts"
291 # mechanism work, but this is the next best thing
292 - rm -rf build_examples_cmake
293 - mkdir build_examples_cmake
294 - cd build_examples_cmake
295 # build some of examples
296 - mkdir -p ${LOG_PATH}
297 - ${IDF_PATH}/tools/ci/build_examples_cmake.sh "${CI_JOB_NAME}"
299 build_examples_make_00:
300 <<: *build_examples_make_template
302 build_examples_make_01:
303 <<: *build_examples_make_template
305 build_examples_make_02:
306 <<: *build_examples_make_template
308 build_examples_make_03:
309 <<: *build_examples_make_template
311 build_examples_make_04:
312 <<: *build_examples_make_template
314 build_examples_make_05:
315 <<: *build_examples_make_template
317 build_examples_make_06:
318 <<: *build_examples_make_template
320 build_examples_make_07:
321 <<: *build_examples_make_template
323 build_examples_cmake_00:
324 <<: *build_examples_cmake_template
326 build_examples_cmake_01:
327 <<: *build_examples_cmake_template
329 build_examples_cmake_02:
330 <<: *build_examples_cmake_template
332 build_examples_cmake_03:
333 <<: *build_examples_cmake_template
335 build_examples_cmake_04:
336 <<: *build_examples_cmake_template
338 build_examples_cmake_05:
339 <<: *build_examples_cmake_template
341 build_examples_cmake_06:
342 <<: *build_examples_cmake_template
344 build_examples_cmake_07:
345 <<: *build_examples_cmake_template
347 # If you want to add new build example jobs, please add it into dependencies of `.example_test_template`
351 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
357 # English version of documentation
358 - docs/en/doxygen-warning-log.txt
359 - docs/en/sphinx-warning-log.txt
360 - docs/en/sphinx-warning-log-sanitized.txt
361 - docs/en/_build/html
363 # Chinese version of documentation
364 - docs/zh_CN/doxygen-warning-log.txt
365 - docs/zh_CN/sphinx-warning-log.txt
366 - docs/zh_CN/sphinx-warning-log-sanitized.txt
367 - docs/zh_CN/_build/html
371 - $BOT_TRIGGER_WITH_LABEL == null
373 - $BOT_LABEL_BUILD_DOCS
374 - $BOT_LABEL_REGULAR_TEST
377 - ./check_lang_folder_sync.sh
381 - ../check_doc_warnings.sh
385 - ../check_doc_warnings.sh
389 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
392 - $BOT_TRIGGER_WITH_LABEL == null
394 - $BOT_LABEL_REGULAR_TEST
396 tools/cmake/run_cmake_lint.sh
398 .host_test_template: &host_test_template
400 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
406 - $BOT_TRIGGER_WITH_LABEL == null
407 - $BOT_LABEL_HOST_TEST
408 - $BOT_LABEL_REGULAR_TEST
411 <<: *host_test_template
413 - cd components/nvs_flash/test_nvs_host
417 <<: *host_test_template
420 - components/nvs_flash/test_nvs_host/coverage_report
426 - $BOT_LABEL_NVS_COVERAGE
428 - cd components/nvs_flash/test_nvs_host
429 - make coverage_report
431 test_partition_table_on_host:
432 <<: *host_test_template
436 - cd components/partition_table/test_gen_esp32part_host
437 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./gen_esp32part_tests.py
440 <<: *host_test_template
443 - components/wear_levelling/test_wl_host/coverage_report.zip
446 - cd components/wear_levelling/test_wl_host
450 <<: *host_test_template
452 - cd components/fatfs/test_fatfs_host/
455 .host_fuzzer_test_template: &host_fuzzer_test_template
457 image: $CI_DOCKER_REGISTRY/afl-fuzzer-test
464 - ${FUZZER_TEST_DIR}/out/crashes
465 - ${FUZZER_TEST_DIR}/fuzz_output.log
469 # can only be triggered
472 - $BOT_LABEL_FUZZER_TEST
474 - export AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES=1 && export AFL_SKIP_CPUFREQ=1
475 - cd ${FUZZER_TEST_DIR}
476 # run AFL fuzzer for one hour
477 - ( ( make ${FUZZER_PARAMS} fuzz | tee fuzz_output.log | grep -v '\(Fuzzing test case\|Entering queue cycle\)' ) || pkill sleep ) &
478 - ( sleep 3600 || mkdir -p out/crashes/env_failed ) && pkill afl-fuz
479 # check no crashes found
480 - test -z "$(ls out/crashes/)" || exit 1
482 test_mdns_fuzzer_on_host:
483 <<: *host_fuzzer_test_template
485 BOT_NEEDS_TRIGGER_BY_NAME: 1
486 FUZZER_TEST_DIR: components/mdns/test_afl_fuzz_host
488 test_lwip_dns_fuzzer_on_host:
489 <<: *host_fuzzer_test_template
491 BOT_NEEDS_TRIGGER_BY_NAME: 1
492 FUZZER_TEST_DIR: components/lwip/test_afl_host
493 FUZZER_PARAMS: MODE=dns
495 test_lwip_dhcp_fuzzer_on_host:
496 <<: *host_fuzzer_test_template
498 BOT_NEEDS_TRIGGER_BY_NAME: 1
499 FUZZER_TEST_DIR: components/lwip/test_afl_host
500 FUZZER_PARAMS: MODE=dhcp_client
502 test_lwip_dhcps_fuzzer_on_host:
503 <<: *host_fuzzer_test_template
505 BOT_NEEDS_TRIGGER_BY_NAME: 1
506 FUZZER_TEST_DIR: components/lwip/test_afl_host
507 FUZZER_PARAMS: MODE=dhcp_server
510 <<: *host_test_template
512 - cd components/spiffs/test_spiffs_host/
515 test_multi_heap_on_host:
516 <<: *host_test_template
518 - cd components/heap/test_multi_heap_host
519 - ./test_all_configs.sh
522 <<: *host_test_template
524 - cd tools/kconfig_new/test
525 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./test_confserver.py
528 <<: *host_test_template
530 - ${IDF_PATH}/tools/ci/test_configure_ci_environment.sh
531 - rm -rf test_build_system
532 - mkdir test_build_system
533 - cd test_build_system
534 - ${IDF_PATH}/tools/ci/test_build_system.sh
536 test_build_system_cmake:
537 <<: *host_test_template
539 - ${IDF_PATH}/tools/ci/test_configure_ci_environment.sh
540 - rm -rf test_build_system
541 - mkdir test_build_system
542 - cd test_build_system
543 - ${IDF_PATH}/tools/ci/test_build_system_cmake.sh
546 <<: *host_test_template
550 - tools/test_idf_monitor/outputs/*
553 - cd ${IDF_PATH}/tools/test_idf_monitor
554 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./run_test_idf_monitor.py
557 <<: *host_test_template
561 - tools/test_idf_size/output
562 - tools/test_idf_size/.coverage
565 - cd ${IDF_PATH}/tools/test_idf_size
566 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./test.sh
568 test_esp_err_to_name_on_host:
569 <<: *host_test_template
573 - components/esp32/esp_err_to_name.c
576 - cd ${IDF_PATH}/tools/
577 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh -p 2.7.15 ./gen_esp_err_to_name.py
578 - 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)
579 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh -p 3.4.8 ./gen_esp_err_to_name.py
580 - git diff --exit-code -- ../components/esp32/esp_err_to_name.c || (echo 'Differences found between running under Python 2 and 3.'; exit 1)
583 <<: *host_test_template
587 - components/espcoredump/test/.coverage
588 - components/espcoredump/test/output
591 - cd components/espcoredump/test/
592 - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./test_espcoredump.sh
596 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
602 - /^v\d+\.\d+(\.\d+)?($|-)/
605 before_script: *do_nothing_before
609 - echo -n $GH_PUSH_KEY > ~/.ssh/id_rsa_base64
610 - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
611 - chmod 600 ~/.ssh/id_rsa
612 - echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
613 - git remote remove github &>/dev/null || true
614 - git remote add github git@github.com:espressif/esp-idf.git
615 - tools/ci/push_to_github.sh
619 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
626 - /^v\d+\.\d+(\.\d+)?($|-)/
629 - $BOT_TRIGGER_WITH_LABEL == null
630 - $BOT_LABEL_BUILD_DOCS
633 before_script: *do_nothing_before
637 - echo -n $DOCS_DEPLOY_KEY > ~/.ssh/id_rsa_base64
638 - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
639 - chmod 600 ~/.ssh/id_rsa
640 - echo -e "Host $DOCS_SERVER\n\tStrictHostKeyChecking no\n\tUser $DOCS_SERVER_USER\n" >> ~/.ssh/config
641 - export GIT_VER=$(git describe --always)
644 - tar czvf $GIT_VER.tar.gz $GIT_VER
645 - scp $GIT_VER.tar.gz $DOCS_SERVER:$DOCS_PATH/en
646 - ssh $DOCS_SERVER -x "cd $DOCS_PATH/en && tar xzvf $GIT_VER.tar.gz && rm -f latest && ln -s $GIT_VER latest"
647 - cd ../../zh_CN/_build/
649 - tar czvf $GIT_VER.tar.gz $GIT_VER
650 - scp $GIT_VER.tar.gz $DOCS_SERVER:$DOCS_PATH/zh_CN
651 - ssh $DOCS_SERVER -x "cd $DOCS_PATH/zh_CN && tar xzvf $GIT_VER.tar.gz && rm -f latest && ln -s $GIT_VER latest"
652 # add link to preview doc
653 - echo "[document preview][en] $CI_DOCKER_REGISTRY/docs/esp-idf/en/${GIT_VER}/index.html"
654 - echo "[document preview][zh_CN] $CI_DOCKER_REGISTRY/docs/esp-idf/zh_CN/${GIT_VER}/index.html"
658 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
663 # can only be triggered
666 - $BOT_TRIGGER_WITH_LABEL == null
667 - $BOT_LABEL_BUILD_DOCS
670 - docs/_build/linkcheck
673 # must be triggered with CHECK_LINKS=Yes, otherwise exit without test
674 - test "$CHECK_LINKS" = "Yes" || exit 0
675 # can only run on master branch (otherwise the commit is not on Github yet)
676 - test "${CI_COMMIT_REF_NAME}" = "master" || exit 0
680 .check_job_template: &check_job_template
682 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
686 before_script: *do_nothing_before_no_filter
689 <<: *check_job_template
691 - tools/ci/check-line-endings.sh ${IDF_PATH}
694 <<: *check_job_template
697 - git log -n10 --oneline
698 # commit start with "WIP: " need to be squashed before merge
699 - 'git log --pretty=%s master.. -- | grep "^WIP: " && exit 1 || exit 0'
702 <<: *check_job_template
704 - tools/ci/check-executable.sh
706 check_examples_cmake_make:
707 <<: *check_job_template
711 - /^v\d+\.\d+(\.\d+)?($|-)/
712 before_script: *do_nothing_before
714 - tools/ci/check_examples_cmake_make.sh
718 image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
724 - /^v\d+\.\d+(\.\d+)?($|-)/
726 before_script: *do_nothing_before
728 - tools/ci/check_ut_cmake_make.sh
730 check_submodule_sync:
731 <<: *check_job_template
738 # check if all submodules are correctly synced to public repostory
739 - git submodule update --init --recursive
741 check_artifacts_expire_time:
742 <<: *check_job_template
744 # check if we have set expire time for all artifacts
745 - python tools/ci/check_artifacts_expire_time.py
747 check_pipeline_triggered_by_label:
748 <<: *check_job_template
752 - $BOT_TRIGGER_WITH_LABEL
754 # If the pipeline is triggered with label, the pipeline will only succeeded if "regular_test" label is added.
755 # We want to make sure some jobs are always executed to detect regression.
756 - test "$BOT_LABEL_REGULAR_TEST" = "true" || exit -1
761 image: $CI_DOCKER_REGISTRY/ubuntu-test-env$BOT_DOCKER_IMAGE_TAG
763 # gitlab ci do not support match job with RegEx or wildcard now in dependencies.
764 # we have a lot build example jobs. now we don't use dependencies, just download all artificats of build stage.
769 - build_esp_idf_tests_make
770 - build_esp_idf_tests_cmake
772 TEST_FW_PATH: "$CI_PROJECT_DIR/tools/tiny-test-fw"
773 EXAMPLE_CONFIG_OUTPUT_PATH: "$CI_PROJECT_DIR/examples/test_configs"
776 - components/idf_test/*/CIConfigs
777 - components/idf_test/*/TC.sqlite
778 - $EXAMPLE_CONFIG_OUTPUT_PATH
782 - $BOT_TRIGGER_WITH_LABEL == null
783 - $BOT_LABEL_UNIT_TEST
784 - $BOT_LABEL_INTEGRATION_TEST
785 - $BOT_LABEL_EXAMPLE_TEST
786 before_script: *add_gitlab_key_before
788 # assign example tests
789 - python $TEST_FW_PATH/CIAssignExampleTest.py $IDF_PATH/examples $IDF_PATH/.gitlab-ci.yml $EXAMPLE_CONFIG_OUTPUT_PATH
790 # assign unit test cases
791 - 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
792 # clone test script to assign tests
793 - git clone $TEST_SCRIPT_REPOSITORY
794 - cd auto_test_script
795 - python $CHECKOUT_REF_SCRIPT auto_test_script
796 # assgin integration test cases
797 - python CIAssignTestCases.py -t $IDF_PATH/components/idf_test/integration_test -c $IDF_PATH/.gitlab-ci.yml -b $IDF_PATH/SSC/ssc_bin
799 .example_test_template: &example_test_template
806 - /^v\d+\.\d+(\.\d+)?($|-)/
810 - $BOT_TRIGGER_WITH_LABEL == null
811 - $BOT_LABEL_EXAMPLE_TEST
814 - build_examples_make_00
815 - build_examples_make_01
816 - build_examples_make_02
817 - build_examples_make_03
818 - build_examples_make_04
819 - build_examples_make_05
820 - build_examples_make_06
821 - build_examples_make_07
822 - build_examples_cmake_00
823 - build_examples_cmake_01
824 - build_examples_cmake_02
825 - build_examples_cmake_03
826 - build_examples_cmake_04
827 - build_examples_cmake_05
828 - build_examples_cmake_06
829 - build_examples_cmake_07
836 junit: $LOG_PATH/*/XUNIT_RESULT.xml
838 TEST_FW_PATH: "$CI_PROJECT_DIR/tools/tiny-test-fw"
839 TEST_CASE_PATH: "$CI_PROJECT_DIR/examples"
840 CONFIG_FILE: "$CI_PROJECT_DIR/examples/test_configs/$CI_JOB_NAME.yml"
841 LOG_PATH: "$CI_PROJECT_DIR/TEST_LOGS"
842 ENV_FILE: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/EnvConfig.yml"
844 # first test if config file exists, if not exist, exit 0
845 - test -e $CONFIG_FILE || exit 0
846 # clone test env configs
847 - git clone $TEST_ENV_CONFIG_REPOSITORY
848 - cd ci-test-runner-configs
849 - python $CHECKOUT_REF_SCRIPT ci-test-runner-configs
852 - python Runner.py $TEST_CASE_PATH -c $CONFIG_FILE -e $ENV_FILE
854 .unit_test_template: &unit_test_template
855 <<: *example_test_template
859 - build_esp_idf_tests_make
860 - build_esp_idf_tests_cmake
865 - /^v\d+\.\d+(\.\d+)?($|-)/
869 - $BOT_TRIGGER_WITH_LABEL == null
870 - $BOT_LABEL_UNIT_TEST
872 TEST_FW_PATH: "$CI_PROJECT_DIR/tools/tiny-test-fw"
873 TEST_CASE_PATH: "$CI_PROJECT_DIR/tools/unit-test-app"
874 CONFIG_FILE: "$CI_PROJECT_DIR/components/idf_test/unit_test/CIConfigs/$CI_JOB_NAME.yml"
875 LOG_PATH: "$CI_PROJECT_DIR/TEST_LOGS"
876 ENV_FILE: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/EnvConfig.yml"
878 .test_template: &test_template
885 - /^v\d+\.\d+(\.\d+)?($|-)/
889 - $BOT_TRIGGER_WITH_LABEL == null
890 - $BOT_LABEL_INTEGRATION_TEST
902 LOCAL_ENV_CONFIG_PATH: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/ESP32_IDF"
903 LOG_PATH: "$CI_PROJECT_DIR/$CI_COMMIT_SHA"
904 TEST_CASE_FILE_PATH: "$CI_PROJECT_DIR/components/idf_test/integration_test"
905 MODULE_UPDATE_FILE: "$CI_PROJECT_DIR/components/idf_test/ModuleDefinition.yml"
906 CONFIG_FILE: "$CI_PROJECT_DIR/components/idf_test/integration_test/CIConfigs/$CI_JOB_NAME.yml"
907 before_script: *add_gitlab_key_before
909 # first test if config file exists, if not exist, exit 0
910 - test -e $CONFIG_FILE || exit 0
911 # clone local test env configs
912 - git clone $TEST_ENV_CONFIG_REPOSITORY
913 - cd ci-test-runner-configs
914 - python $CHECKOUT_REF_SCRIPT ci-test-runner-configs
916 - git clone $TEST_SCRIPT_REPOSITORY
917 - cd auto_test_script
918 - python $CHECKOUT_REF_SCRIPT auto_test_script
920 - 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
934 # clone local test env configs
935 - git clone $TEST_ENV_CONFIG_REPOSITORY
936 - cd ci-test-runner-configs
937 - python $CHECKOUT_REF_SCRIPT ci-test-runner-configs
939 - git clone $TEST_SCRIPT_REPOSITORY
940 - cd auto_test_script
941 - git checkout ${CI_COMMIT_REF_NAME} || echo "Using default branch..."
943 - ./Tools/prepare_nvs_bin.sh
945 - 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
948 <<: *example_test_template
954 <<: *example_test_template
960 <<: *example_test_template
961 image: $CI_DOCKER_REGISTRY/ubuntu-test-env$BOT_DOCKER_IMAGE_TAG
964 - Example_ShieldBox_Basic
966 .example_test_003_01:
967 <<: *example_test_template
973 <<: *example_test_template
979 <<: *example_test_template
985 <<: *example_test_template
986 image: $CI_DOCKER_REGISTRY/ubuntu-test-env$BOT_DOCKER_IMAGE_TAG
989 - $BOT_LABEL_IPERF_STRESS_TEST
995 <<: *unit_test_template
1001 <<: *unit_test_template
1007 <<: *unit_test_template
1013 <<: *unit_test_template
1019 <<: *unit_test_template
1025 <<: *unit_test_template
1031 <<: *unit_test_template
1037 <<: *unit_test_template
1043 <<: *unit_test_template
1049 <<: *unit_test_template
1055 <<: *unit_test_template
1061 <<: *unit_test_template
1067 <<: *unit_test_template
1073 <<: *unit_test_template
1079 <<: *unit_test_template
1085 <<: *unit_test_template
1091 <<: *unit_test_template
1097 <<: *unit_test_template
1103 <<: *unit_test_template
1109 <<: *unit_test_template
1115 <<: *unit_test_template
1121 <<: *unit_test_template
1127 <<: *unit_test_template
1133 <<: *unit_test_template
1139 <<: *unit_test_template
1145 <<: *unit_test_template
1151 <<: *unit_test_template
1157 <<: *unit_test_template
1163 <<: *unit_test_template
1169 <<: *unit_test_template
1175 <<: *unit_test_template
1181 <<: *unit_test_template
1187 <<: *unit_test_template
1193 <<: *unit_test_template
1199 <<: *unit_test_template
1205 <<: *unit_test_template
1211 <<: *unit_test_template
1217 <<: *unit_test_template
1223 <<: *unit_test_template
1229 <<: *unit_test_template
1235 <<: *unit_test_template
1241 <<: *unit_test_template
1247 <<: *unit_test_template
1253 <<: *unit_test_template
1259 <<: *unit_test_template
1265 <<: *unit_test_template
1271 <<: *unit_test_template
1278 <<: *unit_test_template
1285 <<: *unit_test_template
1292 <<: *unit_test_template
1299 <<: *unit_test_template
1306 <<: *unit_test_template
1313 <<: *unit_test_template
1320 <<: *unit_test_template
1327 <<: *unit_test_template
1334 <<: *unit_test_template
1341 <<: *unit_test_template
1348 <<: *unit_test_template
1355 <<: *unit_test_template
1362 <<: *unit_test_template
1369 <<: *unit_test_template
1376 <<: *unit_test_template
1383 <<: *unit_test_template
1389 <<: *unit_test_template
1395 <<: *unit_test_template
1401 <<: *unit_test_template
1408 <<: *unit_test_template
1414 <<: *unit_test_template
1420 <<: *unit_test_template
1426 <<: *unit_test_template
1433 <<: *unit_test_template
1439 <<: *unit_test_template
1445 <<: *unit_test_template
1451 <<: *unit_test_template
1458 <<: *unit_test_template
1464 <<: *unit_test_template
1470 <<: *unit_test_template
1476 <<: *unit_test_template
1483 <<: *unit_test_template
1489 <<: *unit_test_template
1495 <<: *unit_test_template
1501 <<: *unit_test_template
1508 <<: *unit_test_template
1514 <<: *unit_test_template
1520 <<: *unit_test_template
1526 <<: *unit_test_template
1533 <<: *unit_test_template
1540 <<: *unit_test_template
1547 <<: *unit_test_template
1554 <<: *unit_test_template
1560 <<: *unit_test_template
1566 <<: *unit_test_template
1572 <<: *unit_test_template
1579 <<: *unit_test_template
1586 <<: *unit_test_template