2020-09-26 23:20:53 -04:00
|
|
|
.pre_check_base_template:
|
|
|
|
stage: pre_check
|
|
|
|
image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
|
|
|
|
tags:
|
|
|
|
- host_test
|
|
|
|
dependencies: []
|
|
|
|
|
|
|
|
.pre_check_job_template:
|
|
|
|
extends:
|
|
|
|
- .pre_check_base_template
|
|
|
|
- .before_script_lesser_nofilter
|
|
|
|
|
|
|
|
.pre_check_job_template_with_filter:
|
|
|
|
extends:
|
|
|
|
- .pre_check_base_template
|
|
|
|
- .before_script_lesser
|
|
|
|
|
2020-10-21 07:30:49 -04:00
|
|
|
.check_pre_commit_template:
|
2020-09-26 23:20:53 -04:00
|
|
|
extends: .pre_check_job_template
|
2020-10-21 07:30:49 -04:00
|
|
|
stage: pre_check
|
|
|
|
image: "$CI_DOCKER_REGISTRY/esp-idf-pre-commit:1"
|
|
|
|
before_script:
|
|
|
|
- source tools/ci/utils.sh
|
|
|
|
- export PYTHONPATH="$CI_PROJECT_DIR/tools:$CI_PROJECT_DIR/tools/ci/python_packages:$PYTHONPATH"
|
|
|
|
|
|
|
|
check_pre_commit_master_release:
|
|
|
|
extends:
|
|
|
|
- .check_pre_commit_template
|
|
|
|
- .rules:protected
|
2019-11-12 02:59:11 -05:00
|
|
|
script:
|
2020-10-21 07:30:49 -04:00
|
|
|
- git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA | xargs pre-commit run --files
|
2019-11-12 02:59:11 -05:00
|
|
|
|
2020-10-21 07:30:49 -04:00
|
|
|
check_pre_commit_MR:
|
|
|
|
extends:
|
|
|
|
- .check_pre_commit_template
|
|
|
|
- .rules:dev
|
2019-11-12 02:59:11 -05:00
|
|
|
script:
|
2020-10-21 07:30:49 -04:00
|
|
|
- python ${CI_PROJECT_DIR}/tools/ci/ci_get_mr_info.py files ${CI_COMMIT_BRANCH} | xargs pre-commit run --files
|
2019-11-12 02:59:11 -05:00
|
|
|
|
2019-11-22 02:58:32 -05:00
|
|
|
check_docs_lang_sync:
|
2020-09-26 23:20:53 -04:00
|
|
|
extends: .pre_check_job_template
|
2019-11-22 02:58:32 -05:00
|
|
|
variables:
|
|
|
|
SUBMODULES_TO_FETCH: "none"
|
|
|
|
script:
|
|
|
|
- cd docs
|
|
|
|
- ./check_lang_folder_sync.sh
|
|
|
|
|
2019-11-12 02:59:11 -05:00
|
|
|
check_version:
|
|
|
|
# Don't run this for feature/bugfix branches, so that it is possible to modify
|
|
|
|
# esp_idf_version.h in a branch before tagging the next version.
|
2020-09-26 23:20:53 -04:00
|
|
|
extends:
|
|
|
|
- .pre_check_job_template
|
2020-10-20 03:00:50 -04:00
|
|
|
- .rules:protected
|
2019-11-12 02:59:11 -05:00
|
|
|
script:
|
|
|
|
- export IDF_PATH=$PWD
|
|
|
|
- tools/ci/check_idf_version.sh
|
|
|
|
|
|
|
|
check_examples_cmake_make:
|
2020-09-26 23:20:53 -04:00
|
|
|
extends:
|
|
|
|
- .pre_check_job_template_with_filter
|
2020-10-20 03:00:50 -04:00
|
|
|
- .rules:dev
|
2019-11-12 02:59:11 -05:00
|
|
|
script:
|
2020-08-06 08:41:32 -04:00
|
|
|
- python ${IDF_PATH}/tools/ci/check_examples_cmake_make.py
|
2019-11-12 02:59:11 -05:00
|
|
|
|
2020-06-19 00:00:58 -04:00
|
|
|
check_rom_api_header:
|
2020-09-26 23:20:53 -04:00
|
|
|
extends: .pre_check_job_template_with_filter
|
2019-11-12 02:59:11 -05:00
|
|
|
script:
|
|
|
|
- tools/ci/check_examples_rom_header.sh
|
2020-06-19 00:00:58 -04:00
|
|
|
- tools/ci/check_rom_apis.sh
|
2019-11-12 02:59:11 -05:00
|
|
|
|
|
|
|
check_python_style:
|
2020-09-26 23:20:53 -04:00
|
|
|
extends: .pre_check_base_template
|
2019-11-12 02:59:11 -05:00
|
|
|
artifacts:
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
|
|
|
- flake8_output.txt
|
|
|
|
expire_in: 1 week
|
|
|
|
script:
|
2020-01-01 00:04:50 -05:00
|
|
|
- ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh python -m flake8 --config=$IDF_PATH/.flake8 --output-file=flake8_output.txt --tee --benchmark $IDF_PATH
|
2019-11-12 02:59:11 -05:00
|
|
|
|
|
|
|
check_kconfigs:
|
2020-09-26 23:20:53 -04:00
|
|
|
extends: .pre_check_job_template_with_filter
|
2019-11-12 02:59:11 -05:00
|
|
|
artifacts:
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
|
|
|
- components/*/Kconfig*.new
|
|
|
|
- examples/*/*/*/Kconfig*.new
|
|
|
|
- examples/*/*/*/*/Kconfig*.new
|
|
|
|
- tools/*/Kconfig*.new
|
|
|
|
- tools/*/*/Kconfig*.new
|
|
|
|
- tools/*/*/*/Kconfig*.new
|
|
|
|
expire_in: 1 week
|
|
|
|
script:
|
2020-10-21 07:30:49 -04:00
|
|
|
- ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ${IDF_PATH}/tools/ci/test_check_kconfigs.py
|
|
|
|
- ${IDF_PATH}/tools/ci/check_kconfigs.py
|
2019-11-12 02:59:11 -05:00
|
|
|
|
2019-12-10 22:40:20 -05:00
|
|
|
check_wifi_lib_md5:
|
2020-09-26 23:20:53 -04:00
|
|
|
extends: .pre_check_base_template
|
2019-12-10 22:40:20 -05:00
|
|
|
tags:
|
|
|
|
- build
|
|
|
|
variables:
|
|
|
|
SUBMODULES_TO_FETCH: "components/esp_wifi/lib"
|
|
|
|
script:
|
|
|
|
- IDF_TARGET=esp32 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
|
2020-01-16 22:47:08 -05:00
|
|
|
- IDF_TARGET=esp32s2 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
|
2019-12-10 22:40:20 -05:00
|
|
|
|
2019-12-25 15:03:41 -05:00
|
|
|
check_public_headers:
|
2020-09-26 23:20:53 -04:00
|
|
|
extends:
|
|
|
|
- .pre_check_base_template
|
|
|
|
- .rules:labels:build
|
2019-12-18 10:11:11 -05:00
|
|
|
tags:
|
|
|
|
- build
|
|
|
|
script:
|
2020-03-02 04:19:01 -05:00
|
|
|
- python tools/ci/check_public_headers.py --jobs 4 --prefix xtensa-esp32-elf-
|
2019-12-18 10:11:11 -05:00
|
|
|
|
2020-04-20 02:30:31 -04:00
|
|
|
.scan_build_tests:
|
|
|
|
stage: pre_check
|
|
|
|
image: $CI_DOCKER_REGISTRY/ubuntu-test-env$BOT_DOCKER_IMAGE_TAG
|
|
|
|
tags:
|
|
|
|
- assign_test
|
|
|
|
variables:
|
|
|
|
CI_SCAN_TESTS_PY: ${CI_PROJECT_DIR}/tools/ci/python_packages/ttfw_idf/CIScanTests.py
|
|
|
|
TEST_CONFIG_FILE: ${CI_PROJECT_DIR}/tools/ci/config/target-test.yml
|
|
|
|
|
|
|
|
scan_tests:
|
2020-08-25 04:42:36 -04:00
|
|
|
extends:
|
|
|
|
- .scan_build_tests
|
2020-10-21 00:12:28 -04:00
|
|
|
- .rules:build_tests:target_test-weekend_test
|
2020-04-20 02:30:31 -04:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- $EXAMPLE_TEST_OUTPUT_DIR
|
|
|
|
- $TEST_APPS_OUTPUT_DIR
|
2020-08-21 02:42:25 -04:00
|
|
|
- $COMPONENT_UT_OUTPUT_DIR
|
2020-04-20 02:30:31 -04:00
|
|
|
variables:
|
|
|
|
EXAMPLE_TEST_DIR: ${CI_PROJECT_DIR}/examples
|
|
|
|
EXAMPLE_TEST_OUTPUT_DIR: ${CI_PROJECT_DIR}/examples/test_configs
|
|
|
|
TEST_APPS_TEST_DIR: ${CI_PROJECT_DIR}/tools/test_apps
|
|
|
|
TEST_APPS_OUTPUT_DIR: ${CI_PROJECT_DIR}/tools/test_apps/test_configs
|
2020-08-21 02:42:25 -04:00
|
|
|
COMPONENT_UT_OUTPUT_DIR: ${CI_PROJECT_DIR}/component_ut/test_configs
|
2020-08-25 04:42:36 -04:00
|
|
|
PYTHON_VER: 3
|
2020-04-20 02:30:31 -04:00
|
|
|
script:
|
2020-09-26 23:20:53 -04:00
|
|
|
- set_component_ut_vars
|
2020-08-21 02:42:25 -04:00
|
|
|
- python $CI_SCAN_TESTS_PY example_test $EXAMPLE_TEST_DIR -b make --exclude examples/build_system/idf_as_lib -c $TEST_CONFIG_FILE -o $EXAMPLE_TEST_OUTPUT_DIR
|
|
|
|
- python $CI_SCAN_TESTS_PY example_test $EXAMPLE_TEST_DIR -b cmake --exclude examples/build_system/idf_as_lib -c $TEST_CONFIG_FILE -o $EXAMPLE_TEST_OUTPUT_DIR
|
2020-04-20 02:30:31 -04:00
|
|
|
- python $CI_SCAN_TESTS_PY test_apps $TEST_APPS_TEST_DIR -c $TEST_CONFIG_FILE -o $TEST_APPS_OUTPUT_DIR
|
2020-08-25 04:42:36 -04:00
|
|
|
- python $CI_SCAN_TESTS_PY component_ut $COMPONENT_UT_DIRS --exclude $COMPONENT_UT_EXCLUDES -c $TEST_CONFIG_FILE -o $COMPONENT_UT_OUTPUT_DIR
|
2020-06-16 07:00:27 -04:00
|
|
|
|
|
|
|
check_readme_links:
|
2020-09-26 23:20:53 -04:00
|
|
|
extends: .pre_check_job_template
|
2020-06-16 07:00:27 -04:00
|
|
|
tags: [ "amd64", "deploy", "internet" ]
|
|
|
|
allow_failure: true
|
|
|
|
variables:
|
|
|
|
PYTHON_VER: 3
|
|
|
|
script:
|
|
|
|
- python ${IDF_PATH}/tools/ci/check_readme_links.py
|
2020-07-09 23:24:33 -04:00
|
|
|
|
|
|
|
.clang_tidy_check_template:
|
2020-09-26 23:20:53 -04:00
|
|
|
extends: .pre_check_base_template
|
2020-07-09 23:24:33 -04:00
|
|
|
image: ${CI_DOCKER_REGISTRY}/clang-static-analysis
|
|
|
|
artifacts:
|
|
|
|
reports:
|
|
|
|
junit: $IDF_PATH/output.xml
|
|
|
|
when: always
|
|
|
|
paths:
|
|
|
|
- $IDF_PATH/examples/get-started/hello_world/tidybuild/report/*
|
|
|
|
expire_in: 1 day
|
|
|
|
script:
|
2020-09-28 02:27:10 -04:00
|
|
|
- retry_failed git clone $IDF_ANALYSIS_UTILS static_analysis_utils && cd static_analysis_utils
|
2020-07-09 23:24:33 -04:00
|
|
|
# Setup parameters of triggered/regular job
|
|
|
|
- export TRIGGERED_RELATIVE=${BOT_LABEL_STATIC_ANALYSIS-} && export TRIGGERED_ABSOLUTE=${BOT_LABEL_STATIC_ANALYSIS_ALL-} && export TARGET_BRANCH=${BOT_CUSTOMIZED_REVISION-}
|
|
|
|
- ./analyze.sh $IDF_PATH/examples/get-started/hello_world/ $IDF_PATH/tools/ci/static-analysis-rules.yml $IDF_PATH/output.xml
|
|
|
|
|
|
|
|
clang_tidy_check:
|
|
|
|
extends: .clang_tidy_check_template
|
|
|
|
variables:
|
|
|
|
BOT_NEEDS_TRIGGER_BY_NAME: 1
|
|
|
|
BOT_LABEL_STATIC_ANALYSIS: 1
|
|
|
|
|
|
|
|
clang_tidy_check_regular:
|
|
|
|
extends: .clang_tidy_check_template
|
|
|
|
|
|
|
|
clang_tidy_check_all:
|
|
|
|
extends: .clang_tidy_check_template
|
|
|
|
variables:
|
|
|
|
BOT_NEEDS_TRIGGER_BY_NAME: 1
|
|
|
|
BOT_LABEL_STATIC_ANALYSIS_ALL: 1
|
2020-07-24 12:51:34 -04:00
|
|
|
|
2020-10-06 18:54:27 -04:00
|
|
|
# For release tag pipelines only, make sure the tag was created with 'git tag -a' so it will update
|
|
|
|
# the version returned by 'git describe'
|
|
|
|
check_version_tag:
|
2020-09-26 23:20:53 -04:00
|
|
|
extends:
|
|
|
|
- .pre_check_job_template
|
2020-10-20 03:00:50 -04:00
|
|
|
- .rules:tag:release-no_label
|
2020-10-06 18:54:27 -04:00
|
|
|
script:
|
|
|
|
- (git cat-file -t $CI_COMMIT_REF_NAME | grep tag) || echo "ESP-IDF versions must be annotated tags." && exit 1
|