-
Notifications
You must be signed in to change notification settings - Fork 23
169 lines (141 loc) · 5 KB
/
ci_cmake.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
name: CI for CMake
on:
push:
paths-ignore:
- '.github/workflows/*.yml'
- '!.github/workflows/ci_cmake.yml'
pull_request:
release:
types: [published]
env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
CTEST_NO_TESTS_ACTION: "error"
CMAKE_INSTALL_PREFIX: ~/local
CMAKE_PREFIX_PATH: ~/local
jobs:
linux:
runs-on: ubuntu-20.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- name: "Serial Minimal"
configure_flags: ""
ubuntu_packages: ""
- name: "Serial With Clawpack"
configure_flags: "-Dclawpack=ON"
ubuntu_packages: ""
- name: "Serial With Clawpack and HDF"
configure_flags: "-Dclawpack=ON -Dhdf5=ON"
ubuntu_packages: ""
- name: "Serial With GeoClaw"
configure_flags: "-Dgeoclaw=ON"
ubuntu_packages: ""
- name: "Serial With CudaClaw (CUDA 10.1)"
configure_flags: "-Dcudaclaw=ON"
ubuntu_packages: "nvidia-cuda-toolkit"
cuda: true
- name: "Serial With CudaClaw (CUDA 11.3)"
configure_flags: "-Dcudaclaw=ON"
configure_environment: "CUDACXX=/usr/local/cuda/bin/nvcc"
ubuntu_packages: ""
cuda: true
cuda_11_3: true
- name: "MPI Minimal"
configure_flags: "-Dmpi=ON"
ubuntu_packages: "libopenmpi-dev openmpi-bin"
- name: "MPI With Clawpack"
configure_flags: "-Dmpi=ON -Dclawpack=ON"
ubuntu_packages: "libopenmpi-dev openmpi-bin"
- name: "MPI With Clawpack and HDF"
configure_flags: "-Dmpi=ON -Dclawpack=ON -Dhdf5=ON"
ubuntu_packages: "libopenmpi-dev openmpi-bin"
- name: "MPI With GeoClaw"
configure_flags: "-Dmpi=ON -Dgeoclaw=ON"
ubuntu_packages: "libopenmpi-dev openmpi-bin"
- name: "MPI With CudaClaw (CUDA 10.1)"
configure_flags: "-Dmpi=ON -Dcudaclaw=ON"
ubuntu_packages: "libopenmpi-dev openmpi-bin nvidia-cuda-toolkit"
cuda: true
- name: "MPI With CudaClaw (CUDA 11.3)"
configure_flags: "-Dmpi=ON -Dcudaclaw=ON"
configure_environment: "CUDACXX=/usr/local/cuda/bin/nvcc"
ubuntu_packages: "libopenmpi-dev openmpi-bin"
cuda: true
cuda_11_3: true
- name: "MPI With ThunderEgg"
configure_flags: "-Dmpi=ON -Dthunderegg=ON"
ubuntu_packages: "libopenmpi-dev openmpi-bin libfftw3-dev"
name: CMake ${{ matrix.name }} Build on Linux
steps:
- uses: actions/checkout@v4
name: Checkout source code
- name: Install system dependencies
run: |
sudo apt-get update -yq
sudo apt-get install -yq --no-install-recommends \
ninja-build ${{ matrix.ubuntu_packages }}
- name: Install Cuda Toolkit 11.3
if: ${{ matrix.cuda_11_3 }}
run: |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb
sudo apt-get update
sudo apt-get -y install cuda-toolkit-11-3
- name: CMake configure
run: ${{ matrix.configure_environment }} cmake --preset ci ${{ matrix.configure_flags }}
- name: CMake build
run: cmake --build --preset ci
- name: CMake test
if: ${{ !matrix.cuda }}
run: ctest --preset default
- name: CMake install (for examples)
run: cmake --install build
- name: CMake configure examples
run: ${{ matrix.configure_environment }} cmake -B applications/build -S applications --preset ci
- name: CMake build examples
run: cmake --build applications/build
- name: Create package
if: github.event.action == 'published'
run: cpack --config build/CPackConfig.cmake
- name: Upload package
if: github.event.action == 'published'
uses: actions/upload-artifact@v4
with:
name: binary-archive
path: build/package
mac:
runs-on: macos-14
name: CMake build on MacOS
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
CC: gcc-14
CXX: g++-14
FC: gfortran-14
steps:
- uses: actions/checkout@v4
name: Checkout source code
- name: Install system dependencies
run: brew install open-mpi ninja fftw
- name: CMake configure
run: cmake --preset mac -Dclawpack=on -Dgeoclaw=on -Dthunderegg=on
- name: CMake build
run: cmake --build --preset default
- name: CMake test
run: ctest --preset default
- name: CMake install (for examples)
run: cmake --install build
- name: CMake configure examples
run: cmake -B applications/build -S applications
- name: CMake build examples
run: cmake --build applications/build
- name: Create package
if: github.event.action == 'published'
run: cpack --config build/CPackConfig.cmake
- name: Upload package
if: github.event.action == 'published'
uses: actions/upload-artifact@v4
with:
name: binary-archive
path: build/package