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