forked from sxs-collaboration/spectre
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (76 loc) · 2.63 KB
/
Spack.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Distributed under the MIT License.
# See LICENSE.txt for details.
# Regularly scheduled installation test with the Spack package manager
name: Spack
on:
schedule:
- cron: '0 0 * * 1' # every Monday morning
workflow_dispatch:
concurrency:
group: spack
cancel-in-progress: true
jobs:
spack_install:
name: Install
strategy:
matrix:
host: [ubuntu-latest, macos-latest]
compiler: [gcc, clang, apple-clang]
exclude:
- host: ubuntu-latest
compiler: apple-clang
version:
# A non-exhaustive set of versions to test, e.g., versions listed in
# published papers.
- 'develop'
- '2021.12.15'
fail-fast: false
runs-on: ${{ matrix.host }}
env:
# This is the configuration ("spec") that we'll install with Spack
# - Build a subset of executables, and Python bindings
# - Disable debug symbols to fit in the memory of the GitHub Actions VM
# - Select the 'multicore' backend for Charm++, since we're running on a
# single node.
# - Select HDF5 without MPI to avoid compiling MPI.
SPECTRE_SPEC: >- # Line breaks are spaces, no trailing newline
spectre@${{ matrix.version }}
executables=SolvePoisson1D
+python
~debug_symbols
%${{ matrix.compiler }}
^charmpp backend=multicore
^hdf5~mpi
SPACK_COLOR: always
steps:
- name: Install compiler
if: matrix.host == 'macos-latest' && matrix.compiler == 'clang'
run: |
brew install llvm
echo "$(brew --prefix llvm)/bin" >> $GITHUB_PATH
- name: Install Spack
run: |
git clone -c feature.manyFiles=true --depth=1 \
https://github.com/spack/spack.git
echo $PWD/spack/bin >> $GITHUB_PATH
- name: Configure Spack
run: |
spack debug report
spack compiler find
spack compiler info ${{ matrix.compiler }}
spack external find
- name: Configure mixed toolchain
if: matrix.host == 'ubuntu-latest' && matrix.compiler == 'clang'
# Clang doesn't bundle a fortran compiler, so we specify one
run: |
export FC=$(which gfortran)
export COMPILERS_CONFIG="$HOME/.spack/*/compilers.yaml"
sed -i "s|f77: null$|f77: $FC|" $COMPILERS_CONFIG
sed -i "s|fc: null$|fc: $FC|" $COMPILERS_CONFIG
cat $COMPILERS_CONFIG
- name: Print packages to install
run: |
spack spec -I ${SPECTRE_SPEC}
- name: Install SpECTRE
run: |
spack install --show-log-on-error ${SPECTRE_SPEC}