Skip to content

Commit

Permalink
More build-cache related updated for .github/workflows/ubuntu-ci-x86_…
Browse files Browse the repository at this point in the history
…64-gnu.yaml
  • Loading branch information
climbfuji committed Apr 23, 2024
1 parent e954782 commit 72f9f58
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/ubuntu-ci-x86_64-gnu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
spack config add "packages:met:variants:+python +grib2 +graphics +lidar2nc +modis"
# Concretize and check for duplicates
spack concretize 2>&1 | tee log.concretize.gnu-11.4.0
spack concretize 2>&1 | tee log.concretize.gnu-11.4.0-buildcache
${SPACK_STACK_DIR}/util/show_duplicate_packages.py -d log.concretize.gnu-11.4.0 -i fms -i crtm -i esmf -i mapl
# Add and update source cache
Expand All @@ -91,17 +91,17 @@ jobs:
# base-env
echo "base-env ..."
spack install --fail-fast --source --no-check-signature base-env 2>&1 | tee log.install.gnu-11.4.0.base-env
spack install --fail-fast --source --no-check-signature base-env 2>&1 | tee log.install.gnu-11.4.0-buildcache.base-env
spack buildcache create -a -u /home/ubuntu/spack-stack/build-cache/ base-env
# jedi-base-env
echo "jedi-base-env ..."
spack install --fail-fast --source --no-check-signature jedi-base-env 2>&1 | tee log.install.intel-2021.10.0.jedi-base-env
spack install --fail-fast --source --no-check-signature jedi-base-env 2>&1 | tee log.install.gnu-11.4.0-buildcache.jedi-base-env
spack buildcache create -a -u /home/ubuntu/spack-stack/build-cache/ jedi-base-env
# the rest
echo "unified-env ..."
spack install --fail-fast --source --no-check-signature 2>&1 | tee log.install.gnu-11.4.0.unified-env
spack install --fail-fast --source --no-check-signature 2>&1 | tee log.install.gnu-11.4.0-buildcache.unified-env
spack buildcache create -a -u /home/ubuntu/spack-stack/build-cache/
# Next steps: synchronize source and build cache to a central/combined mirror?
Expand All @@ -116,20 +116,21 @@ jobs:
rsync -av --exclude='install' --exclude='spack.lock' --exclude='.spack_db' ${BUILDCACHE_ENVDIR}/ ${ENVDIR}/
spack env activate ${ENVDIR}
# For buildcaches
# Remove buildcache stuff, then concretize
spack config remove config:install_tree:padded_length
spack mirror remove local-binary
# Add binary cache and reindex it
# Concretize
spack concretize --force 2>&1 | tee log.concretize.gnu-11.4.0
# Add binary cache back in and reindex it
spack mirror add local-binary file:///home/ubuntu/spack-stack/build-cache/
echo "Packages in combined spack build caches:"
spack buildcache list
# Break installation up in pieces and create build caches in between
# This allows us to "spin up" builds that altogether take longer than
# six hours, and/or fail later in the build process.
# base-env
echo "base-env ..."
spack install --fail-fast --source --no-check-signature --cache-only 2>&1 | tee log.install.gnu-11.4.0.unified-env
spack install --fail-fast --source --no-check-signature 2>&1 | tee log.install.gnu-11.4.0.unified-env
${SPACK_STACK_DIR}/util/ldd_check.py $SPACK_ENV 2>&1 | tee log.ldd_check
spack clean -a
Expand Down

0 comments on commit 72f9f58

Please sign in to comment.