Skip to content

UnorderedMap(space instance): proposal for #6067 #61

UnorderedMap(space instance): proposal for #6067

UnorderedMap(space instance): proposal for #6067 #61

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++']
cxx_extra_flags: ['']
cmake_build_type: ['Release', 'Debug']
backend: ['OPENMP']
clang-tidy: ['']
include:
- distro: 'fedora:intel'
cxx: 'icpc'
cxx_extra_flags: '-diag-disable=177,10441'
cmake_build_type: 'Release'
backend: 'OPENMP'
- distro: 'fedora:intel'
cxx: 'icpc'
cxx_extra_flags: '-diag-disable=177,10441'
cmake_build_type: 'Debug'
backend: 'OPENMP'
- distro: 'fedora:intel'
cxx: 'icpx'
cxx_extra_flags: '-fp-model=precise -Wno-pass-failed'
cmake_build_type: 'Release'
backend: 'OPENMP'
- distro: 'fedora:intel'
cxx: 'icpx'
cxx_extra_flags: '-fp-model=precise -Wno-pass-failed'
cmake_build_type: 'Debug'
backend: 'OPENMP'
- 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 }}
steps:
- name: Checkout desul
uses: actions/checkout@v3
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@v3
- uses: actions/cache@v3
with:
path: ~/.cache/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_flang_new
if: ${{ matrix.cxx == 'clang++' && startsWith(matrix.distro,'fedora:') }}
run: echo "FC=flang-new" >> $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_ENABLE_DESUL_ATOMICS_EXTERNAL=ON \
-DKokkos_ENABLE_HWLOC=ON \
-DKokkos_ENABLE_${{ matrix.backend }}=ON \
-DKokkos_ENABLE_TESTS=ON \
-DKokkos_ENABLE_BENCHMARKS=ON \
-DKokkos_ENABLE_EXAMPLES=ON \
-DKokkos_ENABLE_DEPRECATED_CODE_4=ON \
-DKokkos_ENABLE_DEPRECATION_WARNINGS=OFF \
-DKokkos_ENABLE_COMPILER_WARNINGS=ON \
-DCMAKE_CXX_FLAGS="-Werror ${{ matrix.cxx_extra_flags }}" \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-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 linking against build dir
working-directory: example/build_cmake_installed
run: |
cmake -B builddir_buildtree -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} -DKokkos_ROOT=../../builddir
cmake --build builddir_buildtree
cmake --build builddir_buildtree --target test
- 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