Test exercises #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test exercises | |
run-name: Test exercises | |
on: [push] | |
jobs: | |
build_kokkos: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v4 | |
- name: Install Kokkos | |
run: | | |
git clone https://github.com/kokkos/kokkos.git | |
cd kokkos | |
git checkout develop | |
mkdir build_openmp | |
mkdir install_openmp | |
cmake -B build_openmp -DCMAKE_INSTALL_PREFIX=${PWD}/install_openmp -DKokkos_ENABLE_OPENMP=ON ./ | |
make install -C build_openmp | |
- name: Upload Kokkos artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
path: kokkos/install_openmp | |
build_exercises: | |
runs-on: ubuntu-latest | |
needs: build_kokkos | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v4 | |
- name: Download Kokkos artifact | |
uses: actions/download-artifact@v4 | |
with: | |
path: kokkos/install_openmp | |
- name: Compile 02_first_program | |
run: | | |
cd exercises/02_first_program/solution/ | |
cmake -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/kokkos/install_openmp/ ./ | |
make | |
export OMP_NUM_THREADS=4 | |
./first_program | |