-
Notifications
You must be signed in to change notification settings - Fork 10
219 lines (214 loc) · 7.59 KB
/
tests-macos.yaml
File metadata and controls
219 lines (214 loc) · 7.59 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
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# Copyright (C) The DDC development team, see COPYRIGHT.md file
#
# SPDX-License-Identifier: MIT
---
name: Tests on macOS
# yamllint disable-line rule:truthy
on:
pull_request:
paths:
- '.github/workflows/tests-macos.yaml'
- '**.cpp'
- '**.hpp'
- '**.hpp.in'
- 'CMakeLists.txt'
- '**/CMakeLists.txt'
- '**.cmake'
- '**.cmake.in'
- 'vendor/**'
push:
branches:
- main
paths:
- '.github/workflows/tests-macos.yaml'
- '**.cpp'
- '**.hpp'
- '**.hpp.in'
- 'CMakeLists.txt'
- '**/CMakeLists.txt'
- '**.cmake'
- '**.cmake.in'
- 'vendor/**'
concurrency:
group: ${{github.workflow}}-${{github.ref == github.ref_protected && github.run_id || github.event.pull_request.number || github.ref}}
cancel-in-progress: true
permissions:
contents: read
jobs:
test-macos:
if: github.ref_name != 'main'
strategy:
fail-fast: false
matrix:
backend:
- name: 'cpu'
c_compiler: 'clang'
cxx_compiler: 'clang++'
ddc_extra_cxx_flags: '-Wextra-semi -Wextra-semi-stmt -Wold-style-cast'
kokkos_extra_cmake_flags: ''
cxx_version: ['20', '23']
cmake_build_type: ['Debug', 'Release']
os: [macos-14, macos-15]
runs-on: ${{matrix.os}}
env:
DDC_ROOT: ${{github.workspace}}/opt/ddc
Ginkgo_ROOT: ${{github.workspace}}/opt/ginkgo
Kokkos_ROOT: ${{github.workspace}}/opt/kokkos
KokkosFFT_ROOT: ${{github.workspace}}/opt/kokkos-fft
KokkosKernels_ROOT: ${{github.workspace}}/opt/kokkos-kernels
PDI_ROOT: ${{github.workspace}}/opt/pdi
CMAKE_BUILD_PARALLEL_LEVEL: 4
PKG_CONFIG_PATH: /opt/homebrew/opt/lapack/lib/pkgconfig
LAPACKE_ROOT: /opt/homebrew/opt/lapack
CC: ${{matrix.backend.c_compiler}}
CXX: ${{matrix.backend.cxx_compiler}}
CMAKE_BUILD_TYPE: ${{matrix.cmake_build_type}}
steps:
- name: Checkout built branch
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: pdidev/pdi
ref: 1.10.1
path: pdi
- name: Install PDI+user code plugin and dependencies
run: |
cmake \
-D BUILD_BENCHMARKING=OFF \
-D BUILD_DECL_HDF5_PLUGIN=OFF \
-D BUILD_DECL_NETCDF_PLUGIN=OFF \
-D BUILD_DOCUMENTATION=OFF \
-D BUILD_FORTRAN=OFF \
-D BUILD_MPI_PLUGIN=OFF \
-D BUILD_PYCALL_PLUGIN=OFF \
-D BUILD_SERIALIZE_PLUGIN=OFF \
-D BUILD_SET_VALUE_PLUGIN=OFF \
-D BUILD_TESTING=OFF \
-D BUILD_TRACE_PLUGIN=OFF \
-D BUILD_USER_CODE_PLUGIN=ON \
-D CMAKE_CXX_FLAGS="-Wno-unqualified-std-cast-call" \
-D CMAKE_CXX_STANDARD=17 \
-B build \
-S ./pdi
cmake --build build
cmake --install build --prefix $PDI_ROOT
rm -rf build
- name: Install fftw
run: brew install fftw
- name: Install lapack
run: brew install lapack
- name: Install Google Test
run: brew install googletest
- name: Install Google benchmark
run: brew install google-benchmark
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: ginkgo-project/ginkgo
ref: v1.11.0
path: ginkgo
- name: Install Ginkgo
run: |
cmake \
-D GINKGO_BUILD_BENCHMARKS=OFF \
-D GINKGO_BUILD_EXAMPLES=OFF \
-D GINKGO_BUILD_MPI=OFF \
-D GINKGO_BUILD_REFERENCE=ON \
-D GINKGO_BUILD_TESTS=OFF \
-B build \
-S ./ginkgo
cmake --build build
cmake --install build --prefix $Ginkgo_ROOT
rm -rf build
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: kokkos/kokkos
ref: 5.0.2
path: kokkos
- name: Install Kokkos
run: |
cmake \
-D Kokkos_ENABLE_DEPRECATED_CODE_4=OFF \
-D Kokkos_ENABLE_DEPRECATION_WARNINGS=OFF \
-D Kokkos_ENABLE_SERIAL=ON \
${{matrix.backend.kokkos_extra_cmake_flags}} \
-B build \
-S ./kokkos
cmake --build build
cmake --install build --prefix $Kokkos_ROOT
rm -rf build
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: kokkos/kokkos-fft
ref: v1.0.0
path: kokkos-fft
- name: Install Kokkos-fft
run: |
cmake \
-D KokkosFFT_ENABLE_FFTW=ON \
-B build \
-S ./kokkos-fft
cmake --build build
cmake --install build --prefix $KokkosFFT_ROOT
rm -rf build
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: kokkos/kokkos-kernels
ref: 5.0.2
path: kokkos-kernels
- name: Install Kokkos Kernels
run: |
cmake \
-D KokkosKernels_ADD_DEFAULT_ETI=OFF \
-D KokkosKernels_ENABLE_ALL_COMPONENTS=OFF \
-D KokkosKernels_ENABLE_COMPONENT_BLAS=ON \
-D KokkosKernels_ENABLE_COMPONENT_BATCHED=ON \
-D KokkosKernels_ENABLE_COMPONENT_LAPACK=OFF \
-D KokkosKernels_ENABLE_TPL_BLAS=OFF \
-D KokkosKernels_ENABLE_TPL_CUSOLVER=OFF \
-D KokkosKernels_ENABLE_TPL_LAPACK=OFF \
-B build \
-S ./kokkos-kernels
cmake --build build
cmake --install build --prefix $KokkosKernels_ROOT
rm -rf build
- name: Build DDC
run: |
cmake \
-D CMAKE_CXX_FLAGS="-Werror -Wall -Wextra -Wpedantic -Wno-sign-compare -pedantic-errors ${{matrix.backend.ddc_extra_cxx_flags}}" \
-D CMAKE_CXX_STANDARD=${{matrix.cxx_version}} \
-D DDC_BUILD_BENCHMARKS=ON \
-D DDC_benchmark_DEPENDENCY_POLICY=INSTALLED \
-D DDC_GTest_DEPENDENCY_POLICY=INSTALLED \
-D DDC_Kokkos_DEPENDENCY_POLICY=INSTALLED \
-D DDC_KokkosFFT_DEPENDENCY_POLICY=INSTALLED \
-D BLA_PREFER_PKGCONFIG=ON \
-B build
cmake --build build
- name: Run unit tests
run: ctest --test-dir build --output-on-failure --timeout 25 --output-junit tests.xml
- name: Publish Test Report
uses: mikepenz/action-junit-report@bccf2e31636835cf0874589931c4116687171386 # v6.4.0
if: ( success() || failure() ) # always run even if the previous step fails
with:
annotate_only: true # forked repo cannot write to checks so just do annotations
report_paths: '${{github.workspace}}/build/tests.xml'
- name: Run examples
run: |
./build/examples/characteristics_advection
./build/examples/game_of_life
./build/examples/heat_equation_spectral
./build/examples/heat_equation
./build/examples/non_uniform_heat_equation
./build/examples/uniform_heat_equation
./build/benchmarks/ddc_benchmark_deepcopy --benchmark_dry_run
./build/benchmarks/ddc_benchmark_splines --benchmark_dry_run
- name: Install DDC
run: |
cmake --install build --prefix $DDC_ROOT
rm -rf build
- name: Run install tests
run: |
cmake \
-B build \
-S ./install_test
cmake --build build