forked from kokkos/kokkos
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (74 loc) · 2.75 KB
/
continuous-integration-workflow.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
name: github-Linux
on: [push, pull_request]
jobs:
CI:
continue-on-error: true
strategy:
matrix:
distro: ['fedora:latest', 'fedora:rawhide', 'ubuntu:latest']
cxx: ['g++', 'clang++']
cmake_build_type: ['Release', 'Debug']
openmp: ['ON']
include:
- distro: 'fedora:intel'
cxx: 'icpc'
cmake_build_type: 'Release'
openmp: 'ON'
- distro: 'fedora:intel'
cxx: 'icpc'
cmake_build_type: 'Debug'
openmp: 'ON'
- distro: 'fedora:intel'
cxx: 'icpx'
cmake_build_type: 'Release'
openmp: 'ON'
- distro: 'fedora:intel'
cxx: 'icpx'
cmake_build_type: 'Debug'
openmp: 'ON'
runs-on: ubuntu-latest
container:
image: ghcr.io/kokkos/ci-containers/${{ matrix.distro }}
# see https://github.com/actions/virtual-environments/issues/3812
options: --security-opt seccomp=unconfined
steps:
- name: Checkout code
uses: actions/[email protected]
- uses: actions/cache@v2
with:
path: ~/.ccache
key: kokkos-${{ matrix.distro }}-${{ matrix.cxx }}-${{ matrix.cmake_build_type }}-${{ matrix.openmp }}-${github.ref}-${{ github.sha }}
restore-keys: kokkos-${{ matrix.distro }}-${{ matrix.cxx }}-${{ matrix.cmake_build_type }}-${{ matrix.openmp }}-${{github.ref}}
- name: maybe_disable_death_tests
if: ${{ matrix.distro == 'fedora:rawhide' }}
run: echo "GTEST_FILTER=-*DeathTest*" >> $GITHUB_ENV
- name: CMake
run: |
cmake -B builddir \
-DCMAKE_INSTALL_PREFIX=/usr \
-DKokkos_ENABLE_HWLOC=ON \
-DKokkos_ENABLE_OPENMP=${{ matrix.openmp }} \
-DKokkos_ENABLE_TESTS=ON \
-DKokkos_ENABLE_EXAMPLES=ON \
-DKokkos_ENABLE_DEPRECATED_CODE_3=ON \
-DKokkos_ENABLE_DEPRECATION_WARNINGS=OFF \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }}
- name: Build
run: |
ccache -z
cmake --build builddir --parallel 2
ccache -s
- name: Tests
working-directory: builddir
run: ctest --output-on-failure
- name: Test DESTDIR Install
run: DESTDIR=${PWD}/install cmake --build builddir --target install && rm -rf ${PWD}/install/usr && rmdir ${PWD}/install
- name: Install
run: sudo cmake --build builddir --target install
- name: Test install
working-directory: example/build_cmake_installed
run: |
cmake -B builddir -DCMAKE_CXX_COMPILER=${{ matrix.cxx }}
cmake --build builddir
cmake --build builddir --target test