-
Notifications
You must be signed in to change notification settings - Fork 8
108 lines (108 loc) · 3.76 KB
/
CI.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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${ {github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{github.event_name == 'pull_request'}}
jobs:
CI:
defaults:
run:
shell: bash
strategy:
matrix:
distro: ['ubuntu:latest']
cxx: ['g++', 'clang++']
backend: ['SERIAL', 'OPENMP']
cmake_build_type: ['Debug', 'Release']
kokkos_ver: ['3.6.01']
output: ['HDF5']
include:
- distro: 'ubuntu:latest'
cxx: 'g++'
backend: 'SERIAL'
cmake_build_type: 'Debug'
kokkos_ver: '3.6.01'
output: 'SILO'
- distro: 'ubuntu:latest'
cxx: 'g++'
backend: 'SERIAL'
cmake_build_type: 'Debug'
kokkos_ver: '3.6.01'
output: 'NONE'
- distro: 'ubuntu:latest'
cxx: 'g++'
backend: 'SERIAL'
cmake_build_type: 'Debug'
kokkos_ver: '3.6.01'
output: 'BOTH'
runs-on: ubuntu-20.04
container: ghcr.io/ecp-copa/ci-containers/${{ matrix.distro }}
steps:
- name: Checkout kokkos
uses: actions/[email protected]
with:
repository: kokkos/kokkos
ref: ${{ matrix.kokkos_ver }}
path: kokkos
- name: Build kokkos
working-directory: kokkos
run: |
cmake -B build \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_INSTALL_PREFIX=$HOME/kokkos \
-DKokkos_ENABLE_${{ matrix.backend }}=ON \
-DKokkos_ENABLE_HWLOC=ON
cmake --build build --parallel 2
cmake --install build
- name: Checkout Cabana
uses: actions/[email protected]
with:
repository: ECP-CoPA/Cabana
# This version is post-release 0.5
ref: 4fdb7eeb3ea32557444766a917fb9252af8540d6
path: cabana
- name: Build Cabana
working-directory: cabana
run: |
if [[ ${{ matrix.output }} == 'HDF5' ]]; then
cabana_cmake_opts+=( -DCabana_REQUIRE_HDF5=ON -DCMAKE_DISABLE_FIND_PACKAGE_SILO=ON )
elif [[ ${{ matrix.output }} == 'SILO' ]]; then
cabana_cmake_opts+=( -DCabana_REQUIRE_SILO=ON -DCMAKE_DISABLE_FIND_PACKAGE_HDF5=ON )
elif [[ ${{ matrix.output }} == 'BOTH' ]]; then
cabana_cmake_opts+=( -DCabana_REQUIRE_SILO=ON -DCabana_REQUIRE_HDF5=ON )
else
cabana_cmake_opts+=( -DCMAKE_DISABLE_FIND_PACKAGE_SILO=ON -DCMAKE_DISABLE_FIND_PACKAGE_HDF5=ON )
fi
cmake -B build \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_INSTALL_PREFIX=$HOME/Cabana \
-DCMAKE_PREFIX_PATH="$HOME/kokkos" \
${cabana_cmake_opts[@]}
cmake --build build --parallel 2
cmake --install build
- name: Checkout CabanaPD
uses: actions/[email protected]
- name: Build CabanaPD
run: |
cmake -B build \
-D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-D CMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-D CMAKE_CXX_FLAGS="-Wall -Wextra -pedantic -Werror" \
-D CMAKE_INSTALL_PREFIX=$HOME/CabanaPD \
-D CMAKE_PREFIX_PATH="$HOME/Cabana" \
-D MPIEXEC_MAX_NUMPROCS=2 \
-D MPIEXEC_PREFLAGS="--oversubscribe" \
-D CabanaPD_ENABLE_TESTING=ON
cmake --build build --parallel 2
cmake --install build
- name: Test CabanaPD
run: |
CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --target test