Skip to content

Commit

Permalink
Update CI to use global CMake for projects
Browse files Browse the repository at this point in the history
  • Loading branch information
pzehner committed Jan 14, 2025
1 parent d1692bc commit e947b34
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 50 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/exercises.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ jobs:
steps:
- name: Set up Git repository
uses: actions/checkout@v4
- name: Prepare all exercices and solutions with the OpenMP backend
- name: Prepare all exercices with the OpenMP backend
run: |
cmake \
-B build \
-DCMAKE_BUILD_TYPE=Release \
-DKokkos_ENABLE_OPENMP=ON \
exercises
- name: Build all exercises and solutions
- name: Build all exercises
run: |
cmake \
--build build \
Expand Down
67 changes: 19 additions & 48 deletions .github/workflows/projects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,59 +16,30 @@ on:

jobs:

build_kokkos:
build_test_projects:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v4
- name: Install Kokkos
- name: Prepare all projects with the OpenMP backend
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:
name: kokkos
path: kokkos/install_openmp

build_wave_projects:
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:
name: kokkos
path: kokkos/install_openmp
- name: wave sequential
cmake \
-B build \
-DCMAKE_BUILD_TYPE=Release \
-DKokkos_ENABLE_OPENMP=ON \
projects
- name: Build all projects
run: |
cd projects/wave/sequential/
cmake -DCMAKE_BUILD_TYPE=Release ./
make
./exe
cd ${GITHUB_WORKSPACE}
cmake \
--build build \
--parallel $(($(nproc) * 2 + 1))
- name: wave openMP
- name: Test all solutions and reference implementations
env:
OMP_PROC_BIND: spread
OMP_PLACES: threads
OMP_NUM_THREADS: 2
run: |
cd projects/wave/omp
cmake -DCMAKE_BUILD_TYPE=Release ./
make
export OMP_NUM_THREADS=2
export OMP_PROC_BIND=true
export OMP_SCHEDULER=dynamic
./exe --size 128 128 --time 5 --output-period 100 --print-period 100 --domain-length 10 10 --boundary 1
cd ${GITHUB_WORKSPACE}
- name: wave Kokkos
run: |
cd projects/wave/solution/
cmake -DCMAKE_BUILD_TYPE=Release -DKokkos_DIR=${GITHUB_WORKSPACE}/kokkos/install_openmp/lib/cmake/Kokkos/ ./
make
./exe --size 128 128 --time 5 --output-period 100 --print-period 100 --domain-length 10 10 --boundary 1
cd ${GITHUB_WORKSPACE}
ctest \
--test-dir build \
--output-on-failure

0 comments on commit e947b34

Please sign in to comment.