ci: differnet cache key for different idf ver

update caches on release tags and nightly schedules
pull/12863/head
Chen Yudong 2023-12-19 16:19:50 +08:00
rodzic 3cd7fb6321
commit ff015d1872
4 zmienionych plików z 16 dodań i 6 usunięć

Wyświetl plik

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

Wyświetl plik

@ -349,6 +349,9 @@
.if-schedule: &if-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: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_BUILD_SYSTEM_TEST_WIN == "true"'
@ -405,7 +408,8 @@
### Patterns ###
.rules:patterns:python-cache:
rules:
- *if-schedule
- <<: *if-tag-release
- <<: *if-schedule-nightly
- <<: *if-label-upload_cache
when: manual
- <<: *if-dev-push
@ -413,6 +417,8 @@
.rules:patterns:submodule:
rules:
- <<: *if-tag-release
- <<: *if-schedule-nightly
- <<: *if-label-upload_cache
when: manual
- <<: *if-dev-push

Wyświetl plik

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

Wyświetl plik

@ -15,7 +15,7 @@ upload-pip-cache:
- $GEO
- cache
cache:
key: pip-cache
key: pip-cache-${LATEST_GIT_TAG}
paths:
- .cache/pip
policy: push
@ -35,7 +35,7 @@ upload-submodules-cache:
- $GEO
- cache
cache:
key: submodule-cache
key: submodule-cache-${LATEST_GIT_TAG}
paths:
- .cache/submodule_archives
policy: push