-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (99 loc) · 3.02 KB
/
actions.yml
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
name: Domain Decomposition Toolkit CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-on-ubuntu:
runs-on: ubuntu-22.04
container:
image: ghcr.io/nextsimhub/nextsimdg-dev-env:latest
steps:
- uses: actions/checkout@v3
- name: Remove existing build
shell: bash
run: |
rm -rf /decomp
- name: Install dependencies
shell: bash
run: |
. /opt/spack-environment/activate.sh
git clone https://github.com/catchorg/Catch2.git
cd Catch2
cmake -DBUILD_TESTING=OFF -Bbuild -S.
cmake --build build --config Release --target install
cd ..
git clone https://github.com/trilinos/Trilinos.git
cd Trilinos
cmake \
-DTPL_ENABLE_MPI:BOOL=ON \
-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=OFF \
-DTrilinos_ENABLE_Zoltan:BOOL=ON \
-DTrilinos_ENABLE_Fortran:BOOL=OFF \
-DZoltan_ENABLE_EXAMPLES:BOOL=OFF \
-DZoltan_ENABLE_TESTS:BOOL=OFF \
-DBUILD_SHARED_LIBS=ON \
-Bbuild -S.
cmake --build build --config Release --target install
- name: Configure
shell: bash
run: |
. /opt/spack-environment/activate.sh
cmake -G "Unix Makefiles" -Bbuild -S.
- name: Build
shell: bash
run: |
. /opt/spack-environment/activate.sh
cmake --build build --config Release
- name: Run unit tests
shell: bash
run: |
. /opt/spack-environment/activate.sh
cd build
ctest -V
build-on-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
brew install cmake
brew install catch2
brew install boost
brew install hdf5-mpi
brew install pnetcdf
git clone https://github.com/trilinos/Trilinos.git
cd Trilinos
cmake \
-DTPL_ENABLE_MPI:BOOL=ON \
-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=OFF \
-DTrilinos_ENABLE_Zoltan:BOOL=ON \
-DTrilinos_ENABLE_Fortran:BOOL=OFF \
-DZoltan_ENABLE_EXAMPLES:BOOL=OFF \
-DZoltan_ENABLE_TESTS:BOOL=OFF \
-DBUILD_SHARED_LIBS=ON \
-Bbuild -S.
sudo cmake --build build --config Release --target install
cd ..
git clone -b v4.9.2 https://github.com/Unidata/netcdf-c.git
cd netcdf-c
cmake \
-DENABLE_PNETCDF=ON \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_CXX_COMPILER=mpicxx \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_TESTS=OFF \
-DENABLE_PARALLEL_TESTS=OFF \
-Bbuild -S.
sudo cmake --build build --config Release --target install
- name: Configure
run: |
cmake -Bbuild -S.
- name: Build
run: |
cmake --build build --config Release
- name: Run unit tests
run: |
cd build
ctest -V