-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 2.2 KB
/
CI-CXX.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: CI-CXX
on:
push:
pull_request:
branches: [ "master" ]
jobs:
GCC-build:
runs-on: ${{ matrix.image }}
strategy:
matrix:
image: [ 'ubuntu-24.04' ]
GCC: [ '12' ]
BUILD_TYPE: [ 'Release' ]
WITH_MPI: [ 'ON', 'OFF' ]
steps:
- uses: actions/checkout@v4
- uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.25.0"
- name: Install GCC
run: sudo apt update && sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt install g++-${{ matrix.GCC }} gfortran-${{ matrix.GCC }} gcc-${{ matrix.GCC }} libopenmpi-dev
- name: Configure CMake
run: cmake -G"Ninja" -Sexamples/CXX -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} -DCMAKE_C_COMPILER=gcc-${{ matrix.GCC }} -DCMAKE_CXX_COMPILER=g++-${{ matrix.GCC }} -DCMAKE_Fortran_COMPILER=gfortran-${{ matrix.GCC }} -DWITH_MPI=${{ matrix.WITH_MPI }} -DUSE_LOCAL=ON
- name: Build
run: ninja -C build
- name: Tests without MPI
if: matrix.WITH_MPI == 'OFF'
run: |
build/SLB4MPI_cxx_example
SLB4MPI_LOAD_BALANCER=static build/SLB4MPI_cxx_example
SLB4MPI_LOAD_BALANCER=local_static build/SLB4MPI_cxx_example
SLB4MPI_LOAD_BALANCER=dynamic build/SLB4MPI_cxx_example
SLB4MPI_LOAD_BALANCER=guided build/SLB4MPI_cxx_example
SLB4MPI_LOAD_BALANCER=work_stealing build/SLB4MPI_cxx_example
SLB4MPI_LOAD_BALANCER=dinamic build/SLB4MPI_cxx_example
- name: Tests with MPI
if: matrix.WITH_MPI == 'ON'
run: |
mpirun --version
mpirun -n 2 --oversubscribe build/SLB4MPI_cxx_example
SLB4MPI_LOAD_BALANCER=static mpirun -n 2 --oversubscribe build/SLB4MPI_cxx_example
SLB4MPI_LOAD_BALANCER=local_static mpirun -n 2 --oversubscribe build/SLB4MPI_cxx_example
SLB4MPI_LOAD_BALANCER=dynamic mpirun -n 2 --oversubscribe build/SLB4MPI_cxx_example
SLB4MPI_LOAD_BALANCER=guided mpirun -n 2 --oversubscribe build/SLB4MPI_cxx_example
SLB4MPI_LOAD_BALANCER=work_stealing mpirun -n 2 --oversubscribe build/SLB4MPI_cxx_example
SLB4MPI_LOAD_BALANCER=dinamic mpirun -n 2 --oversubscribe build/SLB4MPI_cxx_example