Skip to content

Commit

Permalink
ci: Use correct keys for the gitlab caches (#4008)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgessinger authored Jan 10, 2025
1 parent fe95173 commit d6eb834
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 30 deletions.
45 changes: 15 additions & 30 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ variables:

DEPENDENCY_TAG: v5

.ccache_base:
cache:
- key: ccache-${CI_JOB_NAME}-${CCACHE_KEY_SUFFIX}-${CLONE_URL}_${HEAD_REF}
fallback_keys:
- ccache-${CI_JOB_NAME}-${CCACHE_KEY_SUFFIX}-https://github.com/acts-project/acts.git-main
when: always
paths:
- ${CCACHE_DIR}


clang_tidy:
stage: build
image: ghcr.io/acts-project/ubuntu2404:63
Expand Down Expand Up @@ -68,12 +78,7 @@ build_exatrkx_cpu:
- large

cache:
key: ccache-${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}-${CCACHE_KEY_SUFFIX}
fallback_keys:
- ccache-${CI_JOB_NAME}-${CI_DEFAULT_BRANCH}-${CCACHE_KEY_SUFFIX}
when: always
paths:
- ${CCACHE_DIR}
- !reference [.ccache_base, cache]

script:
- export PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH
Expand Down Expand Up @@ -106,12 +111,7 @@ build_exatrkx:
- large

cache:
key: ccache-${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}-${CCACHE_KEY_SUFFIX}
fallback_keys:
- ccache-${CI_JOB_NAME}-${CI_DEFAULT_BRANCH}-${CCACHE_KEY_SUFFIX}
when: always
paths:
- ${CCACHE_DIR}
- !reference [.ccache_base, cache]

artifacts:
paths:
Expand Down Expand Up @@ -193,12 +193,7 @@ build_linux_ubuntu:
DEPENDENCY_URL: https://acts.web.cern.ch/ACTS/ci/ubuntu-24.04/deps.$DEPENDENCY_TAG.tar.zst

cache:
key: ccache-${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}-${CCACHE_KEY_SUFFIX}
fallback_keys:
- ccache-${CI_JOB_NAME}-${CI_DEFAULT_BRANCH}-${CCACHE_KEY_SUFFIX}
when: always
paths:
- ${CCACHE_DIR}
- !reference [.ccache_base, cache]

artifacts:
paths:
Expand Down Expand Up @@ -303,12 +298,7 @@ linux_physmon:
stage: build

cache:
key: ccache-${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}-${CCACHE_KEY_SUFFIX}
fallback_keys:
- ccache-${CI_JOB_NAME}-${CI_DEFAULT_BRANCH}-${CCACHE_KEY_SUFFIX}
when: always
paths:
- ${CCACHE_DIR}
- !reference [.ccache_base, cache]

script:
- git clone $CLONE_URL src
Expand Down Expand Up @@ -384,12 +374,7 @@ linux_ubuntu_2204_clang:
SETUP:

cache:
key: ccache-${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}-${CCACHE_KEY_SUFFIX}
fallback_keys:
- ccache-${CI_JOB_NAME}-${CI_DEFAULT_BRANCH}-${CCACHE_KEY_SUFFIX}
when: always
paths:
- ${CCACHE_DIR}
- !reference [.ccache_base, cache]

before_script:
- 'echo "LCG_VERSION: ${LCG_VERSION}"'
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ repos:
- id: end-of-file-fixer
exclude: \.(diff|patch)$
- id: check-yaml
exclude: \.gitlab-ci.yml$
- id: check-added-large-files


Expand Down

0 comments on commit d6eb834

Please sign in to comment.