-
Notifications
You must be signed in to change notification settings - Fork 10
73 lines (62 loc) · 1.9 KB
/
stechec2-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
68
69
70
71
72
73
name: stechec2-build
on:
push:
branches:
- master
pull_request:
jobs:
build:
name: "${{ matrix.build.name }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
build:
- name: Build GCC
compiler: g++
configure_flags: --enable-gcov
coverage: true
- name: Build Clang
compiler: clang++
- name: Build Clang (ASAN)
compiler: clang++
configure_flags: --enable-asan
# TSAN build is broken right now:
# https://github.com/prologin/stechec2/issues/88
#
# - name: Build Clang (TSAN)
# compiler: clang++
# configure_flags: --enable-tsan
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install stechec2 dependencies
run: |
sudo apt-get update
sudo apt-get install \
build-essential clang python3-yaml ruby libzmq3-dev libzmqpp-dev \
libgtest-dev libgflags-dev gcovr lcov
- name: Configure
env:
CXX: "${{ matrix.build.compiler }}"
run: |
./waf.py configure --with-games=tictactoe,plusminus \
${{ matrix.build.configure_flags }} \
|| cat ./build/config.log
- name: Build & Check
env:
CXX: "${{ matrix.build.compiler }}"
run: ./waf.py build -j8 --check
- name: Coverage report
if: matrix.build.coverage
run: |
lcov -o build/lcov.info --directory build --capture
lcov -o build/lcov.info --remove build/lcov.info \
'*.unittest*' '/usr/*'
- name: Coverage upload to Codecov
uses: codecov/codecov-action@v1
if: matrix.build.coverage
with:
file: build/lcov.info
name: stechec2
fail_ci_if_error: true