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.
This commit is contained in:
parent
e88c747abc
commit
d5747a61e7
5 changed files with 20 additions and 5 deletions
|
@ -736,12 +736,15 @@ deprecated-ci-build:
|
||||||
# Use gcc from local container buildcache
|
# Use gcc from local container buildcache
|
||||||
- - . "./share/spack/setup-env.sh"
|
- - . "./share/spack/setup-env.sh"
|
||||||
- . /etc/profile.d/modules.sh
|
- . /etc/profile.d/modules.sh
|
||||||
|
- spack buildcache rebuild-index /bootstrap/local-cache/
|
||||||
- spack mirror add local-cache /bootstrap/local-cache
|
- spack mirror add local-cache /bootstrap/local-cache
|
||||||
- spack gpg trust /bootstrap/public-key
|
- spack gpg trust /bootstrap/public-key
|
||||||
- cd "${CI_PROJECT_DIR}" && curl -sOL https://raw.githubusercontent.com/spack/spack-configs/main/AWS/parallelcluster/postinstall.sh
|
- 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 -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
|
- /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:
|
after_script:
|
||||||
- - mv "${CI_PROJECT_DIR}/postinstall.sh" "${CI_PROJECT_DIR}/jobs_scratch_dir/"
|
- - mv "${CI_PROJECT_DIR}/postinstall.sh" "${CI_PROJECT_DIR}/jobs_scratch_dir/"
|
||||||
|
|
||||||
|
|
|
@ -42,8 +42,11 @@ spack:
|
||||||
- spack --version
|
- spack --version
|
||||||
- spack arch
|
- spack arch
|
||||||
# Use gcc from local container buildcache
|
# 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
|
- spack gpg trust /bootstrap/public-key
|
||||||
|
- diff /bootstrap/postinstall.sh /bootstrap/postinstall.sh.bkp || echo Done
|
||||||
- - /bin/bash "${SPACK_ARTIFACTS_ROOT}/postinstall.sh" -fg
|
- - /bin/bash "${SPACK_ARTIFACTS_ROOT}/postinstall.sh" -fg
|
||||||
- spack config --scope site add "packages:all:target:\"target=${SPACK_TARGET_ARCH}\""
|
- spack config --scope site add "packages:all:target:\"target=${SPACK_TARGET_ARCH}\""
|
||||||
- signing-job:
|
- signing-job:
|
||||||
|
|
|
@ -44,8 +44,11 @@ spack:
|
||||||
- spack --version
|
- spack --version
|
||||||
- spack arch
|
- spack arch
|
||||||
# Use gcc from local container buildcache
|
# 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
|
- spack gpg trust /bootstrap/public-key
|
||||||
|
- diff /bootstrap/postinstall.sh /bootstrap/postinstall.sh.bkp || echo Done
|
||||||
- - /bin/bash "${SPACK_ARTIFACTS_ROOT}/postinstall.sh" -fg
|
- - /bin/bash "${SPACK_ARTIFACTS_ROOT}/postinstall.sh" -fg
|
||||||
- spack config --scope site add "packages:all:target:\"target=${SPACK_TARGET_ARCH}\""
|
- spack config --scope site add "packages:all:target:\"target=${SPACK_TARGET_ARCH}\""
|
||||||
- signing-job:
|
- signing-job:
|
||||||
|
|
|
@ -44,8 +44,11 @@ spack:
|
||||||
- spack --version
|
- spack --version
|
||||||
- spack arch
|
- spack arch
|
||||||
# Use gcc from local container buildcache
|
# 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
|
- spack gpg trust /bootstrap/public-key
|
||||||
|
- diff /bootstrap/postinstall.sh /bootstrap/postinstall.sh.bkp || echo Done
|
||||||
- - /bin/bash "${SPACK_ARTIFACTS_ROOT}/postinstall.sh" -fg
|
- - /bin/bash "${SPACK_ARTIFACTS_ROOT}/postinstall.sh" -fg
|
||||||
- spack config --scope site add "packages:all:target:\"target=${SPACK_TARGET_ARCH}\""
|
- spack config --scope site add "packages:all:target:\"target=${SPACK_TARGET_ARCH}\""
|
||||||
- signing-job:
|
- signing-job:
|
||||||
|
|
|
@ -42,8 +42,11 @@ spack:
|
||||||
- spack --version
|
- spack --version
|
||||||
- spack arch
|
- spack arch
|
||||||
# Use gcc from local container buildcache
|
# 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
|
- spack gpg trust /bootstrap/public-key
|
||||||
|
- diff /bootstrap/postinstall.sh /bootstrap/postinstall.sh.bkp || echo Done
|
||||||
- - /bin/bash "${SPACK_ARTIFACTS_ROOT}/postinstall.sh" -fg
|
- - /bin/bash "${SPACK_ARTIFACTS_ROOT}/postinstall.sh" -fg
|
||||||
- spack config --scope site add "packages:all:target:\"target=${SPACK_TARGET_ARCH}\""
|
- spack config --scope site add "packages:all:target:\"target=${SPACK_TARGET_ARCH}\""
|
||||||
- signing-job:
|
- signing-job:
|
||||||
|
|
Loading…
Reference in a new issue