-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (50 loc) · 1.67 KB
/
runTests.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
name: Unit Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
unitTests:
strategy:
matrix:
name: [ubuntu-gcc, ubuntu-clang, windows-VS]
include:
- name: ubuntu-gcc
os: ubuntu-latest
compiler_opt: "-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++"
build_system: '-G Ninja'
- name: ubuntu-clang
os: ubuntu-latest
compiler_opt: "-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
build_system: '-G Ninja'
- name: windows-VS
os: windows-latest
compiler_opt: ""
build_system: ''
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2.0.0
- name: show HEAD
run: git rev-parse HEAD
- name: Install openMp
if: matrix.name == 'ubuntu-clang'
run: sudo apt-get update; sudo apt-get install -y libomp5 libomp-dev
- name: Install Ninja
if: matrix.build_system == '-G Ninja'
uses: seanmiddleditch/gha-setup-ninja@master
- name: CMake configure
run: cmake -B./build -DCMAKE_INSTALL_PREFIX:STRING=./artifacts/ -DBUILD_GJK_EPA_SAMPLES=OFF -DBUILD_GJK_EPA_TESTS=ON -DCMAKE_CONFIGURATION_TYPES="Release" -DCMAKE_BUILD_TYPE:STRING=Release ${{ matrix.build_system }} ${{ matrix.compiler_opt }}
- name: Build
run: cmake --build ./build --config Release
- name: Install
run: cmake --install ./build --config Release
- name: Tests
run: ./artifacts/bin/Tests
- uses: actions/upload-artifact@v2
with:
path: artifacts
name: ${{ matrix.name }}