summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorHarmen Stoppels <me@harmenstoppels.nl>2024-05-02 12:06:30 +0200
committerGitHub <noreply@github.com>2024-05-02 12:06:30 +0200
commit9b62a9c23880a409f82f673e0b63b141c9761ced (patch)
tree45522047f8c64f5f8c8730e125ecbae68c3b9954 /share
parentf7eb0ccfc9becd6fd2de37910ec8ed0967b86039 (diff)
downloadspack-9b62a9c23880a409f82f673e0b63b141c9761ced.tar.gz
spack-9b62a9c23880a409f82f673e0b63b141c9761ced.tar.bz2
spack-9b62a9c23880a409f82f673e0b63b141c9761ced.tar.xz
spack-9b62a9c23880a409f82f673e0b63b141c9761ced.zip
gitlab ci: cache user cache (#43952)
Diffstat (limited to 'share')
-rw-r--r--share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml1
-rw-r--r--share/spack/gitlab/cloud_pipelines/configs/ci.yaml4
2 files changed, 3 insertions, 2 deletions
diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml
index 4256a3e2fd..9bc238ff6e 100644
--- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml
+++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml
@@ -170,6 +170,7 @@ default:
artifacts:
paths:
- "${CI_PROJECT_DIR}/jobs_scratch_dir"
+ - "${CI_PROJECT_DIR}/tmp/_user_cache/cache"
variables:
KUBERNETES_CPU_REQUEST: 4000m
KUBERNETES_MEMORY_REQUEST: 16G
diff --git a/share/spack/gitlab/cloud_pipelines/configs/ci.yaml b/share/spack/gitlab/cloud_pipelines/configs/ci.yaml
index 3b9736e10b..5f34beb2c5 100644
--- a/share/spack/gitlab/cloud_pipelines/configs/ci.yaml
+++ b/share/spack/gitlab/cloud_pipelines/configs/ci.yaml
@@ -13,7 +13,7 @@ ci:
before_script-:
- - cat /proc/loadavg || true
- cat /proc/meminfo | grep 'MemTotal\|MemFree' || true
- - - spack list --count # ensure that spack's cache is populated
+ - - touch ${SPACK_USER_CACHE_PATH}/cache/*/* # bump mtime of cache so it is not invalidated
- - spack env activate --without-view ${SPACK_CONCRETE_ENV_DIR}
- spack compiler list
- if [ -n "$SPACK_BUILD_JOBS" ]; then spack config add "config:build_jobs:$SPACK_BUILD_JOBS"; fi
@@ -119,7 +119,7 @@ ci:
# Disable local configs to avoid issues on shell runners
SPACK_DISABLE_LOCAL_CONFIG: "1"
before_script:
- - - export SPACK_USER_CACHE_PATH="${CI_PROJECT_DIR}/_user_cache/"
+ - - export SPACK_USER_CACHE_PATH="${CI_PROJECT_DIR}/tmp/_user_cache/"
- - uname -a || true
- grep -E "vendor|model name" /proc/cpuinfo 2>/dev/null | sort -u || head -n10 /proc/cpuinfo 2>/dev/null || true
- nproc || true