Skip to content

Commit

Permalink
Add support for building with kokkos in actions
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-mccall committed Nov 7, 2023
1 parent d932d7f commit d6e6ef4
Showing 1 changed file with 30 additions and 7 deletions.
37 changes: 30 additions & 7 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,52 @@ jobs:
strategy:
matrix:
compiler: [g++, clang++]
kokkos: [on, off]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
path: omega_h

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- uses: actions/checkout@v4
if: ${{ matrix.kokkos == 'on' }}
with:
repository: kokkos/kokkos
path: kokkos

- name: Configure Kokkos
if: ${{ matrix.kokkos == 'on' }}
shell: bash
working-directory: ${{runner.workspace}}/omega_h/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: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE
working-directory: ${{runner.workspace}}/omega_h/omega_h
run: cmake .
-Bbuild
-DCMAKE_CXX_COMPILER=${{ matrix.compiler }}
-DCMAKE_VERBOSE_MAKEFILE=on
-DOmega_h_USE_MPI=off
-DOmega_h_USE_CUDA=off
-DOmega_h_USE_Kokkos=${{ matrix.kokkos }}
-DKokkos_PREFIX=$GITHUB_WORKSPACE/kokkos/build/install
-DBUILD_TESTING=ON

- name: Build
working-directory: ${{runner.workspace}}/build
working-directory: ${{runner.workspace}}/omega_h/omega_h/build
shell: bash
run: cmake --build .

- name: Test
working-directory: ${{runner.workspace}}/build
working-directory: ${{runner.workspace}}/omega_h/omega_h/build
shell: bash
run: ctest

0 comments on commit d6e6ef4

Please sign in to comment.