-
Notifications
You must be signed in to change notification settings - Fork 76
159 lines (146 loc) · 6.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
148
149
150
151
152
153
154
155
156
157
158
159
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
- uses: firebuild/apt-eatmydata-action@v1
- 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 libpipewire-0.3-dev libxau-dev libsndfile1-dev
libdotconf-dev libglib2.0-dev libltdl-dev systemd
gettext help2man texinfo texlive texlive-plain-generic
librubberband-dev
pulseaudio ${{ matrix.deps }}
- name: install piper
run: |
wget https://github.com/rhasspy/piper-phonemize/releases/download/2023.11.14-4/piper-phonemize_linux_x86_64.tar.gz
echo "22ae85dba1c07e328b33e8311ae6e67ad1ea2a57068d08238c452c69b0b1761eb39b064bf7e51f7413317a8200f6f92c23426a5a575abbb4dbdde86c81825601 piper-phonemize_linux_x86_64.tar.gz" | sha512sum --check
tar -C /opt -xvf piper-phonemize_linux_x86_64.tar.gz
wget https://github.com/rhasspy/piper/archive/refs/tags/2023.11.14-2.tar.gz
echo "2156c8d384aafc977a41eea181855b5e3fddab1eca353528d919d421958e4c10dbcf6526d03433e4246ac847a2fe4a7c43a57d2cb5666993ad0f28ed9fb68fe6 2023.11.14-2.tar.gz" | sha512sum --check
tar -C /opt -xvf 2023.11.14-2.tar.gz
- name: autoconf
run: ./build.sh
- name: configure
run: ${{ matrix.configenv }}
CFLAGS="${{ matrix.configflags }}"
CXXFLAGS="${{ matrix.configflags }} -I/opt/piper_phonemize/include"
LDFLAGS="-L/opt/piper_phonemize/lib"
./configure --prefix=/tmp/foobar --with-piper=/opt/piper-2023.11.14-2 ${{ matrix.config }}
- name: Store the config
if: ${{ always() }}
uses: actions/upload-artifact@v4
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@v4
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
- uses: firebuild/apt-eatmydata-action@v1
- 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 libpipewire-0.3-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@v4
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