summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2023-06-09 07:56:28 +0200
committerGitHub <noreply@github.com>2023-06-09 07:56:28 +0200
commitd5747a61e7cb6178a72ab5568bff40f4bf509638 (patch)
tree9cdc71a9c660b22131a775afc9af7048b85efcac /share
parente88c747abc87f428441a583364ead1b44f31ead5 (diff)
downloadspack-d5747a61e7cb6178a72ab5568bff40f4bf509638.tar.gz
spack-d5747a61e7cb6178a72ab5568bff40f4bf509638.tar.bz2
spack-d5747a61e7cb6178a72ab5568bff40f4bf509638.tar.xz
spack-d5747a61e7cb6178a72ab5568bff40f4bf509638.zip
Hotfix to avoid building compilers from sources in pcluster pipelines (#38256)
The pcluster image has am internal buildcache without an index. Also, we need to force reuse to avoid rebuilding GCC, since the default is to only reuse dependencies - and that is subject to changes in the GCC recipe.
Diffstat (limited to 'share')
-rw-r--r--share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml5
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-icelake/spack.yaml5
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_n1/spack.yaml5
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/spack.yaml5
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-skylake/spack.yaml5
5 files changed, 20 insertions, 5 deletions
diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml
index 74176c198f..f46d643993 100644
--- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml
+++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml
@@ -736,12 +736,15 @@ deprecated-ci-build:
# Use gcc from local container buildcache
- - . "./share/spack/setup-env.sh"
- . /etc/profile.d/modules.sh
+ - spack buildcache rebuild-index /bootstrap/local-cache/
- spack mirror add local-cache /bootstrap/local-cache
- spack gpg trust /bootstrap/public-key
- cd "${CI_PROJECT_DIR}" && curl -sOL https://raw.githubusercontent.com/spack/spack-configs/main/AWS/parallelcluster/postinstall.sh
- sed -i -e "s/spack arch -t/echo ${SPACK_TARGET_ARCH}/g" postinstall.sh
+ - sed -i.bkp s/"spack install gcc"/"spack install --cache-only --reuse gcc"/ postinstall.sh
+ - diff postinstall.sh postinstall.sh.bkp || echo Done
- /bin/bash postinstall.sh -fg
- - spack config --scope site add "packages:all:target:\"target=${SPACK_TARGET_ARCH}\""
+ - spack config --scope site add "packages:all:target:\"${SPACK_TARGET_ARCH}\""
after_script:
- - mv "${CI_PROJECT_DIR}/postinstall.sh" "${CI_PROJECT_DIR}/jobs_scratch_dir/"
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-icelake/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-icelake/spack.yaml
index dc08ddde0a..616d438ace 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-icelake/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-icelake/spack.yaml
@@ -42,8 +42,11 @@ spack:
- spack --version
- spack arch
# Use gcc from local container buildcache
- - - spack mirror add local-cache /bootstrap/local-cache
+ - - spack buildcache rebuild-index /bootstrap/local-cache/
+ - sed -i.bkp s/"spack install gcc"/"spack install --cache-only --reuse gcc"/ /bootstrap/postinstall.sh
+ - spack mirror add local-cache /bootstrap/local-cache
- spack gpg trust /bootstrap/public-key
+ - diff /bootstrap/postinstall.sh /bootstrap/postinstall.sh.bkp || echo Done
- - /bin/bash "${SPACK_ARTIFACTS_ROOT}/postinstall.sh" -fg
- spack config --scope site add "packages:all:target:\"target=${SPACK_TARGET_ARCH}\""
- signing-job:
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_n1/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_n1/spack.yaml
index 0dc063af14..861d9f3312 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_n1/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_n1/spack.yaml
@@ -44,8 +44,11 @@ spack:
- spack --version
- spack arch
# Use gcc from local container buildcache
- - - spack mirror add local-cache /bootstrap/local-cache
+ - - spack buildcache rebuild-index /bootstrap/local-cache/
+ - sed -i.bkp s/"spack install gcc"/"spack install --cache-only --reuse gcc"/ /bootstrap/postinstall.sh
+ - spack mirror add local-cache /bootstrap/local-cache
- spack gpg trust /bootstrap/public-key
+ - diff /bootstrap/postinstall.sh /bootstrap/postinstall.sh.bkp || echo Done
- - /bin/bash "${SPACK_ARTIFACTS_ROOT}/postinstall.sh" -fg
- spack config --scope site add "packages:all:target:\"target=${SPACK_TARGET_ARCH}\""
- signing-job:
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/spack.yaml
index 7629f6242f..9303392fb2 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/spack.yaml
@@ -44,8 +44,11 @@ spack:
- spack --version
- spack arch
# Use gcc from local container buildcache
- - - spack mirror add local-cache /bootstrap/local-cache
+ - - spack buildcache rebuild-index /bootstrap/local-cache/
+ - sed -i.bkp s/"spack install gcc"/"spack install --cache-only --reuse gcc"/ /bootstrap/postinstall.sh
+ - spack mirror add local-cache /bootstrap/local-cache
- spack gpg trust /bootstrap/public-key
+ - diff /bootstrap/postinstall.sh /bootstrap/postinstall.sh.bkp || echo Done
- - /bin/bash "${SPACK_ARTIFACTS_ROOT}/postinstall.sh" -fg
- spack config --scope site add "packages:all:target:\"target=${SPACK_TARGET_ARCH}\""
- signing-job:
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-skylake/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-skylake/spack.yaml
index ecec12eda1..3c6d4872d6 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-skylake/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-skylake/spack.yaml
@@ -42,8 +42,11 @@ spack:
- spack --version
- spack arch
# Use gcc from local container buildcache
- - - spack mirror add local-cache /bootstrap/local-cache
+ - - spack buildcache rebuild-index /bootstrap/local-cache/
+ - sed -i.bkp s/"spack install gcc"/"spack install --cache-only --reuse gcc"/ /bootstrap/postinstall.sh
+ - spack mirror add local-cache /bootstrap/local-cache
- spack gpg trust /bootstrap/public-key
+ - diff /bootstrap/postinstall.sh /bootstrap/postinstall.sh.bkp || echo Done
- - /bin/bash "${SPACK_ARTIFACTS_ROOT}/postinstall.sh" -fg
- spack config --scope site add "packages:all:target:\"target=${SPACK_TARGET_ARCH}\""
- signing-job: