-
Notifications
You must be signed in to change notification settings - Fork 10
106 lines (96 loc) · 3.21 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
---
# vi: ts=2 sw=2 et:
name: Build test
on:
push:
branches:
- master
pull_request:
branches:
- master
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ toJSON(matrix.env) }}-${{ github.ref }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
env:
- {
TYPE: "default",
CFLAGS: "-Werror"
}
- {
TYPE: "asan+ubsan",
CFLAGS: "-Werror -fsanitize=address,undefined",
ASAN_OPTIONS: "exitcode=42:strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:abort_on_error=1",
UBSAN_OPTIONS: "exitcode=42:print_stacktrace=1:print_summary=1:halt_on_error=1"
}
- {
TYPE: "clang",
CC: "clang",
CFLAGS: "-Werror"
}
- {
TYPE: "clang+asan+ubsan",
CC: "clang",
CFLAGS: "-Werror -fsanitize=address,undefined",
ASAN_OPTIONS: "exitcode=42:strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:abort_on_error=1",
UBSAN_OPTIONS: "exitcode=42:print_stacktrace=1:print_summary=1:halt_on_error=1"
}
- {
TYPE: "valgrind",
}
env: ${{ matrix.env }}
name: ${{ matrix.env.TYPE }}
steps:
- name: Repository checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt -y update
sudo apt -y install docbook-xsl gcc libglib2.0-dev xsltproc meson clang valgrind
- name: Build
run: |
set -ex
meson -Ddfuzzer-test-server=true build
ninja -C ./build -v
sudo ninja -C ./build install
- name: Test
run: .github/workflows/run-tests.sh
coveralls:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Repository checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt -y update
sudo apt -y install docbook-xsl gcc libglib2.0-dev xsltproc meson lcov
- name: Build
run: |
set -ex
meson -Ddfuzzer-test-server=true -Db_coverage=true build
ninja -C ./build -v
sudo ninja -C ./build install
- name: Test
run: |
set -ex
.github/workflows/run-tests.sh
lcov --directory . --capture --initial --output-file coverage.info.initial
lcov --directory . --capture --output-file coverage.info.run --no-checksum --rc lcov_branch_coverage=1
lcov -a coverage.info.initial -a coverage.info.run --rc lcov_branch_coverage=1 -o coverage.info.raw
lcov --extract coverage.info.raw "$(pwd)/*" --rc lcov_branch_coverage=1 --output-file coverage.info
- name: Coveralls
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: ./coverage.info
format: lcov