-
Notifications
You must be signed in to change notification settings - Fork 8
89 lines (73 loc) · 2.66 KB
/
ccpp.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: C/C++ CI
on:
push:
branches:
- master
- MPI_Development
- cmake_development
- parUpscale
- sharedLHF
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
mpi:
- mpich
- openmpi
- msmpi # Only builds for Windows
os:
- ubuntu-latest
- macos-latest
#- windows-latest
exclude:
- os: ubuntu-latest
mpi: msmpi #MSMPI only exists on windows
- os: macos-latest
mpi: msmpi #MSMPI only exists on windows
- os: windows-latest
mpi: openmpi #OpenMPI discontinued on windows
- os: windows-latest
mpi: mpich #MPICH redirects to MSMPI
##TODO: Test with windows-latest and msmpi
steps:
# Get dependencies
- name: Linux Apt update (${{ matrix.os }} , ${{ matrix.mpi }})
if: contains(matrix.os,'ubuntu')
run: sudo apt-get update
- name: Get Linux OpenMPI dependencies (${{ matrix.os }} , ${{ matrix.mpi }})
if: contains(matrix.os,'ubuntu') && contains(matrix.mpi,'openmpi')
run: sudo apt-get install -y openmpi-bin openmpi-common libopenmpi-dev cppcheck libeigen3-dev libcgal-dev
- name: Get Linux MPICH dependencies (${{ matrix.os }} , ${{ matrix.mpi }})
if: contains(matrix.os,'ubuntu') && contains(matrix.mpi,'mpich')
run: sudo apt-get install -y mpich cppcheck libeigen3-dev libcgal-dev
- name: Get MacOS OpenMPI dependencies (${{ matrix.os }} , ${{ matrix.mpi }})
if: contains(matrix.os,'macos') && contains(matrix.mpi,'openmpi')
run: brew install gcc openmpi libomp eigen cgal
- name: Get MacOS MPICH dependencies (${{ matrix.os }} , ${{ matrix.mpi }})
if: contains(matrix.os,'macos') && contains(matrix.mpi,'mpich')
run: brew install gcc mpich libomp eigen cgal
- name: Windows install CGAL
if: contains(matrix.os,'windows-latest')
run: vcpkg update && vcpkg install cgal eigen3 msmpi
# Checkout v2 : https://github.com/actions/checkout
- uses: actions/checkout@v2
# Check CMake Version
- name: Check CMake (${{ matrix.mpi }})
run: cmake --version
- name: Set MacOS Compilers
if: contains(matrix.os,'macos')
env:
CC: /usr/bin/gcc
CXX: /usr/bin/g++
run: echo "Using CC=${CC} and CXX=${CXX}"
# Make the project
- name: cmake
run: cmake . && make
# Run cmake tests
- name: ctest
run: make test
- name: cppcheck
if: runner.os == 'Linux'
run: cppcheck --enable=all --force .