Skip to content
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

Add weekly build/test scripts #1213

Merged
merged 169 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
169 commits
Select commit Hold shift + click to select a range
3567abf
draft weekly build/test scripts
AlexanderRichert-NOAA Jul 30, 2024
ee74e2c
Merge remote-tracking branch 'origin/develop' into weekly_build
AlexanderRichert-NOAA Jul 31, 2024
b475bbb
add testing for apps like UFSWM
AlexanderRichert-NOAA Jul 31, 2024
0ba2377
set executable perms
AlexanderRichert-NOAA Jul 31, 2024
fcb6fe2
add set -e to various scripts
AlexanderRichert-NOAA Jul 31, 2024
9d2aeee
git clone --recurse-submodules
AlexanderRichert-NOAA Jul 31, 2024
9886b5d
various fixes/updates
AlexanderRichert-NOAA Jul 31, 2024
f636b59
allow use of job schedulers for 'spack install'
AlexanderRichert-NOAA Jul 31, 2024
56a2615
add build caching script
AlexanderRichert-NOAA Jul 31, 2024
2b538f6
add cleanup script
AlexanderRichert-NOAA Jul 31, 2024
84e0b65
various updates after acorn testing
AlexanderRichert-NOAA Aug 1, 2024
c59abde
fix acorn qsub
AlexanderRichert-NOAA Aug 1, 2024
8ebba5c
allow setting compiler version with --compiler
AlexanderRichert-NOAA Aug 1, 2024
bea08ff
fix typo
AlexanderRichert-NOAA Aug 1, 2024
a766ba3
Add alerting
AlexanderRichert-NOAA Aug 1, 2024
fd8496b
update ALERT_CMD logic to use function
AlexanderRichert-NOAA Aug 1, 2024
da5557e
misc. updates/fixes for cron-based runs
AlexanderRichert-NOAA Aug 1, 2024
7a749dc
user fork for now to incorporate misc. changes
AlexanderRichert-NOAA Aug 1, 2024
2d9c5dc
use intel@2022 only for acorn
AlexanderRichert-NOAA Aug 1, 2024
60ed58f
allow compilers with version in matrix defs
AlexanderRichert-NOAA Aug 1, 2024
703d61d
misc update
AlexanderRichert-NOAA Aug 1, 2024
5b415f4
remove eccodes pinned version from acorn config
AlexanderRichert-NOAA Aug 1, 2024
d0c76cf
disable concretizing with test-only deps
AlexanderRichert-NOAA Aug 1, 2024
ba5a37f
clean up shell setup/install cmd logic
AlexanderRichert-NOAA Aug 1, 2024
8281b64
Merge branch 'weekly_build' of https://github.com/AlexanderRichert-NO…
AlexanderRichert-NOAA Aug 1, 2024
4273b9d
fix capitalization for alert_cmd
AlexanderRichert-NOAA Aug 1, 2024
6aa3b55
add generic alert_cmd
AlexanderRichert-NOAA Aug 1, 2024
f990197
auto-export variables from ShellSetup.sh when using SpackStackBuildCa…
AlexanderRichert-NOAA Aug 1, 2024
285c347
update install logic
AlexanderRichert-NOAA Aug 1, 2024
1cf9b58
fix 5_BuildCache.sh/setup.sh
AlexanderRichert-NOAA Aug 1, 2024
dc6ca24
Merge branch 'develop' into weekly_build
AlexanderRichert-NOAA Aug 7, 2024
c61ca6d
make COMPILERS and PACKAGES_TO_TEST overridable
AlexanderRichert-NOAA Aug 7, 2024
41bda42
alert_cmd: show which script failed when using SpackStackBuildCache_A…
AlexanderRichert-NOAA Aug 7, 2024
98f20d7
7_Cleanup.sh: use set -x
AlexanderRichert-NOAA Aug 7, 2024
c8b7393
1_DirectorySetup.sh: use ShellSetup.sh like everything else
AlexanderRichert-NOAA Aug 7, 2024
f372705
add install path padding
AlexanderRichert-NOAA Aug 7, 2024
eb3074a
Merge branch 'develop' into weekly_build
AlexanderRichert-NOAA Sep 10, 2024
3903169
Acorn updates for 1.8.0 (#1285)
AlexanderRichert-NOAA Sep 10, 2024
58d0c83
add acorn/mirrors.yaml
AlexanderRichert-NOAA Sep 10, 2024
fbea7f9
add log files and limited fetching to 4_SpackInstall.sh
AlexanderRichert-NOAA Sep 10, 2024
ecb6b83
SpackStackBuildCache_AllSteps.sh: print hostname
AlexanderRichert-NOAA Sep 10, 2024
2db3979
use centralized source cache on acorn
AlexanderRichert-NOAA Sep 16, 2024
e58fcc1
use release/1.8.0 for spack submodule (various fixes)
AlexanderRichert-NOAA Sep 16, 2024
8da2d5e
update submodule itself for release/1.8.0
AlexanderRichert-NOAA Sep 16, 2024
0f3de32
update fetch logic
AlexanderRichert-NOAA Sep 17, 2024
c46e345
continued updates for acorn config
AlexanderRichert-NOAA Sep 17, 2024
9f421bc
more acorn updates
AlexanderRichert-NOAA Sep 17, 2024
65bd971
set padded_length:200 instead of 256 (hdf5/cmake failure)
AlexanderRichert-NOAA Sep 17, 2024
14d86b9
always use --no-cache so cache is always rebuilt
AlexanderRichert-NOAA Sep 18, 2024
faf2691
more acorn config
AlexanderRichert-NOAA Sep 18, 2024
dcd4f1b
add option to keep weekly build directory
AlexanderRichert-NOAA Sep 19, 2024
2e578e4
ShellSetup.sh: fix typo in acorn compilers
AlexanderRichert-NOAA Sep 19, 2024
6535e77
chmod +x apptests/test_ufswm.sh
AlexanderRichert-NOAA Sep 19, 2024
44d4e7c
Update util/weekly_build/ShellSetup.sh for Nautilus and add first ste…
climbfuji Sep 19, 2024
544f5a7
Add step 2 for nightly builds on Nautilus: GetSpackStackDevelop
climbfuji Sep 19, 2024
e6e0b77
Revert me: remove other CI workflows on self-hosted runners
climbfuji Sep 19, 2024
3a97906
Add .github/actions/Nightly_03_SetupUnifiedEnv
climbfuji Sep 19, 2024
5ab1961
Add .github/actions/Nightly_04_SpackInstall
climbfuji Sep 19, 2024
3fa47c5
Update .github/* for nautilus nightly oneapi
climbfuji Sep 20, 2024
05899fc
Merge branch 'develop' of https://github.nrlmry.navy.mil/jcsda/spack-…
climbfuji Sep 20, 2024
0599b66
make spack-stack url & branch configurable
AlexanderRichert-NOAA Sep 20, 2024
df0a7c3
rename GetSpackStack script
AlexanderRichert-NOAA Sep 20, 2024
f4d848d
allow using build cache in scheduled builds
AlexanderRichert-NOAA Sep 20, 2024
e6c6cd0
rename scripts and break out site setups
AlexanderRichert-NOAA Sep 20, 2024
5202e44
use one cache dir for each site and rebuild cache index
AlexanderRichert-NOAA Sep 20, 2024
6c61957
Increase timeout of .github/workflows/nautilus-nightly-oneapi.yaml to…
climbfuji Sep 24, 2024
fdd9bf9
Merge branch 'develop' of https://github.nrlmry.navy.mil/jcsda/spack-…
climbfuji Sep 24, 2024
71e5a2c
Add .github/workflows/nautilus-nightly-intel.yaml and build only base…
climbfuji Sep 24, 2024
18c7133
Enable step 4 of nightly tests on Nautilus with Intel and oneAPI
climbfuji Sep 24, 2024
f5a575b
Remove piping to log files in util/weekly_build/03_SetupEnv.sh and ut…
climbfuji Sep 24, 2024
720e0ec
clone faster
AlexanderRichert-NOAA Sep 24, 2024
d4597d7
remove redundant redirect for install steps
AlexanderRichert-NOAA Sep 24, 2024
979607d
Comment out default definition of PACKAGES_TO_TEST
climbfuji Sep 25, 2024
4709452
Try spack fetch without --missing
climbfuji Sep 25, 2024
b4bcf8f
Add logic to extract path to local source mirror and comment out 'spa…
climbfuji Sep 26, 2024
00fa5ed
Merge branch 'develop' of https://github.com/jcsda/spack-stack into f…
climbfuji Sep 26, 2024
ff17223
Configure [email protected] for Narwhal
climbfuji Sep 27, 2024
d4d1767
testing shortened mirrors.yaml on acorn
AlexanderRichert-NOAA Sep 30, 2024
4107978
remove source_cache from acorn/config.yaml
AlexanderRichert-NOAA Sep 30, 2024
2092fc4
revert mirrors.yaml changes for all sites but acorn
AlexanderRichert-NOAA Sep 30, 2024
8eeafda
update source & build cache logic
AlexanderRichert-NOAA Sep 30, 2024
f3a606c
Merge branch 'release/1.8.0' of https://github.com/jcsda/spack-stack …
climbfuji Sep 30, 2024
e0576ca
Update doc/source/PreConfiguredSites.rst: add note that oneAPI Narwha…
climbfuji Sep 30, 2024
5762092
Merge branch 'release/1.8.0' of https://github.com/jcsda/spack-stack …
climbfuji Oct 1, 2024
b3d973d
Merge branch 'develop' of https://github.com/jcsda/spack-stack into f…
climbfuji Oct 3, 2024
76361b0
Add configs/sites/tier1/atlantis/mirrors.yaml
climbfuji Oct 3, 2024
87067e9
Update site/packages.yaml and site/modules.yaml (#1322)
RatkoVasic-NOAA Oct 4, 2024
7abb38b
Merge branch 'develop' of https://github.com/jcsda/spack-stack into f…
climbfuji Oct 4, 2024
91fe139
Add configs/sites/tier1/atlantis/packages_gcc.yaml
climbfuji Oct 4, 2024
5469c56
Remove site sandy
climbfuji Oct 4, 2024
ab722bb
More updates to atlantis site config for GNU
climbfuji Oct 4, 2024
46234a7
fix openmpi version on Hercules (#1326)
RatkoVasic-NOAA Oct 7, 2024
5101d55
For release/1.8.0: update S4 site config and documentation (#1328)
climbfuji Oct 7, 2024
cbf2bd3
Release 1.8.0 additional fixes for Jet, Hercules and Orion (after run…
RatkoVasic-NOAA Oct 8, 2024
9f9b147
Merge remote-tracking branch 'origin/develop' into weekly_build
AlexanderRichert-NOAA Oct 8, 2024
9d6416c
go back to spack-stack-dev branch
AlexanderRichert-NOAA Oct 8, 2024
e4bdd95
Merge branch 'release/1.8.0' of https://github.com/jcsda/spack-stack …
climbfuji Oct 9, 2024
daa8586
Merge branch 'develop' of https://github.com/jcsda/spack-stack into f…
climbfuji Oct 9, 2024
5068f19
use shorter padded length on acorn because of intel19 segfault w/esmf
AlexanderRichert-NOAA Oct 9, 2024
4ecbdae
Next round of updates for Atlantis: use Bright OpenMPI
climbfuji Oct 11, 2024
d6a41f5
Update configs/common/packages.yaml: do not require, but prefer, the …
climbfuji Oct 11, 2024
871a5c5
Merge branch 'develop' of https://github.com/jcsda/spack-stack into f…
climbfuji Oct 11, 2024
28ea3f7
Remove legacy environment variables for hdf5, p4est, libyaml from con…
climbfuji Oct 14, 2024
cd7c320
Split neptune-env into neptune-env (with default espc false) and nept…
climbfuji Oct 14, 2024
886cf90
Add note to docs for selecting branch when cloning (#1341)
ncrossette Oct 14, 2024
3d25bfb
Update configs/templates/{neptune-dev,skylab-dev,unified-dev}
climbfuji Oct 14, 2024
d1fd89f
Merge branch 'develop' of https://github.com/jcsda/spack-stack into f…
climbfuji Oct 15, 2024
e9a1462
Merge branch 'feature/split_neptune_env' of https://github.com/climbf…
climbfuji Oct 16, 2024
d6641e4
Add py-pyyaml to neptune-env, remove invalid Python variant from nept…
climbfuji Oct 16, 2024
c6a067f
Update site config and documentation for Narwhal to use new, official…
climbfuji Oct 16, 2024
18a0b14
Merge branch 'develop' of https://github.com/jcsda/spack-stack into f…
climbfuji Oct 16, 2024
716932c
Fix typo in configs/sites/tier1/narwhal/packages_oneapi.yaml
climbfuji Oct 18, 2024
41b59e3
Update submodule pointer for spack ([email protected]) and replace [email protected].…
climbfuji Oct 19, 2024
adfe7b3
Merge branch 'develop' of https://github.com/jcsda/spack-stack into f…
climbfuji Oct 19, 2024
4b2afed
Change spack source-cache locations on atlantis, narwhal, nautilus
climbfuji Oct 21, 2024
2f409e8
Merge branch 'weekly_build' of https://github.com/alexanderrichert-no…
climbfuji Oct 21, 2024
59facd2
Merge branch 'develop' of https://github.com/jcsda/spack-stack into f…
climbfuji Oct 21, 2024
fd86645
Merge branch 'feature/narwhal_oneapi' of https://github.com/climbfuji…
climbfuji Oct 21, 2024
84d8f78
Add TEMPLATES list and loop over templates; rename util/weekly_build/…
climbfuji Oct 21, 2024
0cdcb52
Update names of weekly build scripts in Github actions
climbfuji Oct 21, 2024
30aa758
Set envname and envdir, only perform packages_to_test install step if…
climbfuji Oct 21, 2024
d734250
Fix bug in env name definition in uti/weekly_build/{03,04}*
climbfuji Oct 21, 2024
a474cb7
Strip down CI testing to neptune-dev w/o Python for faster developmen…
climbfuji Oct 21, 2024
a803a54
Add steps 05_BuildCache and 07_Cleanup to Github actions, run only fo…
climbfuji Oct 21, 2024
4b12728
Bug fix for wrong source cache for Narwhal and Nautilus, addition of …
climbfuji Oct 21, 2024
ec2e690
Merge branch 'develop' of https://github.com/jcsda/spack-stack into f…
climbfuji Oct 21, 2024
7b17952
In util/weekly_build/{03_SetupEnv.sh,04_SpackInstall.sh} pipe spack c…
climbfuji Oct 21, 2024
9ca2407
Add logic to .github/actions/Nightly_04_SpackInstall/action.yaml to r…
climbfuji Oct 21, 2024
9a1ec68
Merge branch 'develop' of https://github.com/jcsda/spack-stack into f…
climbfuji Oct 22, 2024
4c906cf
Write RUNID and DOW to file in step Nightly_01_DirectorySetup, retrie…
climbfuji Oct 22, 2024
fe40faf
Bug fix in util/weekly_build/04_SpackInstall.sh, add missing NOT (!) …
climbfuji Oct 22, 2024
9502082
Merge branch 'develop' into weekly_build
climbfuji Oct 22, 2024
be581cd
Merge branch 'develop' of https://github.com/jcsda/spack-stack into HEAD
climbfuji Oct 22, 2024
c32cb03
Update util/weekly_build/sites/{acorn.sh,nautilus.sh} and delete curr…
climbfuji Oct 22, 2024
31d378d
Update mirrors for NRL machines in configs/sites/tier1
climbfuji Oct 22, 2024
43ab602
Update util/weekly_build scripts to handle multiple environments plus…
climbfuji Oct 22, 2024
f09b991
Add .github/actions/Nightly_* and .github/workflows/nautilus-nightly-…
climbfuji Oct 22, 2024
e4ded64
Clean up .github/actions/**
climbfuji Oct 22, 2024
3da12df
Remove sites that are not in use from util/weekly_build/sites/
climbfuji Oct 22, 2024
edab0f5
Add rogue cmd line argument for spack concretize for debugging in uti…
climbfuji Oct 22, 2024
8c89540
Try spack_wrapper
climbfuji Oct 22, 2024
c9d0fb2
Remove debugging code
climbfuji Oct 23, 2024
5105cf0
Clean up util/weekly_build/03_SetupEnv.sh, util/weekly_build/ShellSet…
climbfuji Oct 23, 2024
efb23cc
Introduce spack_wrapper calls
climbfuji Oct 23, 2024
d75cb5b
Update github actions and workflows
climbfuji Oct 23, 2024
97fb352
Update .github/actions/Nightly_04_SpackInstall/action.yaml
climbfuji Oct 23, 2024
beab899
Remove extraneous spack concretize command from util/weekly_build/03_…
climbfuji Nov 5, 2024
e63117e
Reinstantiate spack_install_exe as spack_install_wrapper
climbfuji Nov 5, 2024
fc37be4
Merge branch 'feature/weekly_build_nrl' of https://github.com/climbfu…
climbfuji Nov 5, 2024
06faf20
Merge pull request #4 from climbfuji/feature/weekly_build_nrl
AlexanderRichert-NOAA Nov 5, 2024
2b286e7
Merge branch 'develop' into weekly_build
AlexanderRichert-NOAA Nov 13, 2024
3dfba81
Update 02_GetSpackStack.sh
AlexanderRichert-NOAA Nov 13, 2024
08e9647
add AutomatedBuilds.rst to docs
AlexanderRichert-NOAA Nov 13, 2024
a684fb2
Merge remote-tracking branch 'origin/develop' into weekly_build
AlexanderRichert-NOAA Nov 15, 2024
9ca7252
add automation docs to index.rst
AlexanderRichert-NOAA Nov 15, 2024
ca88f15
restore ubuntu-ci-containers-x86_64.yaml
AlexanderRichert-NOAA Nov 15, 2024
cf3da08
Update configs/templates/neptune-dev/spack.yaml
AlexanderRichert-NOAA Nov 15, 2024
9c9117c
Merge branch 'weekly_build' of gh-noaa:AlexanderRichert-NOAA/spack-st…
AlexanderRichert-NOAA Nov 15, 2024
8ac1e30
Merge branch 'develop' into weekly_build
AlexanderRichert-NOAA Nov 19, 2024
fc08964
Merge branch 'develop' into weekly_build
climbfuji Nov 26, 2024
38e5972
remove nautilus nightly build yaml's
AlexanderRichert-NOAA Nov 26, 2024
82edf52
acorn/compilers.yaml: remove static gcc/etc. flags
AlexanderRichert-NOAA Nov 26, 2024
499ab75
drop 'file://' from mirrorpath
AlexanderRichert-NOAA Nov 26, 2024
ae7914a
WIP: run one UFS WM test
rickgrubin-noaa Nov 27, 2024
e262ba2
clean up testing scripts
rickgrubin-noaa Dec 4, 2024
bd5cf63
generalize testing, add orion site config
rickgrubin-noaa Dec 5, 2024
883c9bf
Merge pull request #5 from rickgrubin-noaa/pr/1213
AlexanderRichert-NOAA Dec 5, 2024
a6e8aad
Merge branch 'develop' into weekly_build
climbfuji Dec 5, 2024
a95eee0
fix up UWM test logic
AlexanderRichert-NOAA Dec 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/actions/Nightly_01_DirectorySetup/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Nightly 01 Directory Setup

runs:
using: "composite"
steps:
- name: Nightly 01 Directory Setup
shell: bash
run: |
# Write RUNID to file so that following steps use the
# same date and don't pick up the next day's date
RUNID=`date +"%Y%m%d"`
echo "${RUNID}" > RUNID_SAVE.log
# Get day of week for later use and write to file
DOW=$(date +%u)
echo "${DOW}" > DOW_SAVE.log
#
cd util/weekly_build
./01_DirectorySetup.sh ${RUNID} ${BASEDIR} ${PLATFORM}
11 changes: 11 additions & 0 deletions .github/actions/Nightly_02_GetSpackStack/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Nightly 02 Get Spack-Stack

runs:
using: "composite"
steps:
- name: Nightly 02 Get Spack-Stack
shell: bash
run: |
RUNID=$(<RUNID_SAVE.log)
cd util/weekly_build
./02_GetSpackStack.sh ${RUNID} ${BASEDIR} ${PLATFORM}
11 changes: 11 additions & 0 deletions .github/actions/Nightly_03_SetupEnv/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Nightly 03 Setup Env

runs:
using: "composite"
steps:
- name: Nightly 03 Setup Env
shell: bash
run: |
RUNID=$(<RUNID_SAVE.log)
cd util/weekly_build
./03_SetupEnv.sh ${RUNID} ${BASEDIR} ${PLATFORM}
20 changes: 20 additions & 0 deletions .github/actions/Nightly_04_SpackInstall/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Nightly 04 Spack Install

runs:
using: "composite"
steps:
- name: Nightly 04 Spack Install
shell: bash
run: |
RUNID=$(<RUNID_SAVE.log)
DOW=$(<DOW_SAVE.log)
# Build everything from scratch on Sundays, otherwise
# use build cache to speed up the installations.
# Monday is 1 ... Sunday is 7
if [[ $DOW == 7 ]]; then
export REUSE_BUILD_CACHE="NO"
else
export REUSE_BUILD_CACHE="YES"
fi
cd util/weekly_build
./04_SpackInstall.sh ${RUNID} ${BASEDIR} ${PLATFORM}
11 changes: 11 additions & 0 deletions .github/actions/Nightly_05_BuildCache/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Nightly 05 Build Cache

runs:
using: "composite"
steps:
- name: Nightly 05 Build Cache
shell: bash
run: |
RUNID=$(<RUNID_SAVE.log)
cd util/weekly_build
./05_BuildCache.sh ${RUNID} ${BASEDIR} ${PLATFORM}
11 changes: 11 additions & 0 deletions .github/actions/Nightly_07_Cleanup/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Nightly 07 Cleanup

runs:
using: "composite"
steps:
- name: Nightly 07 Cleanup
shell: bash
run: |
RUNID=$(<RUNID_SAVE.log)
cd util/weekly_build
./05_BuildCache.sh ${RUNID} ${BASEDIR} ${PLATFORM}
10 changes: 2 additions & 8 deletions configs/sites/tier1/acorn/compilers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ compilers:
cxx: CC
f77: ftn
fc: ftn
flags:
cflags: -static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -lm -lpthread
cxxflags: -static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -lm -lpthread
fflags: -static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -lm -lpthread
flags: {}
operating_system: sles15
modules:
- PrgEnv-intel/8.5.0
Expand All @@ -30,10 +27,7 @@ compilers:
cxx: CC
f77: ftn
fc: ftn
flags:
cflags: -static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -lm -lpthread
cxxflags: -static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -lm -lpthread
fflags: -static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -lm -lpthread
flags: {}
operating_system: sles15
modules:
- PrgEnv-intel/8.5.0
Expand Down
3 changes: 3 additions & 0 deletions configs/sites/tier1/acorn/mirrors.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mirrors:
local-source: file:///lfs/h1/emc/nceplibs/noscrub/spack-stack/cache
climbfuji marked this conversation as resolved.
Show resolved Hide resolved
local-binary: file:///lfs/h1/emc/nceplibs/noscrub/spack-stack/cache
19 changes: 2 additions & 17 deletions configs/sites/tier1/atlantis/mirrors.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
mirrors:
local-source:
fetch:
url: file:///neptune_diagnostics/spack-stack/source-cache/
access_pair:
- null
- null
access_token: null
profile: null
endpoint_url: null
push:
url: file:///neptune_diagnostics/spack-stack/source-cache/
access_pair:
- null
- null
access_token: null
profile: null
endpoint_url: null
local-source: file:///neptune_diagnostics/spack-stack/source-cache
local-binary: file:///neptune_diagnostics/spack-stack/build-cache
19 changes: 2 additions & 17 deletions configs/sites/tier1/narwhal/mirrors.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
mirrors:
local-source:
fetch:
url: file:///p/cwfs/projects/NEPTUNE/spack-stack/source-cache
access_pair:
- null
- null
access_token: null
profile: null
endpoint_url: null
push:
url: file:///p/cwfs/projects/NEPTUNE/spack-stack/source-cache
access_pair:
- null
- null
access_token: null
profile: null
endpoint_url: null
local-source: file:///p/cwfs/projects/NEPTUNE/spack-stack/source-cache
local-binary: file:///p/cwfs/projects/NEPTUNE/spack-stack/build-cache
19 changes: 2 additions & 17 deletions configs/sites/tier1/nautilus/mirrors.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
mirrors:
local-source:
fetch:
url: file:///p/cwfs/projects/NEPTUNE/spack-stack/source-cache
access_pair:
- null
- null
access_token: null
profile: null
endpoint_url: null
push:
url: file:///p/cwfs/projects/NEPTUNE/spack-stack/source-cache
access_pair:
- null
- null
access_token: null
profile: null
endpoint_url: null
local-source: file:///p/cwfs/projects/NEPTUNE/spack-stack/source-cache
local-binary: file:///p/cwfs/projects/NEPTUNE/spack-stack/build-cache
54 changes: 54 additions & 0 deletions doc/source/AutomatedBuilds.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
================
Automated builds
================

.. _AutomatedBuildWorkflow:

Workflow
*************************

The spack-stack repository now contains scripts for implementing scheduled, automated building, unit testing, and build caching of packages. These scripts live under utils/weekly_build/. They download their own copy of spack-stack (the develop branch, by default) and build one or more environments under that directory structure, which may be transient or reused.

Script failures are detected by non-zero exit codes.

The list of packages to be unit tested is stored in the ``$PACKAGES_TO_TEST`` variable in ShellSetup.sh. As unit testing needs are identified, this list should be updated to be as comprehensive as possible based on https://github.com/JCSDA/spack-stack/wiki/Automated-testing-and-building#unit-testing-requirements.

.. _AutomatedBuildAddPlatform:

Overview of implementing on a new platform
******************************************

Use a clean environment. Do NOT run setup.sh in the directory containing the build scripts (util/weekly_build/) to be run. Nothing in spack-stack outside of the build scripts is needed to get the automated build workflow running, as the workflow will take care of download a copy of spack-stack to be used for doing the automated builds themselves.

-------------------------------
Platform-specific configuration
-------------------------------

The ShellSetup.sh script points to a script in the sites/ subdirectory based on the site name as set by the third argument of each build script (stored and used as ``$PLATFORM`` throughout the scripts). Note that a number of variables and functions can be set or overridden here:
- ``$COMPILERS``: Space-delimited list of compilers to be built against on a given system.
- ``$TEMPLATES``: Space-delimited list of templates to install. Default is 'unified-env'.
- ``$PACKAGES_TO_TEST``: Space-delimited list of packages for which units tests should be run.
- ``$PACKAGES_TO_INSTALL``: Space-delimited list of packages to be installed. For many systems it can be left empty so as to install the entire Unified Environment.
- ``alert_cmd()``: This function should be set for each system. It is invoked when any step fails (non-zero exit code somewhere in the workflow), and so can be used to send emails, post to Slack or GitHub, etc.
- ``spack_wrapper()``: This function runs the Spack command, where the first argument is a log file name. It should not typically need to be redefined by platform.
- ``spack_install_wrapper()``: This function determines the means by which the ``spack`` command is invoked for the install steps, and can be overridden for each platform. If testing and installation will be performed outside of a batch scheduler, i.e., directly on a login node, then the default can probably be used. However, overriding this function allows, for instance, for job schedulers to be invoked (srun, qsub, etc.), as well as for parallel installations to be performed. Note that the first argument is a log file name, so custom versions of this function will most likely need to use ``shift`` to properly access the remaining arguments.
- ``$INSTALL_OPTS``: Additional ``spack install`` flags to be supplied to ``spack_install_wrapper()``.
- ``$TEST_<APPNAME>``: Set this variable to ON in order to enable the corresponding test under util/weekly_build/apptests/.
- ``$BUILD_CACHE``: Name of or path to (beginning with '\file://') build cache directory. Defaults to 'local-binary' mirror defined in site's mirrors.yaml.
- ``$SOURCE_CACHE``: Name of or path to (beginning with '\file://') source cache directory. Defaults to 'local-source' mirror defined in site's mirrors.yaml.
- ``$PADDED_LENGTH``: Padded length setting for Spack build cache generation. It should be as long as possible without the build failing.
- ``$KEEP_WEEKLY_BUILD_DIR``: Set to 'YES' to use a persistent directory structure for automated builds.

------------------------------
Setting up weekly builds: cron
------------------------------

Prior to running, obtain a current copy of the build scripts by cloning the spack-stack repository to the platform of interest (/path/to/spack-stack-auto-build/).

If /path/to/spack-stack is the local spack-stack root directory containing spack-stack-x.y.z installations, run ``mkdir -p /path/to/spack-stack/weekly_build/logs``.

In crontab, add:

.. code-block:: console

0 1 * * SUN /path/to/spack-stack-auto-build/util/weekly_build/SpackStackBuildCache_AllSteps.sh $(date +\%y\%m\%d) /path/to/spack-stack/weekly_build acorn > /path/to/spack-stack/weekly_build/logs/cron.$(date +\%y\%m\%d).out 2>&1
1 change: 1 addition & 0 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Table of contents
Utilities
KnownIssues
MaintainersSection
AutomatedBuilds
Documentation
Acronyms
Glossary
9 changes: 9 additions & 0 deletions util/weekly_build/01_DirectorySetup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

if [ -z $SETUPDONE ]; then . ShellSetup.sh $* ; fi

set -ex

echo Base directory: ${RUNDIR:?}

mkdir -p $RUNDIR
13 changes: 13 additions & 0 deletions util/weekly_build/02_GetSpackStack.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

if [ -z $SETUPDONE ]; then . ShellSetup.sh $* ; fi

set -ex

cd $RUNDIR
if [ -d $RUNID ]; then
cd $RUNID
git pull
else
git clone --depth 1 --recurse-submodules --shallow-submodules ${SPACK_STACK_URL:-https://github.com/JCSDA/spack-stack} -b ${SPACK_STACK_BRANCH:-develop} $RUNID
fi
29 changes: 29 additions & 0 deletions util/weekly_build/03_SetupEnv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

if [ -z $SETUPDONE ]; then . ShellSetup.sh $* ; fi

set -ex

cd $RUNDIR/$RUNID

set +x
. setup.sh
set -x

for compiler in $COMPILERS; do
for template in $TEMPLATES; do
envname=build-$template-${compiler/@/-}
envdir=$RUNDIR/$RUNID/envs/$envname
echo "Setting up environment $envname in $envdir"
rm -rf $envdir
spack stack create env --name build-${template}-${compiler/@/-} --template $template --site $PLATFORM --compiler $compiler
cd $envdir
spack env activate .
spack config add "config:install_tree:padded_length:${PADDED_LENGTH:-200}"
# Check for duplicates and fail before doing the "real" concretization:
spack_wrapper log.concretize concretize --fresh
${SPACK_STACK_DIR:?}/util/show_duplicate_packages.py log.concretize -d -i crtm -i esmf
# The following is not working at the moment, for seemingly a couple reasons. Therefore packages with test-only deps cannot be tested.
# spack concretize --force --fresh --test all | tee log.concretize_test
done
done
44 changes: 44 additions & 0 deletions util/weekly_build/04_SpackInstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash

set -ex

if [ -z $SETUPDONE ]; then . ShellSetup.sh $* ; fi

cd $RUNDIR/${RUNID}

set +x
. setup.sh
set -x

if [ "$REUSE_BUILD_CACHE" == YES ]; then
cache_flag="--no-check-signature"
else
cache_flag="--no-cache"
fi

INSTALL_OPTS="--show-log-on-error --fail-fast $cache_flag $INSTALL_OPTS"

for compiler in $COMPILERS; do
for template in $TEMPLATES; do
envname=build-$template-${compiler/@/-}
envdir=$RUNDIR/$RUNID/envs/$envname
echo "Building environment $envname in $envdir"
cd $envdir
spack env activate .
if [ "${SOURCE_CACHE::7}" == "file://" ]; then
mirrorpath=${SOURCE_CACHE}
else
mirrorpath=$(spack mirror list | awk "{if (\$1==\"$SOURCE_CACHE\") print \$NF}")
fi
mirrorpath=${mirrorpath#file://}
spack_wrapper log.fetch mirror create --dependencies \
--directory ${mirrorpath?"Source mirror path could not be determined. Check site's mirrors.yaml."} \
${PACKAGES_TO_INSTALL:---all}
# Just install the packages we're testing (+dependencies):
if [[ ! -z "${PACKAGES_TO_TEST}" ]]; then
spack_install_wrapper log.install-and-test install $INSTALL_OPTS --test root $PACKAGES_TO_TEST
fi
# Install the rest of the stack as usual:
spack_install_wrapper log.install install $INSTALL_OPTS $PACKAGES_TO_INSTALL
done
done
22 changes: 22 additions & 0 deletions util/weekly_build/05_BuildCache.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

set -ex

if [ -z $SETUPDONE ]; then . ShellSetup.sh $* ; fi

cd $RUNDIR/$RUNID

set +x
. setup.sh
set -x

for compiler in $COMPILERS; do
for template in $TEMPLATES; do
envname=build-$template-${compiler/@/-}
envdir=$RUNDIR/$RUNID/envs/$envname
cd $envdir
spack env activate .
spack buildcache push --unsigned --force ${BUILD_CACHE} $PACKAGES_TO_INSTALL
spack buildcache rebuild-index ${BUILD_CACHE}
done
done
26 changes: 26 additions & 0 deletions util/weekly_build/06_AppTests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

set -ex

if [ -z $SETUPDONE ]; then . ShellSetup.sh $* ; fi

cd $RUNDIR/$RUNID

set +x
. setup.sh
set -x

for compiler in $COMPILERS; do
for template in $TEMPLATES; do
envname=build-$template-${compiler/@/-}
envdir=$RUNDIR/$RUNID/envs/$envname
cd $envdir
spack env activate .
spack module lmod refresh -y
spack stack setup-meta-modules
done
done

if [ "$TEST_UFSWM" == ON ]; then
. $(dirname $0)/apptests/test_ufswm.sh
fi
Loading
Loading