-
Notifications
You must be signed in to change notification settings - Fork 70
147 lines (134 loc) · 5.1 KB
/
ci.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: CI
on:
workflow_dispatch:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
name: Build with ${{ matrix.sanitizer }} sanitizer
strategy:
fail-fast: false
matrix:
sanitizer: [no, address, leak, thread, undefined, valgrind]
include:
- sanitizer: "no"
deps: ""
configflags: ""
config: ""
build_env: ""
check_env: ""
- sanitizer: "address"
deps: ""
configenv: 'ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes'
configflags: '-fsanitize=address -g -Og'
config: ""
build_env: ""
check_env: "ASAN_OPTIONS=detect_leaks=0"
- sanitizer: "leak"
deps: ""
configenv: 'ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes'
configflags: '-fsanitize=leak -g -Og'
config: ""
build_env: ""
check_env: "ASAN_OPTIONS=fast_unwind_on_malloc=0 LSAN_OPTIONS=malloc_context_size=24"
- sanitizer: "thread"
deps: ""
configflags: '-fsanitize=thread -g -Og'
config: ""
build_env: ""
check_env: ""
- sanitizer: "undefined"
deps: ""
configflags: '-fsanitize=undefined -g -Og'
config: ""
build_env: ""
check_env: "UBSAN_OPTIONS=halt_on_error=1"
- sanitizer: "valgrind"
deps: "libtool-bin valgrind"
configflags: '-g -Og'
config: ""
build_env: ""
check_env: ""
steps:
- uses: actions/checkout@v3
- name: dependencies
run: sudo apt-get update ; sudo apt-get install autopoint
python3 python3-xdg
flite1-dev flite
libespeak-dev libespeak-ng-dev
libttspico-dev
libao-dev libasound2-dev libaudio-dev libpulse-dev libxau-dev libsndfile1-dev
libdotconf-dev libglib2.0-dev libltdl-dev systemd
gettext help2man texinfo texlive texlive-plain-generic
pulseaudio ${{ matrix.deps }}
- name: autoconf
run: ./build.sh
- name: configure
run: ${{ matrix.configenv }}
CFLAGS="${{ matrix.configflags }}"
CXXFLAGS="${{ matrix.configflags }}"
./configure --prefix=/tmp/foobar ${{ matrix.config }}
- name: Store the config
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: config-${{ matrix.sanitizer }}.log
path: config.log
- name: make
run: ${{ matrix.build_env }} make
- name: make check
run: ${{ matrix.check_env }} make check
- name: make install
run: ${{ matrix.build_env }} sudo make install
- name: make testsuite
run: ${{ matrix.build_env }} make -C src/tests testsuite
- name: run testsuite
run: dbus-run-session sh -c '( pulseaudio & cd src/tests ; MALLOC_PERTURB_=1234 ${{ matrix.check_env }} ./testsuite )'
if: ${{ matrix.sanitizer != 'valgrind' }}
- name: run testsuite
run: dbus-run-session sh -c '( pulseaudio & cd src/tests ; libtool --mode=execute valgrind --track-origins=yes --leak-check=full --error-exitcode=1 ./clibrary ; libtool --mode=execute valgrind --track-origins=yes --leak-check=full --error-exitcode=1 ./clibrary2 ; libtool --mode=execute valgrind --track-origins=yes --leak-check=full --error-exitcode=1 ./long_message )'
if: ${{ matrix.sanitizer == 'valgrind' }}
- name: Store the log
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: testsuite-${{ matrix.sanitizer }}
path: |
src/tests/testsuite.log
src/tests/testsuite.dir/*/testsuite.log
/home/runner/.cache/speech-dispatcher/log/speech-dispatcher.log
- name: make distcheck
run: make distcheck
if: matrix.sanitizer == 'no'
build-noltdl:
runs-on: ubuntu-latest
name: Build with no ltdl
steps:
- uses: actions/checkout@v3
- name: dependencies
run: sudo apt-get update ; sudo apt-get install autopoint
python3 python3-xdg
flite1-dev flite
libespeak-dev libespeak-ng-dev
libttspico-dev
libao-dev libasound2-dev libaudio-dev libpulse-dev libxau-dev libsndfile1-dev
libdotconf-dev libglib2.0-dev libltdl-dev- libsystemd-dev systemd
gettext help2man texinfo texlive texlive-plain-generic
pulseaudio
- name: autoconf
run: ./build.sh
- name: configure
run: ./configure
- name: Store the config
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: config-${{ matrix.sanitizer }}.log
path: config.log
- name: make
run: ${{ matrix.build_env }} make
- name: make check
run: ${{ matrix.check_env }} make check