-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Ubuntu CI runner from old AWS c6i ParallelCluster to c6a single-node instance #1085
Merged
climbfuji
merged 32 commits into
JCSDA:develop
from
ashley314:feature/ubuntu-ci-c6a_workflow
Apr 26, 2024
Merged
Changes from 31 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
625336d
workflow yaml w intel
ashley314 d2dab2b
first attempt for gcc
ashley314 c90dc47
Rename ubuntu-ci-c6a-x86_64.yaml to ubuntu-ci-x86_64-gnu.yaml, ubuntu…
climbfuji 9d6c6ae
Bug fixes - env names were too long
climbfuji ab19ed9
Merge branch 'develop' of https://github.com/jcsda/spack-stack into f…
climbfuji 3af5875
Use correct Intel compiler with external ecflow
climbfuji c965477
More updates in ubuntu-ci-x86_64-intel.yaml and ubuntu-ci-x86_64-gnu.…
climbfuji 550afb2
More bug fixes in ubuntu-ci-x86_64-gnu.yaml and ubuntu-ci-x86_64-inte…
climbfuji f6ec08e
Merge branch 'develop' of https://github.com/jcsda/spack-stack into f…
climbfuji aa5b64c
Update .gitmodules and submodule pointer for spack for code review an…
climbfuji dbf0800
Update compiler and MPI config in .github/workflows/ubuntu-ci-x86_64-…
climbfuji ab61ad3
Temporarily rename .github/workflows/ubuntu-ci-x86_64-intel.yaml to .…
climbfuji f5aa519
Update submodule pointer for spack
climbfuji 641950f
Split build process into creating buildcache and installing from cache
climbfuji 38eca26
Use tag v1.3.0 for CMakeModules submodule (same as currently used hash)
climbfuji 0598fcb
Fix stupid bug in .github/workflows/ubuntu-ci-x86_64-gnu.yaml
climbfuji e954782
Fix another bug in .github/workflows/ubuntu-ci-x86_64-gnu.yaml
climbfuji 72f9f58
More build-cache related updated for .github/workflows/ubuntu-ci-x86_…
climbfuji 79903a8
Fix yet another bug in .github/workflows/ubuntu-ci-x86_64-gnu.yaml an…
climbfuji e577a84
Initialize environment modules in last step in .github/workflows/ubun…
climbfuji 657888d
Rebuild binary cache for ubuntu-ci-x86_64-gnu every seven days
climbfuji 0307c78
Enable ubuntu-ci-x86_64-intel.yaml and update from ubuntu-ci-x86_64-g…
climbfuji c3395d8
Revert .gitmodules and update submodule pointer for spack
climbfuji 0fff795
Switch ubuntu-ci-containers-x86_64 to run on c6a instance
climbfuji 99282c5
For testing, run container builds for PRs (need to remove before merg…
climbfuji c3a44ea
Re-enable macos-ci-aarch64 CI runs
climbfuji 1e3bec0
Update submodule pointer for spack
climbfuji 7ce0aed
Update submodule pointer for spack
climbfuji 90f65d0
Update submodule pointer for spack
climbfuji eae2841
Run ubuntu-ci-containers-x86_64 workflow only on schedule and via wor…
climbfuji 98da400
No need to find qt
climbfuji 564ff56
Merge branch 'develop' of https://github.com/jcsda/spack-stack into f…
climbfuji File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,190 @@ | ||
name: ubuntu-ci-c6a-x86_64-gnu-build | ||
on: | ||
pull_request: | ||
paths-ignore: | ||
- 'doc/**' | ||
- '**.md' | ||
- '.github/ISSUE_TEMPLATE/*' | ||
- '.gitignore' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
ubuntu-ci-c6a-x86_64-gnu-build: | ||
runs-on: [ubuntu-ci-c6a-x86_64] | ||
|
||
steps: | ||
- name: cleanup | ||
run: | | ||
pwd | ||
ls -lart | ||
rm -fr * | ||
|
||
- name: checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- name: create-buildcache | ||
run: | | ||
# Get day of week to decide whether to use build caches or not | ||
DOW=$(date +%u) | ||
# Monday is 1 ... Sunday is 7 | ||
if [[ $DOW == 7 ]]; then | ||
export USE_BINARY_CACHE=false | ||
echo "Ignore existing binary cache for creating buildcache environment" | ||
else | ||
export USE_BINARY_CACHE=true | ||
echo "Use existing binary cache for creating buildcache environment" | ||
fi | ||
|
||
# spack-stack setup | ||
source ./setup.sh | ||
export ENVNAME=ue-gcc-11.4.0-buildcache | ||
export ENVDIR=$PWD/envs/${ENVNAME} | ||
spack stack create env --site linux.default --template unified-dev --name ${ENVNAME} | ||
spack env activate ${ENVDIR} | ||
export SPACK_SYSTEM_CONFIG_PATH="${ENVDIR}/site" | ||
|
||
# Find external packages | ||
spack external find --scope system \ | ||
--exclude bison --exclude openssl \ | ||
--exclude curl --exclude python | ||
spack external find --scope system sed | ||
spack external find --scope system perl | ||
spack external find --scope system wget | ||
spack external find --scope system texlive | ||
spack external find --scope system mysql | ||
|
||
# For GNU | ||
spack compiler find --scope system | ||
|
||
export -n SPACK_SYSTEM_CONFIG_PATH | ||
|
||
# For buildcaches | ||
spack config add config:install_tree:padded_length:200 | ||
|
||
# Set compiler and MPI | ||
spack config add "packages:all:providers:mpi:[[email protected]]" | ||
spack config add "packages:all:compiler:[[email protected]]" | ||
sed -i "s/\['\%aocc', '\%apple-clang', '\%gcc', '\%intel'\]/\['\%gcc'\]/g" $ENVDIR/spack.yaml | ||
|
||
# Add additional variants for MET packages, different from config/common/packages.yaml | ||
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-buildcache | ||
${SPACK_STACK_DIR}/util/show_duplicate_packages.py -d log.concretize.gnu-11.4.0-buildcache -i fms -i crtm -i esmf -i mapl | ||
|
||
# Add and update source cache | ||
spack mirror add local-source file:///home/ubuntu/spack-stack/source-cache/ | ||
spack mirror create -a -d /home/ubuntu/spack-stack/source-cache/ | ||
|
||
# Add binary cache if requested | ||
if [ "$USE_BINARY_CACHE" = true ] ; then | ||
spack mirror add local-binary file:///home/ubuntu/spack-stack/build-cache/ | ||
spack buildcache update-index local-binary | ||
echo "Packages in spack binary cache:" | ||
spack buildcache list | ||
fi | ||
|
||
# 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 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.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-buildcache.unified-env | ||
spack buildcache create -a -u /home/ubuntu/spack-stack/build-cache/ | ||
|
||
# Remove binary cache for next round of concretization | ||
if [ "$USE_BINARY_CACHE" = true ] ; then | ||
spack mirror rm local-binary | ||
fi | ||
|
||
# Remove buildcache config settings | ||
spack config remove config:install_tree:padded_length | ||
|
||
# Next steps: synchronize source and build cache to a central/combined mirror? | ||
|
||
# Cleanup | ||
spack clean -a | ||
spack env deactivate | ||
|
||
- name: create-env | ||
run: | | ||
source ./setup.sh | ||
export BUILDCACHE_ENVNAME=ue-gcc-11.4.0-buildcache | ||
export BUILDCACHE_ENVDIR=$PWD/envs/${BUILDCACHE_ENVNAME} | ||
export ENVNAME=ue-gcc-11.4.0 | ||
export ENVDIR=$PWD/envs/${ENVNAME} | ||
rsync -av --exclude='install' --exclude='spack.lock' --exclude='.spack_db' ${BUILDCACHE_ENVDIR}/ ${ENVDIR}/ | ||
spack env activate ${ENVDIR} | ||
|
||
# Concretize | ||
spack concretize --force 2>&1 | tee log.concretize.gnu-11.4.0 | ||
${SPACK_STACK_DIR}/util/show_duplicate_packages.py -d log.concretize.gnu-11.4.0 -i fms -i crtm -i esmf -i mapl | ||
|
||
# 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 | ||
|
||
# base-env | ||
echo "base-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 | ||
spack module tcl refresh -y | ||
spack stack setup-meta-modules | ||
spack env deactivate | ||
|
||
# Test environment chaining | ||
echo "Test environment chaining" | ||
spack stack create env --name chaintest --template empty --site linux.default --upstream $(realpath envs/${ENVNAME}/install) | ||
# Retain config from upstream so we don't have to rebuild: | ||
cp -r $PWD/envs/${ENVNAME}/{site,common} $PWD/envs/chaintest/. | ||
spack env activate ${PWD}/envs/chaintest | ||
spack add [email protected]%gcc | ||
spack concretize | tee envs/chaintest/log.concretize | ||
unwanted_duplicates=$(( cat envs/chaintest/log.concretize | grep -E '^ - ' | grep -Fv '[email protected]' || true ) | wc -l) | ||
if [ ${unwanted_duplicates} -gt 0 ]; then echo "Environment chaining test failed"; exit 1; fi | ||
spack env deactivate | ||
|
||
- name: test-env | ||
run: | | ||
source /etc/profile.d/modules.sh | ||
module use /home/ubuntu/spack-stack/modulefiles | ||
|
||
export ENVNAME=ue-gcc-11.4.0 | ||
export ENVDIR=$PWD/envs/${ENVNAME} | ||
ls -l ${ENVDIR}/install/modulefiles/Core | ||
|
||
module use ${ENVDIR}/install/modulefiles/Core | ||
module load stack-gcc/11.4.0 | ||
module load stack-openmpi/5.0.1 | ||
module load stack-python/3.10.13 | ||
module available | ||
|
||
module load jedi-ufs-env | ||
module load ewok-env | ||
module load soca-env | ||
module list |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is almost a copy of the
.github/workflows/ubuntu-ci-x86_64-intel.yaml
workflow. There are subtle differences and I thought it might be better to keep them apart, even though this means some amount of code duplication. We could move some of the steps into a common/shared workflow file and draw from there in the future ...