-
Notifications
You must be signed in to change notification settings - Fork 17
69 lines (60 loc) · 1.64 KB
/
build.yml
File metadata and controls
69 lines (60 loc) · 1.64 KB
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
name: build
on:
push:
branches:
- main
pull_request:
branches:
- "*"
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
config:
- name: "Standard + Coverage"
meson_args: "-Db_coverage=true"
run_coverage: true
- name: "Sanitizers (ASan + UBSan)"
meson_args: "-Denable_sanitizers=true -Dsanitize_address=true -Dsanitize_undefined=true"
run_coverage: false
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -qq \
libfftw3-dev \
ninja-build \
libsndfile1-dev \
meson \
gcovr
- name: Configure build
run: |
meson setup build \
--buildtype=debug \
-Denable_examples=true \
-Denable_tests=true \
${{ matrix.config.meson_args }}
- name: Build project
run: |
meson compile -C build -v
- name: Run tests
run: |
meson test -C build --print-errorlogs
- name: Generate coverage report
if: matrix.config.run_coverage
run: |
ninja -C build coverage-xml
- name: Upload coverage to Codecov
if: matrix.config.run_coverage
uses: codecov/codecov-action@v5
with:
files: build/meson-logs/coverage.xml
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}