- integration_test
- check
- deploy
+ - post_check
variables:
# System environment
variables:
BATCH_BUILD: "1"
IDF_CI_BUILD: "1"
+ only:
+ variables:
+ - $BOT_TRIGGER_WITH_LABEL == null
+ - $BOT_LABEL_BUILD
+ - $BOT_LABEL_REGULAR_TEST
script:
- git clone https://github.com/espressif/esp-idf-template.git
- cd esp-idf-template
expire_in: 1 week
variables:
SSC_CONFIG_FOLDER: "$CI_PROJECT_DIR/SSC/configs/ESP32_IDF"
+ only:
+ variables:
+ - $BOT_TRIGGER_WITH_LABEL == null
+ - $BOT_LABEL_BUILD
+ - $BOT_LABEL_INTEGRATION_TEST
+ - $BOT_LABEL_REGULAR_TEST
script:
- git clone $SSC_REPOSITORY
- cd SSC
- components/idf_test/unit_test/TestCaseAll.yml
- components/idf_test/unit_test/CIConfigs/*.yml
expire_in: 2 days
+ only:
+ variables:
+ - $BOT_TRIGGER_WITH_LABEL == null
+ - $BOT_LABEL_BUILD
+ - $BOT_LABEL_UNIT_TEST
+ - $BOT_LABEL_REGULAR_TEST
script:
- export PATH="$IDF_PATH/tools:$PATH"
- cd $CI_PROJECT_DIR/tools/unit-test-app
variables:
IDF_CI_BUILD: "1"
LOG_PATH: "$CI_PROJECT_DIR/log_examples_make"
+ only:
+ variables:
+ - $BOT_TRIGGER_WITH_LABEL == null
+ - $BOT_LABEL_BUILD
+ - $BOT_LABEL_EXAMPLE_TEST
+ - $BOT_LABEL_REGULAR_TEST
script:
# it's not possible to build 100% out-of-tree and have the "artifacts"
# mechanism work, but this is the next best thing
variables:
IDF_CI_BUILD: "1"
LOG_PATH: "$CI_PROJECT_DIR/log_examples_cmake"
+ only:
+ variables:
+ - $BOT_TRIGGER_WITH_LABEL == null
+ - $BOT_LABEL_BUILD
+ - $BOT_LABEL_EXAMPLE_TEST
+ - $BOT_LABEL_REGULAR_TEST
script:
# it's not possible to build 100% out-of-tree and have the "artifacts"
# mechanism work, but this is the next best thing
- docs/zh_CN/sphinx-warning-log-sanitized.txt
- docs/zh_CN/_build/html
expire_in: 1 day
+ only:
+ variables:
+ - $BOT_TRIGGER_WITH_LABEL == null
+ - $BOT_LABEL_BUILD
+ - $BOT_LABEL_BUILD_DOCS
+ - $BOT_LABEL_REGULAR_TEST
script:
- cd docs
- ./check_lang_folder_sync.sh
verify_cmake_style:
stage: build
image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
+ only:
+ variables:
+ - $BOT_TRIGGER_WITH_LABEL == null
+ - $BOT_LABEL_BUILD
+ - $BOT_LABEL_REGULAR_TEST
script:
tools/cmake/run_cmake_lint.sh
tags:
- host_test
dependencies: []
+ only:
+ variables:
+ - $BOT_TRIGGER_WITH_LABEL == null
+ - $BOT_LABEL_HOST_TEST
+ - $BOT_LABEL_REGULAR_TEST
test_nvs_on_host:
<<: *host_test_template
- components/nvs_flash/test_nvs_host/coverage_report
expire_in: 1 week
only:
- - triggers
- # This job takes a few hours to finish, so only run it on demand
- variables:
- BOT_NEEDS_TRIGGER_BY_NAME: 1
+ refs:
+ - triggers
+ variables:
+ - $BOT_LABEL_NVS_COVERAGE
script:
- cd components/nvs_flash/test_nvs_host
- make coverage_report
- ${FUZZER_TEST_DIR}/fuzz_output.log
expire_in: 1 week
only:
- # can only be triggered
- - triggers
+ refs:
+ # can only be triggered
+ - triggers
+ variables:
+ - $BOT_LABEL_FUZZER_TEST
script:
- export AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES=1 && export AFL_SKIP_CPUFREQ=1
- cd ${FUZZER_TEST_DIR}
- tools/ci/push_to_github.sh
deploy_docs:
- stage: host_test
+ stage: deploy
image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
tags:
- deploy
only:
- - master
- - /^release\/v/
- - /^v\d+\.\d+(\.\d+)?($|-)/
- - triggers
+ refs:
+ - master
+ - /^release\/v/
+ - /^v\d+\.\d+(\.\d+)?($|-)/
+ - triggers
+ variables:
+ - $BOT_TRIGGER_WITH_LABEL == null
+ - $BOT_LABEL_BUILD_DOCS
dependencies:
- build_docs
before_script: *do_nothing_before
tags:
- check_doc_links
only:
- # can only be triggered
- - triggers
+ refs:
+ # can only be triggered
+ - triggers
+ variables:
+ - $BOT_TRIGGER_WITH_LABEL == null
+ - $BOT_LABEL_BUILD_DOCS
artifacts:
paths:
- docs/_build/linkcheck
# check if we have set expire time for all artifacts
- python tools/ci/check_artifacts_expire_time.py
+check_pipeline_triggered_by_label:
+ <<: *check_job_template
+ stage: post_check
+ only:
+ variables:
+ - $BOT_TRIGGER_WITH_LABEL
+ script:
+ # If the pipeline is triggered with label, the pipeline will only succeeded if "regular_test" label is added.
+ # We want to make sure some jobs are always executed to detect regression.
+ - test "$BOT_LABEL_REGULAR_TEST" = "true" || exit -1
+
assign_test:
tags:
- assign_test
- components/idf_test/*/TC.sqlite
- $EXAMPLE_CONFIG_OUTPUT_PATH
expire_in: 1 week
+ only:
+ variables:
+ - $BOT_TRIGGER_WITH_LABEL == null
+ - $BOT_LABEL_UNIT_TEST
+ - $BOT_LABEL_INTEGRATION_TEST
+ - $BOT_LABEL_EXAMPLE_TEST
before_script: *add_gitlab_key_before
script:
# assign example tests
stage: integration_test
when: on_success
only:
- - master
- - /^release\/v/
- - /^v\d+\.\d+(\.\d+)?($|-)/
- - triggers
- - schedules
+ refs:
+ - master
+ - /^release\/v/
+ - /^v\d+\.\d+(\.\d+)?($|-)/
+ - triggers
+ - schedules
+ variables:
+ - $BOT_TRIGGER_WITH_LABEL == null
+ - $BOT_LABEL_EXAMPLE_TEST
dependencies:
- assign_test
- build_examples_make_00
dependencies:
- assign_test
- build_esp_idf_tests
+ only:
+ refs:
+ - master
+ - /^release\/v/
+ - /^v\d+\.\d+(\.\d+)?($|-)/
+ - triggers
+ - schedules
+ variables:
+ - $BOT_TRIGGER_WITH_LABEL == null
+ - $BOT_LABEL_UNIT_TEST
variables:
TEST_FW_PATH: "$CI_PROJECT_DIR/tools/tiny-test-fw"
TEST_CASE_PATH: "$CI_PROJECT_DIR/tools/unit-test-app"
stage: integration_test
when: on_success
only:
- - master
- - /^release\/v/
- - /^v\d+\.\d+(\.\d+)?($|-)/
- - triggers
- - schedules
+ refs:
+ - master
+ - /^release\/v/
+ - /^v\d+\.\d+(\.\d+)?($|-)/
+ - triggers
+ - schedules
+ variables:
+ - $BOT_TRIGGER_WITH_LABEL == null
+ - $BOT_LABEL_INTEGRATION_TEST
dependencies:
- assign_test
- build_ssc_00