Skip to content

Commit 6c087fd

Browse files
committed
Update CI to use global CMake for projects
1 parent 8f2d612 commit 6c087fd

File tree

2 files changed

+21
-53
lines changed

2 files changed

+21
-53
lines changed

.github/workflows/exercises.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ jobs:
1919
steps:
2020
- name: Set up Git repository
2121
uses: actions/checkout@v4
22-
- name: Prepare all exercices and solutions with the OpenMP backend
22+
- name: Prepare all exercices with the OpenMP backend
2323
run: |
2424
cmake \
2525
-B build \
2626
-DCMAKE_BUILD_TYPE=Release \
2727
-DKokkos_ENABLE_OPENMP=ON \
2828
exercises
29-
- name: Build all exercises and solutions
29+
- name: Build all exercises
3030
run: |
3131
cmake \
3232
--build build \

.github/workflows/projects.yml

Lines changed: 19 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
name: Test projects
77

8-
run-name: Test projects
9-
108
on:
119
pull_request:
1210
branches:
@@ -16,59 +14,29 @@ on:
1614

1715
jobs:
1816

19-
build_kokkos:
20-
runs-on: ubuntu-latest
21-
steps:
22-
- name: Set up Git repository
23-
uses: actions/checkout@v4
24-
- name: Install Kokkos
25-
run: |
26-
git clone https://github.com/kokkos/kokkos.git
27-
cd kokkos
28-
git checkout develop
29-
mkdir build_openmp
30-
mkdir install_openmp
31-
cmake -B build_openmp -DCMAKE_INSTALL_PREFIX=${PWD}/install_openmp -DKokkos_ENABLE_OPENMP=ON ./
32-
make install -C build_openmp
33-
- name: Upload Kokkos artifact
34-
uses: actions/upload-artifact@v4
35-
with:
36-
name: kokkos
37-
path: kokkos/install_openmp
38-
39-
build_wave_projects:
17+
build_test_projects:
4018
runs-on: ubuntu-latest
41-
needs: [build_kokkos]
4219
steps:
4320
- name: Set up Git repository
4421
uses: actions/checkout@v4
45-
- name: Download Kokkos artifact
46-
uses: actions/download-artifact@v4
47-
with:
48-
name: kokkos
49-
path: kokkos/install_openmp
50-
- name: wave sequential
22+
- name: Prepare all projects with the OpenMP backend
5123
run: |
52-
cd projects/wave/sequential/
53-
cmake -DCMAKE_BUILD_TYPE=Release ./
54-
make
55-
./exe
56-
cd ${GITHUB_WORKSPACE}
57-
- name: wave openMP
24+
cmake \
25+
-B build \
26+
-DCMAKE_BUILD_TYPE=Release \
27+
-DKokkos_ENABLE_OPENMP=ON \
28+
projects
29+
- name: Build all projects
5830
run: |
59-
cd projects/wave/omp
60-
cmake -DCMAKE_BUILD_TYPE=Release ./
61-
make
62-
export OMP_NUM_THREADS=2
63-
export OMP_PROC_BIND=true
64-
export OMP_SCHEDULER=dynamic
65-
./exe --size 128 128 --time 5 --output-period 100 --print-period 100 --domain-length 10 10 --boundary 1
66-
cd ${GITHUB_WORKSPACE}
67-
- name: wave Kokkos
31+
cmake \
32+
--build build \
33+
--parallel $(($(nproc) * 2 + 1))
34+
- name: Test all solutions and reference implementations
35+
env:
36+
OMP_PROC_BIND: spread
37+
OMP_PLACES: threads
38+
OMP_NUM_THREADS: 2
6839
run: |
69-
cd projects/wave/solution/
70-
cmake -DCMAKE_BUILD_TYPE=Release -DKokkos_DIR=${GITHUB_WORKSPACE}/kokkos/install_openmp/lib/cmake/Kokkos/ ./
71-
make
72-
./exe --size 128 128 --time 5 --output-period 100 --print-period 100 --domain-length 10 10 --boundary 1
73-
cd ${GITHUB_WORKSPACE}
74-
40+
ctest \
41+
--test-dir build \
42+
--output-on-failure

0 commit comments

Comments
 (0)