Merge branch 'ci/add_more_need_relationship' into 'master'

CI: Add More "needs" relationship to build stage jobs

See merge request espressif/esp-idf!11182
This commit is contained in:
Anton Maklakov
2020-11-30 23:48:56 +08:00
2 changed files with 23 additions and 4 deletions

View File

@@ -5,6 +5,7 @@
- build - build
variables: variables:
SIZE_INFO_LOCATION: "$CI_PROJECT_DIR/size_info.txt" SIZE_INFO_LOCATION: "$CI_PROJECT_DIR/size_info.txt"
dependencies: []
.build_template_app_template: .build_template_app_template:
extends: extends:
@@ -43,7 +44,9 @@
# build-related-pre-check-jobs ------------------------------------------------ # build-related-pre-check-jobs ------------------------------------------------
# Build at least one project for each target at earliest stage to reduce build cost for obvious failing commits # Build at least one project for each target at earliest stage to reduce build cost for obvious failing commits
fast_template_app: fast_template_app:
extends: .build_template_app_template extends:
- .build_template_app_template
- .rules:build_tests:target_test-weekend_test
stage: pre_check stage: pre_check
variables: variables:
BUILD_COMMAND_ARGS: "-p" BUILD_COMMAND_ARGS: "-p"
@@ -89,6 +92,11 @@ build_ssc_esp32s2:
extends: extends:
- .build_template - .build_template
- .rules:build_tests:unit_test - .rules:build_tests:unit_test
dependencies: # set dependencies to null to avoid missing artifacts issue
needs:
- job: fast_template_app
artifacts: false
- scan_tests
artifacts: artifacts:
paths: paths:
- tools/unit-test-app/output/${IDF_TARGET} - tools/unit-test-app/output/${IDF_TARGET}
@@ -132,6 +140,11 @@ build_esp_idf_tests_cmake_esp32s3:
extends: extends:
- .build_template - .build_template
- .rules:build_tests:example_test-weekend_test - .rules:build_tests:example_test-weekend_test
dependencies: # set dependencies to null to avoid missing artifacts issue
needs:
- job: fast_template_app
artifacts: false
- scan_tests
variables: variables:
TEST_PREFIX: examples TEST_PREFIX: examples
TEST_RELATIVE_DIR: examples TEST_RELATIVE_DIR: examples
@@ -168,8 +181,6 @@ build_examples_make:
# same as above, but for CMake # same as above, but for CMake
.build_examples_cmake: .build_examples_cmake:
extends: .build_examples_template extends: .build_examples_template
needs:
- scan_tests
artifacts: artifacts:
paths: paths:
- build_${TEST_PREFIX}/list.json - build_${TEST_PREFIX}/list.json
@@ -291,6 +302,10 @@ build_docs_pdf:
extends: extends:
- .build_template - .build_template
- .rules:build_tests:weekend_test - .rules:build_tests:weekend_test
dependencies: # set dependencies to null to avoid missing artifacts issue
needs:
- job: fast_template_app
artifacts: false
script: script:
- ${IDF_PATH}/tools/ci/test_configure_ci_environment.sh - ${IDF_PATH}/tools/ci/test_configure_ci_environment.sh
- rm -rf test_build_system - rm -rf test_build_system
@@ -382,6 +397,7 @@ build_installer:
image: $CI_DOCKER_REGISTRY/wine-innosetup:1 image: $CI_DOCKER_REGISTRY/wine-innosetup:1
tags: tags:
- build - build
dependencies: # set dependencies to null to avoid missing artifacts issue
needs: needs:
- build_cmdlinerunner - build_cmdlinerunner
script: script:
@@ -390,6 +406,9 @@ build_installer:
# This job builds template app with permutations of targets and optimization levels # This job builds template app with permutations of targets and optimization levels
build_template_app: build_template_app:
needs:
- job: fast_template_app
artifacts: false
extends: .build_template_app_template extends: .build_template_app_template
# Sonarqube related jobs put here for this reason: # Sonarqube related jobs put here for this reason:
@@ -425,6 +444,7 @@ build_template_app:
REPORT_DIR: examples/get-started/hello_world/tidybuild/report REPORT_DIR: examples/get-started/hello_world/tidybuild/report
tags: tags:
- host_test - host_test
dependencies: # set dependencies to null to avoid missing artifacts issue
needs: needs:
- clang_tidy_check_regular - clang_tidy_check_regular

View File

@@ -58,7 +58,6 @@
- .target_test_job_template - .target_test_job_template
- .rules:tests:unit_test - .rules:tests:unit_test
variables: variables:
TEST_CASE_PATH: "$COMPONENT_UT_DIRS"
CONFIG_FILE_PATH: "${CI_PROJECT_DIR}/component_ut/test_configs" CONFIG_FILE_PATH: "${CI_PROJECT_DIR}/component_ut/test_configs"
script: script:
- *define_config_file_name - *define_config_file_name