forked from sandialabs/omega_h
-
Notifications
You must be signed in to change notification settings - Fork 9
73 lines (65 loc) · 2.07 KB
/
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
name: CMake test matrix
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-22.04
strategy:
matrix:
compiler: [g++, clang++]
kokkos: [on, off]
mempool: [on, off]
exclude:
- kokkos: off
mempool: on
steps:
- uses: actions/checkout@v4
with:
path: omega_h
- uses: actions/checkout@v4
if: ${{ matrix.kokkos == 'on' }}
with:
repository: kokkos/kokkos
path: kokkos
- name: Install CUDA
shell: bash
run: |
wget https://developer.download.nvidia.com/compute/cuda/12.3.1/local_installers/cuda_12.3.1_545.23.08_linux.run
sudo sh cuda_12.3.1_545.23.08_linux.run --silent --toolkit --no-opengl-libs
- name: Configure Kokkos
if: ${{ matrix.kokkos == 'on' }}
shell: bash
working-directory: ${{github.workspace}}/kokkos
run: cmake .
-Bbuild
-DCMAKE_CXX_COMPILER=${{ matrix.compiler }}
-DCMAKE_INSTALL_PREFIX=build/install
- name: Build Kokkos
if: ${{ matrix.kokkos == 'on' }}
shell: bash
run: cmake --build $GITHUB_WORKSPACE/kokkos/build --target install
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/omega_h
run: cmake .
-Bbuild
-DCMAKE_CXX_COMPILER=${{ matrix.compiler }}
-DCMAKE_VERBOSE_MAKEFILE=on
-DOmega_h_USE_MPI=off
-DOmega_h_USE_Kokkos=${{ matrix.kokkos }}
-DKokkos_PREFIX=$GITHUB_WORKSPACE/kokkos/build/install
-DBUILD_TESTING=ON
-DBUILD_SHARED_LIBS=OFF
-DENABLE_CTEST_MEMPOOL=${{ matrix.mempool }}
- name: Build
working-directory: ${{github.workspace}}/omega_h/build
shell: bash
run: cmake --build . -j2
- name: Test
working-directory: ${{github.workspace}}/omega_h/build
shell: bash
run: ctest