mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 05:35:35 +00:00
CI: Factorize configuration by using a build matrix
This commit is contained in:
+56
-103
@@ -11,117 +11,70 @@ jobs:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: dependencies
|
||||
run: sudo apt-get update && sudo apt-get install libpcaudio-dev libsonic-dev ronn kramdown
|
||||
- name: autoconf
|
||||
run: ./autogen.sh ; chmod -x INSTALL m4/*.m4
|
||||
- name: configure
|
||||
run: ./configure
|
||||
- name: make
|
||||
run: make
|
||||
- name: make check
|
||||
run: make check
|
||||
name: Build with ${{ matrix.sanitizer }} sanitizer
|
||||
strategy:
|
||||
matrix:
|
||||
sanitizer: [no, address, leak, memory, thread, undefined, valgrind]
|
||||
|
||||
asan:
|
||||
include:
|
||||
- sanitizer: "no"
|
||||
deps: ""
|
||||
configflags: ""
|
||||
config: ""
|
||||
build_env: ""
|
||||
check_env: ""
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
- sanitizer: "address"
|
||||
deps: ""
|
||||
configflags: 'CFLAGS="-fsanitize=address -g -Og" CXXFLAGS="-fsanitize=address -g -Og"'
|
||||
config: ""
|
||||
build_env: "ASAN_OPTIONS=detect_leaks=0"
|
||||
check_env: "ASAN_OPTIONS=detect_leaks=0"
|
||||
|
||||
- sanitizer: "leak"
|
||||
deps: ""
|
||||
configflags: 'CFLAGS="-fsanitize=leak -g -Og" CXXFLAGS="-fsanitize=leak -g -Og"'
|
||||
config: ""
|
||||
build_env: "LSAN_OPTIONS=fast_unwind_on_malloc=0"
|
||||
check_env: "LSAN_OPTIONS=fast_unwind_on_malloc=0"
|
||||
|
||||
- sanitizer: "memory"
|
||||
deps: "clang"
|
||||
configflags: 'CC=clang CXX=clang++ CFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -g -Og" CXXFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -g -Og"'
|
||||
config: "--without-pcaudiolib"
|
||||
build_env: "MSAN_OPTIONS=exitcode=42"
|
||||
check_env: "MSAN_OPTIONS=exitcode=42"
|
||||
|
||||
- sanitizer: "thread"
|
||||
deps: ""
|
||||
configflags: 'CFLAGS="-fsanitize=thread -g -Og" CXXFLAGS="-fsanitize=thread -g -Og"'
|
||||
config: ""
|
||||
build_env: ""
|
||||
check_env: ""
|
||||
|
||||
- sanitizer: "undefined"
|
||||
deps: ""
|
||||
configflags: 'CFLAGS="-fsanitize=undefined -g -Og" CXXFLAGS="-fsanitize=undefined -g -Og"'
|
||||
config: ""
|
||||
build_env: "UBSAN_OPTIONS=halt_on_error=1"
|
||||
check_env: "UBSAN_OPTIONS=halt_on_error=1"
|
||||
|
||||
- sanitizer: "valgrind"
|
||||
deps: "libtool-bin valgrind"
|
||||
configflags: ''
|
||||
config: ""
|
||||
build_env: 'VALGRIND="libtool --mode=execute valgrind --track-origins=yes --leak-check=full --error-exitcode=1" '
|
||||
check_env: 'VALGRIND="libtool --mode=execute valgrind --track-origins=yes --leak-check=full --error-exitcode=1" '
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: dependencies
|
||||
run: sudo apt-get update && sudo apt-get install libpcaudio-dev libsonic-dev ronn kramdown
|
||||
run: sudo apt-get update && sudo apt-get install libpcaudio-dev libsonic-dev ronn kramdown ${{ matrix.deps }}
|
||||
- name: autoconf
|
||||
run: ./autogen.sh ; chmod -x INSTALL m4/*.m4
|
||||
- name: configure
|
||||
run: CXXFLAGS="-fsanitize=address -g -Og" CFLAGS="-fsanitize=address -g -Og" ./configure
|
||||
run: ${{ matrix.configflags }} ./configure ${{ matrix.config }}
|
||||
- name: make
|
||||
run: ASAN_OPTIONS="detect_leaks=0" make
|
||||
run: ${{ matrix.build_env }} make
|
||||
- name: make check
|
||||
run: ASAN_OPTIONS="detect_leaks=0" make check
|
||||
|
||||
lsan:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: dependencies
|
||||
run: sudo apt-get update && sudo apt-get install libpcaudio-dev libsonic-dev ronn kramdown
|
||||
- name: autoconf
|
||||
run: ./autogen.sh ; chmod -x INSTALL m4/*.m4
|
||||
- name: configure
|
||||
run: CXXFLAGS="-fsanitize=leak -g -Og" CFLAGS="-fsanitize=leak -g -Og" ./configure
|
||||
- name: make
|
||||
run: LSAN_OPTIONS=fast_unwind_on_malloc=0 make
|
||||
- name: make check
|
||||
run: LSAN_OPTIONS=fast_unwind_on_malloc=0 make check
|
||||
|
||||
msan:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: dependencies
|
||||
run: sudo apt-get update && sudo apt-get install libpcaudio-dev libsonic-dev ronn kramdown clang
|
||||
- name: autoconf
|
||||
run: ./autogen.sh ; chmod -x INSTALL m4/*.m4
|
||||
- name: configure
|
||||
run: CXX=clang++ CC=clang CXXFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -g -Og" CFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -g -Og" ./configure --without-pcaudiolib
|
||||
- name: make
|
||||
run: make
|
||||
- name: make check
|
||||
run: MSAN_OPTIONS=exitcode=42 make check
|
||||
|
||||
tsan:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: dependencies
|
||||
run: sudo apt-get update && sudo apt-get install libpcaudio-dev libsonic-dev ronn kramdown
|
||||
- name: autoconf
|
||||
run: ./autogen.sh ; chmod -x INSTALL m4/*.m4
|
||||
- name: configure
|
||||
run: CXXFLAGS="-fsanitize=thread -g -Og" CFLAGS="-fsanitize=thread -g -Og" ./configure
|
||||
- name: make
|
||||
run: make
|
||||
- name: make check
|
||||
run: make check
|
||||
|
||||
usan:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: dependencies
|
||||
run: sudo apt-get update && sudo apt-get install libpcaudio-dev libsonic-dev ronn kramdown
|
||||
- name: autoconf
|
||||
run: ./autogen.sh ; chmod -x INSTALL m4/*.m4
|
||||
- name: configure
|
||||
run: CXXFLAGS="-fsanitize=undefined -g -Og" CFLAGS="-fsanitize=undefined -g -Og" ./configure
|
||||
- name: make
|
||||
run: UBSAN_OPTIONS="halt_on_error=1" make
|
||||
- name: make check
|
||||
run: UBSAN_OPTIONS="halt_on_error=1" make check
|
||||
|
||||
valgrind:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: dependencies
|
||||
run: sudo apt-get update && sudo apt-get install libpcaudio-dev libsonic-dev ronn kramdown libtool-bin valgrind
|
||||
- name: autoconf
|
||||
run: ./autogen.sh ; chmod -x INSTALL m4/*.m4
|
||||
- name: configure
|
||||
run: ./configure
|
||||
- name: make
|
||||
run: VALGRIND="libtool --mode=execute valgrind --track-origins=yes --leak-check=full --error-exitcode=1" make
|
||||
- name: make check
|
||||
run: VALGRIND="libtool --mode=execute valgrind --track-origins=yes --leak-check=full --error-exitcode=1" make check
|
||||
run: ${{ matrix.check_env }} make check
|
||||
|
||||
Reference in New Issue
Block a user