-
Notifications
You must be signed in to change notification settings - Fork 11
71 lines (59 loc) · 1.62 KB
/
tests.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
name: Tests
on:
pull_request:
push:
branches: [main, dev]
jobs:
test:
name: Build and test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
cppflavor: [14, 17]
compiler: [gcc, clang10]
defaults:
run:
shell: bash
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ secrets.ACTIONS }}
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install build dependencies
run: |
sudo apt-get install autoconf
sudo apt-get install libgsl-dev
sudo apt-get install libboost-program-options-dev libboost-test-dev
- name: Set GCC as compiler
if: matrix.compiler == 'gcc'
run: |
echo "CC=gcc" >> $GITHUB_ENV
echo "CXX=g++" >> $GITHUB_ENV
- name: Install clang-10
if: matrix.compiler == 'clang10'
run: |
sudo apt-get install clang-10 clang++-10
echo "CC=clang-10" >> $GITHUB_ENV
echo "CXX=clang++-10" >> $GITHUB_ENV
- name: Generate build scripts
run: |
autoreconf --install
- name: Configure C++14 build
if: matrix.cppflavor == 14
run: |
CC=$CC CXX=$CXX ./configure
- name: Configure C++17 build
if: matrix.cppflavor == 17
run: |
CC=$CC CXX=$CXX ./configure --enable-cpp17=true
- name: Build
run: |
make -j 2
- name: Run tests
run: |
make check