-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (63 loc) · 1.99 KB
/
build.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
name: build
on: [push, pull_request]
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python-version: 3.9
install: ''
flags: '--coverage'
tests: RMF
build: Debug
- os: ubuntu-latest
python-version: 3.9
install: ''
flags: '--coverage'
tests: RMF
build: Release
- os: ubuntu-latest
python-version: 3.9
install: 'libhdf5-dev liblog4cxx-dev'
flags: '--coverage'
tests: RMF
build: Debug
- os: macos-latest
python-version: 3.9
install: ''
flags: '--coverage'
tests: RMF
build: Release
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update -qq
sudo apt-get install -qq libboost-all-dev swig libc-dbg ${{ matrix.install }}
pip install coverage
- name: Install dependencies (Mac)
if: matrix.os == 'macos-latest'
run: |
brew install swig boost log4cxx ${{ matrix.install }}
pip install coverage
- name: Build and test
run: |
mkdir build
cd build
../tools/coverage/setup.py
PYTHONPATH=`pwd`/coverage cmake .. -DCMAKE_BUILD_TYPE="${{ matrix.build }}" -DCMAKE_CXX_FLAGS="${{ matrix.flags }}" -DCMAKE_EXE_LINKER_FLAGS="${{ matrix.flags }}" -DCMAKE_MODULE_LINKER_FLAGS="${{ matrix.flags }}" -DCMAKE_SHARED_LINKER_FLAGS="${{ matrix.flags }}"
make -j 2
ctest -j 2 --output-on-failure -L ${{ matrix.tests }}
- name: Combine coverage
run: |
cd build/coverage
coverage combine && mv .coverage ../..
- uses: codecov/codecov-action@v1