From 140f1af212b64b32528169193aea14a23e9fd9a1 Mon Sep 17 00:00:00 2001 From: Vicente Adolfo Bolea Sanchez Date: Fri, 26 Dec 2025 20:44:25 -0500 Subject: [PATCH] enable spack buildcache --- .gitlab/gitlab-ci-frontier.yml | 1 + scripts/ci/gitlab-ci/run.sh | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.gitlab/gitlab-ci-frontier.yml b/.gitlab/gitlab-ci-frontier.yml index e11ff87..795a926 100644 --- a/.gitlab/gitlab-ci-frontier.yml +++ b/.gitlab/gitlab-ci-frontier.yml @@ -38,6 +38,7 @@ stages: SPACK_DISABLE_LOCAL_CONFIG: "true" SPACK_BUILD_DIR: "${CUSTOM_CI_BUILDS_DIR}/artifacts/spack-build-${CI_PIPELINE_IID}" SPACK_USER_CACHE_PATH: "${SPACK_BUILD_DIR}/cache" + SPACK_BUILDCACHE_DIR: "/lustre/orion/world-shared/ums032/frontier-buildcache/" # Order matters JOB_MODULES: >- diff --git a/scripts/ci/gitlab-ci/run.sh b/scripts/ci/gitlab-ci/run.sh index d42b8b9..adaf48c 100755 --- a/scripts/ci/gitlab-ci/run.sh +++ b/scripts/ci/gitlab-ci/run.sh @@ -43,6 +43,10 @@ case ${STEP} in # Activate the environment pointing to the config directory spack env activate --create --without-view --envfile "${PWD}/spack/template" tools-sdk + if [ -n "${SPACK_BUILDCACHE_DIR}" ]; then + spack mirror add --unsigned --autopush frontier "file://${SPACK_BUILDCACHE_DIR}" + fi + # Verify environment is active spack env status