2022-07-28 03:32:13 -04:00
|
|
|
.pre_check_template:
|
2020-09-26 23:20:53 -04:00
|
|
|
stage: pre_check
|
2021-05-26 04:44:20 -04:00
|
|
|
image: $ESP_ENV_IMAGE
|
2020-09-26 23:20:53 -04:00
|
|
|
tags:
|
|
|
|
- host_test
|
2024-01-25 06:45:13 -05:00
|
|
|
dependencies: # set dependencies to null to avoid missing artifacts issue
|
2020-09-26 23:20:53 -04:00
|
|
|
|
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:
|
2022-07-28 03:32:13 -04:00
|
|
|
- .pre_check_template
|
2020-10-20 03:00:50 -04:00
|
|
|
- .rules:protected
|
2023-11-01 07:43:19 -04:00
|
|
|
- .before_script:fetch:git_describe
|
2019-11-12 02:59:11 -05:00
|
|
|
script:
|
|
|
|
- export IDF_PATH=$PWD
|
|
|
|
- tools/ci/check_idf_version.sh
|
|
|
|
|
2023-09-18 07:37:18 -04:00
|
|
|
check_api_usage:
|
2022-07-28 03:32:13 -04:00
|
|
|
extends: .pre_check_template
|
2019-11-12 02:59:11 -05:00
|
|
|
script:
|
|
|
|
- tools/ci/check_examples_rom_header.sh
|
2021-06-15 05:11:50 -04:00
|
|
|
- tools/ci/check_api_violation.sh
|
2023-09-18 07:37:18 -04:00
|
|
|
- tools/ci/check_examples_extra_component_dirs.sh
|
2019-11-12 02:59:11 -05:00
|
|
|
|
2022-01-03 18:18:55 -05:00
|
|
|
check_blobs:
|
2023-07-14 08:15:50 -04:00
|
|
|
extends:
|
|
|
|
- .pre_check_template
|
|
|
|
- .rules:build:check
|
2019-12-10 22:40:20 -05:00
|
|
|
variables:
|
2022-12-14 04:10:54 -05:00
|
|
|
SUBMODULES_TO_FETCH: "components/esp_wifi/lib;components/esp_phy/lib;components/esp_coex/lib"
|
2019-12-10 22:40:20 -05:00
|
|
|
script:
|
2022-01-03 18:18:55 -05:00
|
|
|
# Check if Wi-Fi library header files match between IDF and the version used when compiling the libraries
|
2019-12-10 22:40:20 -05:00
|
|
|
- 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
|
2022-01-03 18:18:55 -05:00
|
|
|
- IDF_TARGET=esp32s3 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
|
2023-03-10 01:31:33 -05:00
|
|
|
- IDF_TARGET=esp32c2 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
|
2022-01-03 18:18:55 -05:00
|
|
|
- IDF_TARGET=esp32c3 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
|
2023-03-10 01:31:33 -05:00
|
|
|
- IDF_TARGET=esp32c6 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
|
2022-12-14 04:10:54 -05:00
|
|
|
# Check if Coexistence library header files match between IDF and the version used when compiling the libraries
|
|
|
|
- IDF_TARGET=esp32 $IDF_PATH/components/esp_coex/test_md5/test_md5.sh
|
|
|
|
- IDF_TARGET=esp32s2 $IDF_PATH/components/esp_coex/test_md5/test_md5.sh
|
|
|
|
- IDF_TARGET=esp32s3 $IDF_PATH/components/esp_coex/test_md5/test_md5.sh
|
2023-03-10 01:31:33 -05:00
|
|
|
- IDF_TARGET=esp32c2 $IDF_PATH/components/esp_coex/test_md5/test_md5.sh
|
2022-12-14 04:10:54 -05:00
|
|
|
- IDF_TARGET=esp32c3 $IDF_PATH/components/esp_coex/test_md5/test_md5.sh
|
2023-03-10 01:31:33 -05:00
|
|
|
- IDF_TARGET=esp32c6 $IDF_PATH/components/esp_coex/test_md5/test_md5.sh
|
|
|
|
- IDF_TARGET=esp32h2 $IDF_PATH/components/esp_coex/test_md5/test_md5.sh
|
2022-01-03 18:18:55 -05:00
|
|
|
# Check if Wi-Fi, PHY, BT blobs contain references to specific symbols
|
|
|
|
- bash $IDF_PATH/tools/ci/check_blobs.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:
|
2022-07-28 03:32:13 -04:00
|
|
|
- .pre_check_template
|
2023-07-14 08:15:50 -04:00
|
|
|
- .rules:build:check
|
2019-12-18 10:11:11 -05:00
|
|
|
script:
|
2022-06-29 16:49:51 -04:00
|
|
|
- IDF_TARGET=esp32 python tools/ci/check_public_headers.py --jobs 4 --prefix xtensa-esp32-elf-
|
|
|
|
- IDF_TARGET=esp32s2 python tools/ci/check_public_headers.py --jobs 4 --prefix xtensa-esp32s2-elf-
|
|
|
|
- IDF_TARGET=esp32s3 python tools/ci/check_public_headers.py --jobs 4 --prefix xtensa-esp32s3-elf-
|
|
|
|
- IDF_TARGET=esp32c3 python tools/ci/check_public_headers.py --jobs 4 --prefix riscv32-esp-elf-
|
|
|
|
- IDF_TARGET=esp32c2 python tools/ci/check_public_headers.py --jobs 4 --prefix riscv32-esp-elf-
|
2022-07-08 04:15:49 -04:00
|
|
|
- IDF_TARGET=esp32c6 python tools/ci/check_public_headers.py --jobs 4 --prefix riscv32-esp-elf-
|
2024-01-02 09:19:49 -05:00
|
|
|
- IDF_TARGET=esp32c5 python tools/ci/check_public_headers.py --jobs 4 --prefix riscv32-esp-elf-
|
2022-12-28 22:00:42 -05:00
|
|
|
- IDF_TARGET=esp32h2 python tools/ci/check_public_headers.py --jobs 4 --prefix riscv32-esp-elf-
|
2023-08-02 23:50:47 -04:00
|
|
|
- IDF_TARGET=esp32p4 python tools/ci/check_public_headers.py --jobs 4 --prefix riscv32-esp-elf-
|
2019-12-18 10:11:11 -05:00
|
|
|
|
2022-04-16 02:02:57 -04:00
|
|
|
check_chip_support_components:
|
2021-08-23 02:03:23 -04:00
|
|
|
extends:
|
2022-07-28 03:32:13 -04:00
|
|
|
- .pre_check_template
|
2023-07-14 08:15:50 -04:00
|
|
|
- .rules:build:check
|
2022-04-16 02:02:57 -04:00
|
|
|
artifacts:
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
|
|
|
- esp_hw_support_part.h
|
|
|
|
- bootloader_support_part.h
|
2021-08-23 02:03:23 -04:00
|
|
|
script:
|
2022-01-05 02:44:02 -05:00
|
|
|
- python tools/ci/check_soc_headers_leak.py
|
2021-08-23 02:03:23 -04:00
|
|
|
- find ${IDF_PATH}/components/soc/*/include/soc/ -name "*_struct.h" -print0 | xargs -0 -n1 ./tools/ci/check_soc_struct_headers.py
|
2022-04-16 02:02:57 -04:00
|
|
|
- tools/ci/check_esp_memory_utils_headers.sh
|
2021-08-23 02:03:23 -04:00
|
|
|
|
2021-06-20 22:47:34 -04:00
|
|
|
check_esp_err_to_name:
|
|
|
|
extends:
|
2022-07-28 03:32:13 -04:00
|
|
|
- .pre_check_template
|
2023-07-14 08:15:50 -04:00
|
|
|
- .rules:build:check
|
2021-06-20 22:47:34 -04:00
|
|
|
artifacts:
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
|
|
|
- components/esp_common/esp_err_to_name.c
|
|
|
|
script:
|
|
|
|
- cd ${IDF_PATH}/tools/
|
2021-05-26 04:44:20 -04:00
|
|
|
- ./gen_esp_err_to_name.py
|
2021-06-20 22:47:34 -04:00
|
|
|
- git diff --exit-code -- ../components/esp_common/src/esp_err_to_name.c || { echo 'Differences found. Please run gen_esp_err_to_name.py and commit the changes.'; exit 1; }
|
|
|
|
|
2022-05-18 11:25:38 -04:00
|
|
|
check_esp_system:
|
|
|
|
extends:
|
2022-07-28 03:32:13 -04:00
|
|
|
- .pre_check_template
|
2022-05-18 11:25:38 -04:00
|
|
|
- .rules:build
|
|
|
|
script:
|
|
|
|
- python components/esp_system/check_system_init_priorities.py
|
|
|
|
|
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'
|
2023-11-01 07:43:19 -04:00
|
|
|
# Don't forget to update the env var `LATEST_GIT_TAG` in .gitlab/ci/common.yml
|
2020-10-06 18:54:27 -04:00
|
|
|
check_version_tag:
|
2020-09-26 23:20:53 -04:00
|
|
|
extends:
|
2022-07-28 03:32:13 -04:00
|
|
|
- .pre_check_template
|
2021-02-08 23:31:38 -05:00
|
|
|
- .rules:tag:release
|
2023-11-01 07:43:19 -04:00
|
|
|
- .before_script:fetch:git_describe
|
2020-10-06 18:54:27 -04:00
|
|
|
script:
|
2020-11-22 18:23:24 -05:00
|
|
|
- (git cat-file -t $CI_COMMIT_REF_NAME | grep tag) || (echo "ESP-IDF versions must be annotated tags." && exit 1)
|
2021-02-01 21:53:40 -05:00
|
|
|
|
2022-07-11 01:43:45 -04:00
|
|
|
check_test_scripts_build_test_rules:
|
|
|
|
extends:
|
2022-07-28 03:32:13 -04:00
|
|
|
- .pre_check_template
|
2023-09-26 07:24:26 -04:00
|
|
|
- .before_script:build
|
2022-07-11 01:43:45 -04:00
|
|
|
script:
|
2022-08-24 22:56:14 -04:00
|
|
|
# required pytest related packages
|
|
|
|
- run_cmd bash install.sh --enable-pytest
|
2022-07-11 01:43:45 -04:00
|
|
|
- python tools/ci/check_build_test_rules.py check-test-scripts examples/ tools/test_apps components
|
2023-01-03 01:14:49 -05:00
|
|
|
|
|
|
|
check_configure_ci_environment_parsing:
|
|
|
|
extends:
|
|
|
|
- .pre_check_template
|
2023-09-26 07:24:26 -04:00
|
|
|
- .before_script:build
|
2023-07-14 08:15:50 -04:00
|
|
|
- .rules:build
|
2023-01-03 01:14:49 -05:00
|
|
|
script:
|
|
|
|
- cd tools/ci
|
|
|
|
- python -m unittest ci_build_apps.py
|
2023-05-23 22:53:57 -04:00
|
|
|
|
2023-11-01 07:43:19 -04:00
|
|
|
pipeline_variables:
|
2023-05-23 22:53:57 -04:00
|
|
|
extends:
|
|
|
|
- .pre_check_template
|
2023-11-01 07:43:19 -04:00
|
|
|
- .before_script:fetch:git_diff
|
2024-01-30 08:36:00 -05:00
|
|
|
tags: [fast_run, shiny]
|
2023-05-23 22:53:57 -04:00
|
|
|
script:
|
2023-12-18 09:29:58 -05:00
|
|
|
# MODIFIED_FILES is a list of files that changed, could be used everywhere
|
|
|
|
- MODIFIED_FILES=$(echo "$GIT_DIFF_OUTPUT" | xargs)
|
2023-11-01 07:43:19 -04:00
|
|
|
- echo "MODIFIED_FILES=$MODIFIED_FILES" >> pipeline.env
|
2023-12-18 09:29:58 -05:00
|
|
|
# MR_MODIFIED_FILES and MR_MODIFIED_COMPONENTS are semicolon separated lists that is used in MR only
|
|
|
|
# for non MR pipeline, these are empty lists
|
|
|
|
- |
|
|
|
|
if [ $IS_MR_PIPELINE == "0" ]; then
|
2024-01-11 00:54:53 -05:00
|
|
|
echo "MR_MODIFIED_FILES=\"\"" >> pipeline.env
|
|
|
|
echo "MR_MODIFIED_COMPONENTS=\"\"" >> pipeline.env
|
2023-12-18 09:29:58 -05:00
|
|
|
else
|
|
|
|
MR_MODIFIED_FILES=$(echo "$GIT_DIFF_OUTPUT" | tr '\n' ';')
|
|
|
|
echo "MR_MODIFIED_FILES=\"$MR_MODIFIED_FILES\"" >> pipeline.env
|
|
|
|
|
|
|
|
MR_MODIFIED_COMPONENTS=$(run_cmd python tools/ci/ci_get_mr_info.py components --modified-files $MODIFIED_FILES | tr '\n' ';')
|
|
|
|
echo "MR_MODIFIED_COMPONENTS=\"$MR_MODIFIED_COMPONENTS\"" >> pipeline.env
|
|
|
|
fi
|
2023-11-01 07:43:19 -04:00
|
|
|
- |
|
2023-05-31 09:35:47 -04:00
|
|
|
if echo "$CI_MERGE_REQUEST_LABELS" | egrep "(^|,)BUILD_AND_TEST_ALL_APPS(,|$)"; then
|
2023-11-01 07:43:19 -04:00
|
|
|
echo "BUILD_AND_TEST_ALL_APPS=1" >> pipeline.env
|
2023-05-23 22:53:57 -04:00
|
|
|
fi
|
2023-11-01 07:43:19 -04:00
|
|
|
- cat pipeline.env
|
2023-12-07 21:49:17 -05:00
|
|
|
- python tools/ci/artifacts_handler.py upload --type modified_files_and_components_report
|
2023-05-23 22:53:57 -04:00
|
|
|
artifacts:
|
|
|
|
reports:
|
2023-11-01 07:43:19 -04:00
|
|
|
dotenv: pipeline.env
|
2024-01-23 05:34:00 -05:00
|
|
|
|
|
|
|
check_test_cases_env_markers_and_required_runners:
|
|
|
|
extends:
|
|
|
|
- .pre_check_template
|
2024-01-30 08:36:00 -05:00
|
|
|
tags: [fast_run, shiny]
|
2024-01-23 05:34:00 -05:00
|
|
|
script:
|
|
|
|
- python tools/ci/dynamic_pipelines/scripts/generate_target_test_child_pipeline.py --check
|