-
Notifications
You must be signed in to change notification settings - Fork 8
103 lines (93 loc) · 3.69 KB
/
Copy pathci.yml
File metadata and controls
103 lines (93 loc) · 3.69 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
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: DisCoTec-github-CI
on:
push:
branches: [ main ]
pull_request:
workflow_dispatch:
# ── global options (analogous to Jenkins logRotation & timeout)
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
deps-matrix:
name: build-deps (${{ matrix.compiler }}, ${{ matrix.mpi }})
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [gcc] # todo test clang/flang
mpi: [openmpi, mpich]
env:
SPACK_USER_CACHE_PATH: spack/user_cache
SPACK_USER_CONFIG_PATH: spack/user_config
SPACK_SYSTEM_CONFIG_PATH: spack/system_config
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
repository: spack/spack
ref: v1.0.2
path: spack
- name: Spack bootstrap & install
run: |
. ./spack/share/spack/setup-env.sh
spack bootstrap now
spack compiler find
spack install ${{ matrix.compiler }}
spack install autoconf %${{ matrix.compiler }}
spack install automake %${{ matrix.compiler }}
spack install libtool %${{ matrix.compiler }}
spack install -y discotec@main -lto %${{ matrix.compiler }} ^${{ matrix.mpi }}
build-test:
needs: deps-matrix
name: build-test (${{ matrix.compiler }}, ${{ matrix.mpi }}, ${{ matrix.build_type }})
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [gcc]
mpi: [openmpi, mpich]
build_type: [Release, Debug]
env:
SPACK_USER_CACHE_PATH: spack/user_cache
SPACK_USER_CONFIG_PATH: spack/user_config
SPACK_SYSTEM_CONFIG_PATH: spack/system_config
steps:
- name: Checkout DisCoTec
uses: actions/checkout@v4
with:
path: discotec
- name: Load Spack + dependencies
run: |
. spack/share/spack/setup-env.sh
spack load --first ${{ matrix.mpi }} %${{ matrix.compiler }}
spack load --first cmake %${{ matrix.compiler }} boost %${{ matrix.compiler }}
spack load --first glpk highfive ^${{ matrix.mpi }} lz4
echo "PATH=$PATH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV
- name: CMake Configure
working-directory: discotec
run: |
cmake -B build -S . \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DDISCOTEC_TEST=ON -DDISCOTEC_TIMING=ON \
-DDISCOTEC_ENABLEFT=OFF -DDISCOTEC_GENE=OFF \
-DDISCOTEC_USE_HIGHFIVE=ON -DDISCOTEC_OPENMP=ON \
-DDISCOTEC_USE_LTO=OFF -DDISCOTEC_WITH_COMPRESSION=ON
- name: Build
working-directory: discotec
run: cmake --build build -j
- name: Unit tests
working-directory: discotec/tests
timeout-minutes: 360
run: |
OMPI_ALLOW_RUN_AS_ROOT=1 \
mpiexec.${{ matrix.mpi }} -n 9 ./test_distributedcombigrid_boost --run_test=mpisystem
mpiexec.${{ matrix.mpi }} -n 9 ./test_distributedcombigrid_boost --run_test=fullgrid
mpiexec.${{ matrix.mpi }} -n 9 ./test_distributedcombigrid_boost --run_test=hierarchization --log_level=message
mpiexec.${{ matrix.mpi }} -n 9 ./test_distributedcombigrid_boost --run_test=io
mpiexec.${{ matrix.mpi }} -n 9 ./test_distributedcombigrid_boost --run_test=loadmodel
mpiexec.${{ matrix.mpi }} -n 9 ./test_distributedcombigrid_boost --run_test=reduce
mpiexec.${{ matrix.mpi }} -n 9 ./test_distributedcombigrid_boost --run_test=rescheduling
mpiexec.${{ matrix.mpi }} -n 9 ./test_distributedcombigrid_boost --run_test=task