Skip to content

Commit 2470fb4

Browse files
authored
Add new template cylc-dev (and test building in GitHub actions) (#1410)
This PR adds a new template cylc-dev to build a special environment for running cylc. Because of the way cylc works, this is best accomplished by creating an environment view and then a cylc wrapper that contains the minimum settings necessary to use cylc from the view's bin directory. See cylc/cylc-flow#6532 for more information. Note that the creation of the cylc wrapper is not part of this PR. Associated changes: - To compile cylc-dev on the Ubuntu self-hosted runner, exclude meson from the spack external find call. Spack found a deprecated version meson@0.61 and despite it being deprecated it tried to use it - with the result that the harfbuzz build failed (needed for cylc-dev). Letting spack build meson (it picks meson@1.5.1) solved the problem. - Remove the +excel variant from py-pandas, which was something the jedi-tools-env used, but that is no longer needed and that caused build errors (and added several more dependencies). - Fix a bug in the GitHub actions that would allow the tests to fail silently (replace set +e with set -e). - To avoid duplicate packages, require py-cython@3 and py-numpy@1.26 - With Intel Classic/LLVM, build qt with gcc (has no effect on pre-configured sites, where qt is configured as an external package)
1 parent 94d1afb commit 2470fb4

File tree

12 files changed

+84
-32
lines changed

12 files changed

+84
-32
lines changed

.github/workflows/macos-ci-aarch64.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
set +e
112112
spack mirror add local-binary file:///Users/ec2-user/spack-stack/build-cache/
113113
spack buildcache update-index local-binary || (echo "No valid binary cache found, proceed without" && spack mirror rm local-binary)
114-
set +e
114+
set -e
115115
echo "Packages in spack binary cache:"
116116
spack buildcache list
117117
fi

.github/workflows/ubuntu-ci-x86_64-gnu.yaml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,14 @@ jobs:
5151
# Set up spack-stack
5252
source ./setup.sh
5353
54-
declare -a TEMPLATES=("unified-dev" "skylab-dev")
54+
declare -a TEMPLATES=("unified-dev" "skylab-dev" "cylc-dev")
5555
for TEMPLATE in "${TEMPLATES[@]}"; do
5656
if [[ "${TEMPLATE}" == *"unified-dev"* ]]; then
5757
export ENVNAME=ue-gcc-11.4.0-buildcache
5858
elif [[ "${TEMPLATE}" == *"skylab-dev"* ]]; then
5959
export ENVNAME=se-gcc-11.4.0-buildcache
60+
elif [[ "${TEMPLATE}" == *"cylc-dev"* ]]; then
61+
export ENVNAME=ce-gcc-11.4.0-buildcache
6062
fi
6163
echo "Creating environment ${ENVNAME} from template ${TEMPLATE}"
6264
@@ -68,7 +70,8 @@ jobs:
6870
# Find external packages
6971
spack external find --scope system \
7072
--exclude bison --exclude openssl \
71-
--exclude curl --exclude python
73+
--exclude curl --exclude python \
74+
--exclude meson
7275
spack external find --scope system grep
7376
spack external find --scope system sed
7477
spack external find --scope system perl
@@ -104,7 +107,7 @@ jobs:
104107
set +e
105108
spack mirror add local-binary file:///home/ubuntu/spack-stack/build-cache/
106109
spack buildcache update-index local-binary || (echo "No valid binary cache found, proceed without" && spack mirror rm local-binary)
107-
set +e
110+
set -e
108111
echo "Packages in spack binary cache:"
109112
spack buildcache list
110113
fi
@@ -113,20 +116,22 @@ jobs:
113116
# This allows us to "spin up" builds that altogether take longer than
114117
# six hours, and/or fail later in the build process.
115118
116-
# base-env
117-
echo "base-env ..."
118-
spack install --fail-fast --source --no-check-signature base-env 2>&1 | tee log.install.gnu-11.4.0-buildcache.base-env
119-
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/ base-env
120-
121-
# jedi-base-env
122-
echo "jedi-base-env ..."
123-
spack install --fail-fast --source --no-check-signature jedi-base-env 2>&1 | tee log.install.gnu-11.4.0-buildcache.jedi-base-env
124-
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/ jedi-base-env
125-
126-
# jedi-ufs-env
127-
echo "jedi-ufs-env ..."
128-
spack install --fail-fast --source --no-check-signature jedi-ufs-env 2>&1 | tee log.install.gnu-11.4.0-buildcache.jedi-ufs-env
129-
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/ jedi-ufs-env
119+
if [[ "${TEMPLATE}" == *"unified-dev"* || "${TEMPLATE}" == *"skylab-dev"* ]]; then
120+
# base-env
121+
echo "base-env ..."
122+
spack install --fail-fast --source --no-check-signature base-env 2>&1 | tee log.install.gnu-11.4.0-buildcache.base-env
123+
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/ base-env
124+
125+
# jedi-base-env
126+
echo "jedi-base-env ..."
127+
spack install --fail-fast --source --no-check-signature jedi-base-env 2>&1 | tee log.install.gnu-11.4.0-buildcache.jedi-base-env
128+
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/ jedi-base-env
129+
130+
# jedi-ufs-env
131+
echo "jedi-ufs-env ..."
132+
spack install --fail-fast --source --no-check-signature jedi-ufs-env 2>&1 | tee log.install.gnu-11.4.0-buildcache.jedi-ufs-env
133+
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/ jedi-ufs-env
134+
fi
130135
131136
# the rest
132137
echo "${TEMPLATE} ..."

.github/workflows/ubuntu-ci-x86_64-intel.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ jobs:
5959
# Find external packages
6060
spack external find --scope system \
6161
--exclude bison --exclude openssl \
62-
--exclude curl --exclude python
62+
--exclude curl --exclude python \
63+
--exclude meson
6364
spack external find --scope system grep
6465
spack external find --scope system sed
6566
spack external find --scope system perl
@@ -144,7 +145,7 @@ jobs:
144145
set +e
145146
spack mirror add local-binary file:///home/ubuntu/spack-stack/build-cache/
146147
spack buildcache update-index local-binary || (echo "No valid binary cache found, proceed without" && spack mirror rm local-binary)
147-
set +e
148+
set -e
148149
echo "Packages in spack binary cache:"
149150
spack buildcache list
150151
fi

.github/workflows/ubuntu-ci-x86_64-oneapi-ifx.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
spack external find --scope system \
6161
--exclude bison --exclude openssl \
6262
--exclude curl --exclude python \
63-
--exclude gmake
63+
--exclude meson --exclude gmake
6464
spack external find --scope system grep
6565
spack external find --scope system sed
6666
spack external find --scope system perl
@@ -150,7 +150,7 @@ jobs:
150150
set +e
151151
spack mirror add local-binary file:///home/ubuntu/spack-stack/build-cache/
152152
spack buildcache update-index local-binary || (echo "No valid binary cache found, proceed without" && spack mirror rm local-binary)
153-
set +e
153+
set -e
154154
echo "Packages in spack binary cache:"
155155
spack buildcache list
156156
fi

.github/workflows/ubuntu-ci-x86_64-oneapi.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
spack external find --scope system \
6161
--exclude bison --exclude openssl \
6262
--exclude curl --exclude python \
63-
--exclude gmake
63+
--exclude meson --exclude gmake
6464
spack external find --scope system grep
6565
spack external find --scope system sed
6666
spack external find --scope system perl
@@ -150,7 +150,7 @@ jobs:
150150
set +e
151151
spack mirror add local-binary file:///home/ubuntu/spack-stack/build-cache/
152152
spack buildcache update-index local-binary || (echo "No valid binary cache found, proceed without" && spack mirror rm local-binary)
153-
set +e
153+
set -e
154154
echo "Packages in spack binary cache:"
155155
spack buildcache list
156156
fi

configs/common/packages.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,9 @@ packages:
215215
# Avoid full rust dependency: version 43+ requires py-maturin
216216
py-cryptography:
217217
require: '@:42 +rust_bootstrap'
218-
# Introduced in https://github.com/JCSDA/spack-stack/pull/894, pin py-cython
219-
# to avoid duplicate packages being built (cylc dependencies soft-want @3:)
218+
# Pin py-cython to avoid duplicate packages
220219
py-cython:
221-
require: '@0.29.36'
220+
require: '@3'
222221
# As long as we need the "delayed" variant for py-dask,
223222
# we are restricted to version 2021.03.0 (last one that has it)
224223
# and newer than 2021.01.0 because of these issues:
@@ -233,13 +232,15 @@ packages:
233232
require: '~mpi'
234233
# https://github.com/JCSDA/spack-stack/issues/1276
235234
py-matplotlib:
236-
require: '@3.7.4'
235+
require: '@3.7.4'
237236
# Variant ~mpi not working for latest py-netcdf4
238237
# https://github.com/spack/spack/issues/47652
239238
py-netcdf4:
240239
require: '@1.7.1 +mpi'
241-
py-pandas:
242-
require: '+excel'
240+
# To avoid duplicate packages
241+
py-numpy:
242+
require:
243+
- '@1.26'
243244
# To avoid duplicate packages
244245
py-ruamel-yaml:
245246
require: '@0.17.16'

configs/common/packages_intel.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ packages:
3030
boost:
3131
require:
3232
- '%gcc'
33+
qt:
34+
require:
35+
- '%gcc'
3336
ecflow:
3437
require:
3538
- '%gcc'

configs/common/packages_oneapi.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ packages:
2121
require: '%gcc'
2222
libbsd:
2323
require: '%gcc'
24+
qt:
25+
require:
26+
- '%gcc'

configs/sites/tier1/narwhal/compilers.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,16 @@ compilers::
4848
- compiler:
4949
spec: gcc@10.3.0
5050
paths:
51+
# Still need Cray wrappers for most environments
5152
cc: cc
5253
cxx: CC
5354
f77: ftn
5455
fc: ftn
56+
# For cylc-dev, can't use Cray wrappers
57+
#cc: /opt/cray/pe/gcc/10.3.0/snos/bin/gcc
58+
#cxx: /opt/cray/pe/gcc/10.3.0/snos/bin/g++
59+
#f77: /opt/cray/pe/gcc/10.3.0/snos/bin/gfortran
60+
#fc: /opt/cray/pe/gcc/10.3.0/snos/bin/gfortran
5561
flags: {}
5662
operating_system: sles15
5763
modules:

configs/templates/cylc-dev/spack.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Template for CYLC (flow, rose, GUI). Supported with GCC only.
2+
# Creates a view that allows users to define (manually for now)
3+
# simple wrappers for cylc that can be aliased as "cylc":
4+
#
5+
##!/bin/bash
6+
##CYLC_INSTALL_DIR=/path/to/env/view/bin
7+
##PATH=${CYLC_INSTALL_DIR}:$PATH
8+
##unset PYTHONPATH
9+
##cylc "$@"
10+
#
11+
spack:
12+
concretizer:
13+
unify: true
14+
15+
view:
16+
cylc:
17+
root: view
18+
select: [^python]
19+
link: run
20+
link_type: symlink
21+
include: []
22+
23+
definitions:
24+
- compilers: ['%gcc']
25+
- packages:
26+
- py-cylc-flow@8.3.6
27+
- py-cylc-rose@1.4.2
28+
- py-cylc-uiserver@1.5.1
29+
30+
specs:
31+
- matrix:
32+
- [$packages]
33+
- [$compilers]

spack-ext/repos/spack-stack/packages/jedi-tools-env/package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class JediToolsEnv(BundlePackage):
2525
# depends_on("aws-parallelcluster", type="run")
2626
depends_on("py-click", type="run")
2727
depends_on("py-openpyxl", type="run")
28-
depends_on("py-pandas +excel", type="run")
28+
depends_on("py-pandas", type="run")
2929
depends_on("py-pygithub", type="run")
3030
depends_on("py-scipy", type="run")
3131
depends_on("py-sphinx", type="run")

0 commit comments

Comments
 (0)