2022-07-28 07:32:13 +00:00
|
|
|
.pre_check_template:
|
2020-09-27 03:20:53 +00:00
|
|
|
stage: pre_check
|
2021-05-26 08:44:20 +00:00
|
|
|
image: $ESP_ENV_IMAGE
|
2020-09-27 03:20:53 +00:00
|
|
|
tags:
|
|
|
|
- host_test
|
|
|
|
dependencies: []
|
|
|
|
|
2020-10-21 11:30:49 +00:00
|
|
|
.check_pre_commit_template:
|
2022-07-28 07:32:13 +00:00
|
|
|
extends:
|
|
|
|
- .pre_check_template
|
2023-09-26 11:24:26 +00:00
|
|
|
- .before_script:minimal
|
2022-07-28 07:32:13 +00:00
|
|
|
image: $PRE_COMMIT_IMAGE
|
2020-10-21 11:30:49 +00:00
|
|
|
|
|
|
|
check_pre_commit_master_release:
|
|
|
|
extends:
|
|
|
|
- .check_pre_commit_template
|
|
|
|
- .rules:protected
|
2019-11-12 07:59:11 +00:00
|
|
|
script:
|
2023-08-03 00:31:11 +00:00
|
|
|
- fetch_submodules
|
2021-10-28 04:07:02 +00:00
|
|
|
- git diff-tree --no-commit-id --name-only -r $PIPELINE_COMMIT_SHA | xargs pre-commit run --files
|
2019-11-12 07:59:11 +00:00
|
|
|
|
2020-10-21 11:30:49 +00:00
|
|
|
check_pre_commit_MR:
|
|
|
|
extends:
|
|
|
|
- .check_pre_commit_template
|
|
|
|
- .rules:dev
|
2019-11-12 07:59:11 +00:00
|
|
|
script:
|
2023-08-03 00:31:11 +00:00
|
|
|
- fetch_submodules
|
2021-03-01 07:20:34 +00:00
|
|
|
- python ${CI_PROJECT_DIR}/tools/ci/ci_get_mr_info.py files ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} | xargs pre-commit run --files
|
2019-11-12 07:59:11 +00:00
|
|
|
|
2023-02-07 09:46:03 +00:00
|
|
|
check_MR_style_dangerjs:
|
|
|
|
extends:
|
|
|
|
- .pre_check_template
|
2023-04-13 09:25:46 +00:00
|
|
|
image: node:18.15.0-alpine3.16
|
2023-02-07 09:46:03 +00:00
|
|
|
variables:
|
|
|
|
DANGER_GITLAB_API_TOKEN: ${ESPCI_TOKEN}
|
|
|
|
DANGER_GITLAB_HOST: ${GITLAB_HTTP_SERVER}
|
|
|
|
DANGER_GITLAB_API_BASE_URL: ${GITLAB_HTTP_SERVER}/api/v4
|
2023-02-21 07:56:09 +00:00
|
|
|
DANGER_JIRA_USER: ${DANGER_JIRA_USER}
|
|
|
|
DANGER_JIRA_PASSWORD: ${DANGER_JIRA_PASSWORD}
|
2023-04-13 09:25:46 +00:00
|
|
|
cache:
|
|
|
|
# pull only for most of the use cases since it's cache dir.
|
|
|
|
# Only set "push" policy for "upload_cache" stage jobs
|
|
|
|
key:
|
|
|
|
files:
|
|
|
|
- .gitlab/dangerjs/package-lock.json
|
|
|
|
paths:
|
|
|
|
- .gitlab/dangerjs/node_modules/
|
|
|
|
policy: pull
|
2023-02-07 09:46:03 +00:00
|
|
|
before_script:
|
2023-04-13 09:25:46 +00:00
|
|
|
- cd .gitlab/dangerjs
|
|
|
|
- npm install --no-progress --no-update-notifier # Install danger dependencies
|
2023-02-07 09:46:03 +00:00
|
|
|
script:
|
2023-04-13 09:25:46 +00:00
|
|
|
- npx danger ci --failOnErrors -v
|
2023-02-07 09:46:03 +00:00
|
|
|
rules:
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
|
|
|
2019-11-12 07:59:11 +00: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-27 03:20:53 +00:00
|
|
|
extends:
|
2022-07-28 07:32:13 +00:00
|
|
|
- .pre_check_template
|
2020-10-20 07:00:50 +00:00
|
|
|
- .rules:protected
|
2019-11-12 07:59:11 +00:00
|
|
|
script:
|
|
|
|
- export IDF_PATH=$PWD
|
|
|
|
- tools/ci/check_idf_version.sh
|
|
|
|
|
2023-09-18 11:37:18 +00:00
|
|
|
check_api_usage:
|
2022-07-28 07:32:13 +00:00
|
|
|
extends: .pre_check_template
|
2019-11-12 07:59:11 +00:00
|
|
|
script:
|
|
|
|
- tools/ci/check_examples_rom_header.sh
|
2021-06-15 09:11:50 +00:00
|
|
|
- tools/ci/check_api_violation.sh
|
2023-09-18 11:37:18 +00:00
|
|
|
- tools/ci/check_examples_extra_component_dirs.sh
|
2019-11-12 07:59:11 +00:00
|
|
|
|
2022-01-03 23:18:55 +00:00
|
|
|
check_blobs:
|
2023-07-14 12:15:50 +00:00
|
|
|
extends:
|
|
|
|
- .pre_check_template
|
|
|
|
- .rules:build:check
|
2019-12-11 03:40:20 +00:00
|
|
|
variables:
|
2022-12-14 09:10:54 +00:00
|
|
|
SUBMODULES_TO_FETCH: "components/esp_wifi/lib;components/esp_phy/lib;components/esp_coex/lib"
|
2019-12-11 03:40:20 +00:00
|
|
|
script:
|
2022-01-03 23:18:55 +00:00
|
|
|
# Check if Wi-Fi library header files match between IDF and the version used when compiling the libraries
|
2019-12-11 03:40:20 +00:00
|
|
|
- IDF_TARGET=esp32 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
|
2020-01-17 03:47:08 +00:00
|
|
|
- IDF_TARGET=esp32s2 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
|
2022-01-03 23:18:55 +00:00
|
|
|
- IDF_TARGET=esp32s3 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
|
2023-03-10 06:31:33 +00:00
|
|
|
- IDF_TARGET=esp32c2 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
|
2022-01-03 23:18:55 +00:00
|
|
|
- IDF_TARGET=esp32c3 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
|
2023-03-10 06:31:33 +00:00
|
|
|
- IDF_TARGET=esp32c6 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
|
2022-12-14 09:10:54 +00: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 06:31:33 +00:00
|
|
|
- IDF_TARGET=esp32c2 $IDF_PATH/components/esp_coex/test_md5/test_md5.sh
|
2022-12-14 09:10:54 +00:00
|
|
|
- IDF_TARGET=esp32c3 $IDF_PATH/components/esp_coex/test_md5/test_md5.sh
|
2023-03-10 06:31:33 +00: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 23:18:55 +00:00
|
|
|
# Check if Wi-Fi, PHY, BT blobs contain references to specific symbols
|
|
|
|
- bash $IDF_PATH/tools/ci/check_blobs.sh
|
2019-12-11 03:40:20 +00:00
|
|
|
|
2019-12-25 20:03:41 +00:00
|
|
|
check_public_headers:
|
2020-09-27 03:20:53 +00:00
|
|
|
extends:
|
2022-07-28 07:32:13 +00:00
|
|
|
- .pre_check_template
|
2023-07-14 12:15:50 +00:00
|
|
|
- .rules:build:check
|
2019-12-18 15:11:11 +00:00
|
|
|
script:
|
2022-06-29 20:49:51 +00: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 08:15:49 +00:00
|
|
|
- IDF_TARGET=esp32c6 python tools/ci/check_public_headers.py --jobs 4 --prefix riscv32-esp-elf-
|
2022-12-29 03:00:42 +00:00
|
|
|
- IDF_TARGET=esp32h2 python tools/ci/check_public_headers.py --jobs 4 --prefix riscv32-esp-elf-
|
2023-08-03 03:50:47 +00:00
|
|
|
- IDF_TARGET=esp32p4 python tools/ci/check_public_headers.py --jobs 4 --prefix riscv32-esp-elf-
|
2019-12-18 15:11:11 +00:00
|
|
|
|
2022-04-16 06:02:57 +00:00
|
|
|
check_chip_support_components:
|
2021-08-23 06:03:23 +00:00
|
|
|
extends:
|
2022-07-28 07:32:13 +00:00
|
|
|
- .pre_check_template
|
2023-07-14 12:15:50 +00:00
|
|
|
- .rules:build:check
|
2022-04-16 06:02:57 +00:00
|
|
|
artifacts:
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
|
|
|
- esp_hw_support_part.h
|
|
|
|
- bootloader_support_part.h
|
|
|
|
expire_in: 1 week
|
2021-08-23 06:03:23 +00:00
|
|
|
script:
|
2022-01-05 07:44:02 +00:00
|
|
|
- python tools/ci/check_soc_headers_leak.py
|
2021-08-23 06:03:23 +00: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 06:02:57 +00:00
|
|
|
- tools/ci/check_esp_memory_utils_headers.sh
|
2021-08-23 06:03:23 +00:00
|
|
|
|
2021-06-21 02:47:34 +00:00
|
|
|
check_esp_err_to_name:
|
|
|
|
extends:
|
2022-07-28 07:32:13 +00:00
|
|
|
- .pre_check_template
|
2023-07-14 12:15:50 +00:00
|
|
|
- .rules:build:check
|
2021-06-21 02:47:34 +00:00
|
|
|
artifacts:
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
|
|
|
- components/esp_common/esp_err_to_name.c
|
|
|
|
expire_in: 1 week
|
|
|
|
script:
|
|
|
|
- cd ${IDF_PATH}/tools/
|
2021-05-26 08:44:20 +00:00
|
|
|
- ./gen_esp_err_to_name.py
|
2021-06-21 02:47:34 +00: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 15:25:38 +00:00
|
|
|
check_esp_system:
|
|
|
|
extends:
|
2022-07-28 07:32:13 +00:00
|
|
|
- .pre_check_template
|
2022-05-18 15:25:38 +00:00
|
|
|
- .rules:build
|
|
|
|
script:
|
|
|
|
- python components/esp_system/check_system_init_priorities.py
|
|
|
|
|
2020-10-06 22:54:27 +00: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-27 03:20:53 +00:00
|
|
|
extends:
|
2022-07-28 07:32:13 +00:00
|
|
|
- .pre_check_template
|
2021-02-09 04:31:38 +00:00
|
|
|
- .rules:tag:release
|
2020-10-06 22:54:27 +00:00
|
|
|
script:
|
2020-11-22 23:23:24 +00:00
|
|
|
- (git cat-file -t $CI_COMMIT_REF_NAME | grep tag) || (echo "ESP-IDF versions must be annotated tags." && exit 1)
|
2021-02-02 02:53:40 +00:00
|
|
|
|
2021-02-09 04:31:38 +00:00
|
|
|
check_artifacts_expire_time:
|
2022-07-28 07:32:13 +00:00
|
|
|
extends: .pre_check_template
|
2021-02-09 04:31:38 +00:00
|
|
|
script:
|
|
|
|
# check if we have set expire time for all artifacts
|
|
|
|
- python tools/ci/check_artifacts_expire_time.py
|
|
|
|
|
2022-07-11 05:43:45 +00:00
|
|
|
check_test_scripts_build_test_rules:
|
|
|
|
extends:
|
2022-07-28 07:32:13 +00:00
|
|
|
- .pre_check_template
|
2023-09-26 11:24:26 +00:00
|
|
|
- .before_script:build
|
2022-07-11 05:43:45 +00:00
|
|
|
script:
|
2022-08-25 02:56:14 +00:00
|
|
|
# required pytest related packages
|
|
|
|
- run_cmd bash install.sh --enable-pytest
|
2022-07-11 05:43:45 +00:00
|
|
|
- python tools/ci/check_build_test_rules.py check-test-scripts examples/ tools/test_apps components
|
2023-01-03 06:14:49 +00:00
|
|
|
|
|
|
|
check_configure_ci_environment_parsing:
|
|
|
|
extends:
|
|
|
|
- .pre_check_template
|
2023-09-26 11:24:26 +00:00
|
|
|
- .before_script:build
|
2023-07-14 12:15:50 +00:00
|
|
|
- .rules:build
|
2023-01-03 06:14:49 +00:00
|
|
|
script:
|
|
|
|
- cd tools/ci
|
|
|
|
- python -m unittest ci_build_apps.py
|
2023-05-24 02:53:57 +00:00
|
|
|
|
|
|
|
mr_variables:
|
|
|
|
extends:
|
|
|
|
- .pre_check_template
|
|
|
|
- .rules:mr
|
2023-09-26 11:24:26 +00:00
|
|
|
- .before_script:minimal
|
2023-05-24 02:53:57 +00:00
|
|
|
tags:
|
|
|
|
- build
|
|
|
|
script:
|
|
|
|
- echo "MR_MODIFIED_FILES=$(python tools/ci/ci_get_mr_info.py files ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} | xargs)" >> mr.env
|
|
|
|
- echo "MR_MODIFIED_COMPONENTS=$(python tools/ci/ci_get_mr_info.py components ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} | xargs)" >> mr.env
|
|
|
|
- >
|
2023-05-31 13:35:47 +00:00
|
|
|
if echo "$CI_MERGE_REQUEST_LABELS" | egrep "(^|,)BUILD_AND_TEST_ALL_APPS(,|$)"; then
|
2023-05-24 02:53:57 +00:00
|
|
|
echo "BUILD_AND_TEST_ALL_APPS=1" >> mr.env
|
|
|
|
fi
|
2023-07-19 03:50:53 +00:00
|
|
|
- cat mr.env
|
2023-05-24 02:53:57 +00:00
|
|
|
artifacts:
|
|
|
|
reports:
|
|
|
|
dotenv: mr.env
|
|
|
|
expire_in: 4 days
|