forked from kokkos/kokkos
-
Notifications
You must be signed in to change notification settings - Fork 3
72 lines (71 loc) · 2.71 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
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: ghcr.io/kokkos/ci-containers/${{ matrix.distro }}
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: Get trial license
if: ${{ matrix.cxx == 'icpc' }}
run: |
mkdir ~/Licenses
curl https://dynamicinstaller.intel.com/api/v2/license > ~/Licenses/intel.lic
- name: maybe_disable_death_tests
if: ${{ matrix.distro == 'fedora:rawhide' }}
run: echo "GTEST_FILTER=-*DeathTest*" >> $GITHUB_ENV
- name: build-and-test
run: |
ccache -z
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DKokkos_ENABLE_HWLOC=ON \
-DKokkos_ENABLE_OPENMP=${{ matrix.openmp }} \
-DKokkos_ENABLE_TESTS=ON \
-DKokkos_ENABLE_EXAMPLES=ON \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-DBUILD_NAME=${{ matrix.distro }}-${{ matrix.cxx }} \
-DBUILD_JOBS=2 -DBINARY_DIR=builddir -DSITE=GitHub-Linux \
-P cmake/KokkosCI.cmake
ccache -s
- 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