mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 13:38:47 +00:00
102 lines
3.4 KiB
YAML
102 lines
3.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
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, memory, thread, undefined, valgrind]
|
|
|
|
include:
|
|
- sanitizer: "no"
|
|
deps: ""
|
|
configflags: ""
|
|
config: ""
|
|
build_env: ""
|
|
check_env: ""
|
|
|
|
- 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 ${{ matrix.deps }}
|
|
- name: autoconf
|
|
run: ./autogen.sh ; chmod -x INSTALL m4/*.m4
|
|
- name: configure
|
|
run: ${{ matrix.configflags }} ./configure ${{ matrix.config }}
|
|
- name: Store the config
|
|
if: ${{ failure() }}
|
|
uses: actions/upload-artifact@v2
|
|
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
|
|
|
|
reprotest:
|
|
|
|
runs-on: ubuntu-latest
|
|
name: Build with reprotest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: dependencies
|
|
run: sudo apt-get update && sudo apt-get install libpcaudio-dev libsonic-dev ronn kramdown reprotest
|
|
- name: autoconf
|
|
run: ./autogen.sh ; chmod -x INSTALL m4/*.m4
|
|
- name: run
|
|
run: reprotest "./configure && make clean && make && make check && touch success" success
|