-
Notifications
You must be signed in to change notification settings - Fork 24
71 lines (59 loc) · 2.04 KB
/
build-and-test.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: build
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build-and-test:
name: test on ${{ matrix.os }} with ${{ matrix.cxx }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-22.04
cxx: g++
coverage: "true"
- os: ubuntu-22.04
cxx: clang++
coverage: "false"
- os: macos-latest
cxx: clang++
coverage: "false"
# Do not auto-cancel other runners if one fails
fail-fast: false
env:
CXX: ${{ matrix.cxx }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: dependencies (libraries)
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: sudo apt-get install zlib1g-dev libisal-dev libdeflate-dev gcovr
- name: dependencies (libraries)
if: ${{ matrix.os == 'macos-latest' }}
run: brew install isa-l libdeflate
- name: dependencies (pip)
run: python3 -m pip install meson ninja jsonschema sphinx
- name: setup
run: meson setup builddir -Db_sanitize=address,undefined -Db_coverage=${{ matrix.coverage }}
- name: install
run: DESTDIR=${PWD}/install meson install -C builddir
- name: examples
run: make -C examples EXE=${PWD}/builddir/src/adapterremoval3
- name: regression tests
run: meson test -C builddir --suite regression --print-errorlogs
# Unit tests are run last to enable cleanup of coverage data from other
# actions before running coveralls
- name: unit tests
run: |
find . -name '*.gcda' -print -delete
meson test -C builddir --suite unit --print-errorlogs
- name: coveralls
if: ${{ matrix.coverage == 'true' }}
run: |
python3 -m pip install cpp-coveralls
coveralls --exclude tests --root . --build-root builddir --gcov-options '\-lpbc'