Skip to content

Merge pull request #5384 from kokkos/5382-3.7-deprecate-sort-bool #178

Merge pull request #5384 from kokkos/5382-3.7-deprecate-sort-bool

Merge pull request #5384 from kokkos/5382-3.7-deprecate-sort-bool #178

name: github-Linux
on: [push, pull_request]
concurrency:
group: ${ {github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{github.event_name == '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']
backend: ['OPENMP']
clang-tidy: ['']
include:
- distro: 'fedora:intel'
cxx: 'icpc'
cmake_build_type: 'Release'
backend: 'OPENMP'
clang-tidy: ''
- distro: 'fedora:intel'
cxx: 'icpc'
cmake_build_type: 'Debug'
backend: 'OPENMP'
clang-tidy: ''
- distro: 'fedora:intel'
cxx: 'icpx'
cmake_build_type: 'Release'
backend: 'OPENMP'
clang-tidy: ''
- distro: 'fedora:intel'
cxx: 'icpx'
cmake_build_type: 'Debug'
backend: 'OPENMP'
clang-tidy: ''
- distro: 'ubuntu:latest'
cxx: 'clang++'
cmake_build_type: 'RelWithDebInfo'
backend: 'THREADS'
clang-tidy: '-DCMAKE_CXX_CLANG_TIDY="clang-tidy;-warnings-as-errors=*"'
- distro: 'ubuntu:latest'
cxx: 'g++'
cmake_build_type: 'RelWithDebInfo'
backend: 'THREADS'
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 desul
uses: actions/checkout@v2.2.0
with:
repository: desul/desul
ref: 477da9c8f40f8db369c28dd3f93a67e376d8511b
path: desul
- name: Install desul
working-directory: desul
run: |
git submodule init
git submodule update
mkdir build
cd build
cmake -DDESUL_ENABLE_TESTS=OFF -DCMAKE_INSTALL_PREFIX=/usr/desul-install ..
sudo cmake --build . --target install --parallel 2
- name: Checkout code
uses: actions/checkout@v2.2.0
- 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: maybe_use_external_gtest
if: ${{ matrix.distro == 'ubuntu:latest' }}
run: sudo apt-get update && sudo apt-get install -y libgtest-dev
- name: maybe_install_clang_tidy
if: ${{ matrix.clang-tidy != '' }}
run: sudo apt-get update && sudo apt-get install -y clang-tidy
- name: Configure Kokkos
run: |
cmake -B builddir \
-DCMAKE_INSTALL_PREFIX=/usr \
${{ matrix.clang-tidy }} \
-Ddesul_ROOT=/usr/desul-install/ \
-DKokkos_ARCH_NATIVE=ON \
-DKokkos_ENABLE_DESUL_ATOMICS_EXTERNAL=ON \
-DKokkos_ENABLE_HWLOC=ON \
-DKokkos_ENABLE_${{ matrix.backend }}=ON \
-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