-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (56 loc) · 2.2 KB
/
pull_request.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
name: Sampling Engine - CI
on: [ pull_request ]
jobs:
build:
name: Build
runs-on: ubuntu-18.04
strategy:
fail-fast: true
matrix:
include:
- COMPILER_SUITE: gcc
C_COMPILER_VERSION: gcc
CXX_COMPILER_VERSION: g++
COMPILER_PACKAGE: g++
- COMPILER_SUITE: clang
C_COMPILER_VERSION: clang
CXX_COMPILER_VERSION: clang++
COMPILER_PACKAGE: clang
steps:
- name: Checkout Repository
uses: actions/checkout@v2
#- name: Move to PR Head
# run: git checkout HEAD^2
- name: Update APT Cache
run: sudo apt-get update -qq
- name: Install dependencies
run: sudo apt-get -y install cmake libboost-test-dev lcov gcovr ${{ matrix.COMPILER_PACKAGE }}
#- name: Install Coveralls (GCC only)
# run: pip install --user cpp-coveralls
# if: ${{ matrix.COMPILER_SUITE }} == "gcc"
- name: create build directory
run: mkdir build
- name: Configure Build
env:
C_COMPILER: ${{ matrix.C_COMPILER_VERSION }}
CXX_COMPILER: ${{ matrix.CXX_COMPILER_VERSION }}
run: cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=`which ${C_COMPILER}` -DCMAKE_CXX_COMPILER=`which ${CXX_COMPILER}` ../src
working-directory: ./build
# Disable as it's not finding Coveralls
#- name: Build with Coverage (GCC compilers only)
# run: make coverage && coveralls --exclude lib --exclude tests --gcov-options '\-lpr'
# shell: bash
# working-directory: ./build
# if: ${{ matrix.COMPILER_SUITE }} == "gcc"
- name: Build without Coverage (GCC compilers only)
run: make && make test
working-directory: ./build
if: ${{ matrix.COMPILER_SUITE }} == "gcc"
- name: Build without Coverage (non-GCC compilers)
run: make && make test
working-directory: ./build
if: ${{ matrix.COMPILER_SUITE }} != "gcc"
#- name: Post Coveralls Data
# run: coveralls --exclude lib --exclude tests --gcov-options '\-lpr'
# working-directory: ./build
# if: ${{ matrix.COMPILER_SUITE }} == "gcc"