-
Notifications
You must be signed in to change notification settings - Fork 145
55 lines (49 loc) · 2.12 KB
/
spack.yml
File metadata and controls
55 lines (49 loc) · 2.12 KB
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
name: Spack
on:
push:
pull_request:
schedule:
- cron: '17 3 * * 0'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
spack-install:
name: Spack install + smoke test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Spack with buildcache
uses: spack/setup-spack@v3
with:
# Pin to the sbryngelson/add-mfc branch until upstream
# spack/spack-packages merges the mfc recipe.
packages_repository: sbryngelson/spack-packages
packages_ref: add-mfc
buildcache: true
- name: Cache Spack install store
uses: actions/cache@v4
with:
path: |
spack/opt
spack/var/spack/cache
key: spack-store-${{ runner.os }}-${{ hashFiles('spack-packages/repos/spack_repo/builtin/packages/mfc/package.py', 'spack-packages/repos/spack_repo/builtin/packages/cantera/package.py', 'spack-packages/repos/spack_repo/builtin/packages/py_pyrometheus/package.py') }}
restore-keys: spack-store-${{ runner.os }}-
- name: Install mfc (defaults to +mpi +pre_process +simulation +post_process)
run: spack install --reuse mfc
- name: Smoke test
run: |
source spack/share/spack/setup-env.sh
spack load mfc
prefix="$(spack location -i mfc)"
echo "MFC prefix: $prefix"
for t in pre_process simulation post_process; do
test -x "$prefix/bin/$t" || { echo "missing binary: $t"; exit 1; }
echo "found: $prefix/bin/$t"
done
test -x "$prefix/bin/mfc" || { echo "missing shim: mfc"; exit 1; }
echo "found shim: $prefix/bin/mfc"
cd "$prefix/share/mfc"
./mfc.sh run --prebuilt-prefix="$prefix" \
--mpi -N 1 -n 1 --dry-run \
examples/1D_sodshocktube/case.py