Merge branch 'ci/different_cache_key_for_idf_ver' into 'master'

ci: differnet cache key for different idf ver

See merge request espressif/esp-idf!28005
This commit is contained in:
Anton Maklakov 2023-12-20 17:39:30 +08:00
commit 46f9c85974
4 changed files with 30 additions and 25 deletions

View File

@ -329,11 +329,15 @@ default:
cache: cache:
# pull only for most of the use cases since it's cache dir. # pull only for most of the use cases since it's cache dir.
# Only set "push" policy for "upload_cache" stage jobs # Only set "push" policy for "upload_cache" stage jobs
- key: pip-cache - key: pip-cache-${LATEST_GIT_TAG}
fallback_keys:
- pip-cache
paths: paths:
- .cache/pip - .cache/pip
policy: pull policy: pull
- key: submodule-cache - key: submodule-cache-${LATEST_GIT_TAG}
fallback_keys:
- submodule-cache
paths: paths:
- .cache/submodule_archives - .cache/submodule_archives
policy: pull policy: pull

View File

@ -197,9 +197,6 @@
- "components/bt/esp_ble_mesh/lib/lib" - "components/bt/esp_ble_mesh/lib/lib"
- ".gitmodules" - ".gitmodules"
.patterns-danger-npm: &patterns-danger-npm
- ".gitlab/dangerjs/package-lock.json"
# for jobs: flash_encryption_wifi_high_traffic # for jobs: flash_encryption_wifi_high_traffic
.patterns-example_test-ota-nightly_run: &patterns-example_test-ota-nightly_run .patterns-example_test-ota-nightly_run: &patterns-example_test-ota-nightly_run
- "examples/system/ota/**/*" - "examples/system/ota/**/*"
@ -337,6 +334,10 @@
.if-protected-no_label: &if-protected-no_label .if-protected-no_label: &if-protected-no_label
if: '($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_BRANCH =~ /^release\/v/ || $CI_COMMIT_TAG =~ /^v\d+\.\d+(\.\d+)?($|-)/) && $BOT_TRIGGER_WITH_LABEL == null' if: '($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_BRANCH =~ /^release\/v/ || $CI_COMMIT_TAG =~ /^v\d+\.\d+(\.\d+)?($|-)/) && $BOT_TRIGGER_WITH_LABEL == null'
.if-protected-ref-push: &if-protected-ref-push
# rules:changes always evaluates to true for new branch pipelines or when there is no Git push event
if: '($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_BRANCH =~ /^release\/v/) && $CI_PIPELINE_SOURCE == "push"'
.if-qa-test-tag: &if-qa-test-tag .if-qa-test-tag: &if-qa-test-tag
if: '$CI_COMMIT_TAG =~ /^qa-test/' if: '$CI_COMMIT_TAG =~ /^qa-test/'
@ -349,6 +350,9 @@
.if-schedule: &if-schedule .if-schedule: &if-schedule
if: '$CI_PIPELINE_SOURCE == "schedule"' if: '$CI_PIPELINE_SOURCE == "schedule"'
.if-schedule-nightly: &if-schedule-nightly
if: '$CI_PIPELINE_SOURCE == "schedule" && $INCLUDE_NIGHTLY_RUN == "1"'
.if-schedule-test-build-system-windows: &if-schedule-test-build-system-windows .if-schedule-test-build-system-windows: &if-schedule-test-build-system-windows
if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_BUILD_SYSTEM_TEST_WIN == "true"' if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_BUILD_SYSTEM_TEST_WIN == "true"'
@ -402,29 +406,26 @@
rules: rules:
- <<: *if-tag-release - <<: *if-tag-release
### Patterns ### # Do not upload caches on dev branches by default
.rules:patterns:python-cache: .rules:upload-python-cache:
rules: rules:
- *if-schedule - <<: *if-tag-release
- <<: *if-label-upload_cache - <<: *if-schedule-nightly
when: manual - <<: *if-protected-ref-push
- <<: *if-dev-push
changes: *patterns-python-cache changes: *patterns-python-cache
.rules:patterns:submodule:
rules:
- <<: *if-label-upload_cache - <<: *if-label-upload_cache
when: manual when: manual
- <<: *if-dev-push
.rules:upload-submodule-cache:
rules:
# Needn't upload submodule cache in schedule pipeline
- <<: *if-tag-release
- <<: *if-protected-ref-push
changes: *patterns-submodule changes: *patterns-submodule
.rules:patterns:dangerjs:
rules:
- <<: *if-label-upload_cache - <<: *if-label-upload_cache
when: manual when: manual
- <<: *if-dev-push
changes: *patterns-danger-npm
### Patterns ###
.rules:patterns:clang_tidy: .rules:patterns:clang_tidy:
rules: rules:
- <<: *if-protected - <<: *if-protected

View File

@ -7,7 +7,7 @@
dependencies: [] dependencies: []
cache: cache:
# Usually do not need submodule-cache in target_test # Usually do not need submodule-cache in target_test
- key: pip-cache - key: pip-cache-${LATEST_GIT_TAG}
paths: paths:
- .cache/pip - .cache/pip
policy: pull policy: pull

View File

@ -10,12 +10,12 @@ upload-pip-cache:
extends: extends:
- .upload_cache_template - .upload_cache_template
- .before_script:minimal - .before_script:minimal
- .rules:patterns:python-cache - .rules:upload-python-cache
tags: tags:
- $GEO - $GEO
- cache - cache
cache: cache:
key: pip-cache key: pip-cache-${LATEST_GIT_TAG}
paths: paths:
- .cache/pip - .cache/pip
policy: push policy: push
@ -30,12 +30,12 @@ upload-submodules-cache:
extends: extends:
- .upload_cache_template - .upload_cache_template
- .before_script:minimal - .before_script:minimal
- .rules:patterns:submodule - .rules:upload-submodule-cache
tags: tags:
- $GEO - $GEO
- cache - cache
cache: cache:
key: submodule-cache key: submodule-cache-${LATEST_GIT_TAG}
paths: paths:
- .cache/submodule_archives - .cache/submodule_archives
policy: push policy: push