123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268 |
- name: CI
-
- on:
- workflow_dispatch:
- push:
- branches: [ master ]
- pull_request:
- branches: [ master ]
-
- env:
- deps: libpcaudio-dev libsonic-dev ronn kramdown python3
-
- jobs:
- build:
-
- runs-on: ${{ matrix.os }}
-
- name: Build with ${{ matrix.sanitizer }} sanitizer on ${{ matrix.os }} ${{ matrix.arch }}
- strategy:
- fail-fast: false
- matrix:
- os: [ubuntu-latest, macos-latest]
- arch: [x86-64, x86-32, arm-32, armel-32, arm-64]
- sanitizer: [no, address, leak, memory, thread, undefined, valgrind]
-
- include:
- - sanitizer: "no"
- deps: ""
- configflags: "-g -Og -fno-omit-frame-pointer"
- config: ""
- build_env: ""
- check_env: ""
-
- - sanitizer: "address"
- deps: ""
- configflags: "-fsanitize=address -g -Og -fno-omit-frame-pointer"
- config: ""
- build_env: "ASAN_OPTIONS=detect_leaks=0"
- check_env: "ASAN_OPTIONS=detect_leaks=0"
-
- - sanitizer: "leak"
- deps: ""
- configflags: '-fsanitize=leak -g -Og -fno-omit-frame-pointer'
- config: ""
- build_env: "LSAN_OPTIONS=fast_unwind_on_malloc=0"
- check_env: "LSAN_OPTIONS=fast_unwind_on_malloc=0"
-
- - sanitizer: "memory"
- deps: "clang"
- configenv: "CC=clang CXX=clang++"
- configflags: "-fsanitize=memory -fsanitize-memory-track-origins=2 -g -Og -fno-omit-frame-pointer"
- config: "--without-pcaudiolib --without-sonic"
- build_env: "MSAN_OPTIONS=exitcode=42"
- check_env: "MSAN_OPTIONS=exitcode=42"
-
- - sanitizer: "thread"
- deps: ""
- configflags: "-fsanitize=thread -g -Og -fno-omit-frame-pointer"
- config: ""
- build_env: ""
- check_env: ""
-
- - sanitizer: "undefined"
- deps: ""
- configflags: "-fsanitize=undefined -g -Og -fno-omit-frame-pointer"
- config: ""
- build_env: "UBSAN_OPTIONS=halt_on_error=1"
- check_env: "UBSAN_OPTIONS=halt_on_error=1"
-
- - sanitizer: "valgrind"
- deps: "libtool-bin valgrind"
- configflags: '-g -Og -fno-omit-frame-pointer'
- 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" '
-
- - arch: x86-32
- archdeps: "gcc-multilib g++-multilib libpcaudio-dev:i386 libsonic-dev:i386 libc6-dbg:i386"
- archconfigflags: "-m32"
- archimage: ''
-
- - arch: x86-64
- archdeps: ""
- archconfigflags: ''
- archimage: ''
-
- - arch: arm-32
- archdeps: "build-essential automake autoconf libtool"
- archconfigflags: "-D_FILE_OFFSET_BITS=64"
- archimage: 'raspios_lite:latest'
-
- - arch: armel-32
- archdeps: "build-essential automake autoconf libtool"
- archconfigflags: "-D_FILE_OFFSET_BITS=64"
- archimage: 'raspi_1_bullseye:20220121'
-
- - arch: arm-64
- archdeps: "build-essential automake autoconf libtool"
- archconfigflags: ""
- archimage: 'raspios_lite_arm64:latest'
-
- exclude:
-
- # These are not supported on 32bit
- - arch: x86-32
- sanitizer: leak
- - arch: x86-32
- sanitizer: memory
- - arch: x86-32
- sanitizer: thread
-
- # 32-bit macOS is not supported
- - os: macos-latest
- arch: x86-32
-
- # arm macOS is not supported
- - os: macos-latest
- arch: arm-32
- - os: macos-latest
- arch: armel-32
- - os: macos-latest
- arch: arm-64
-
- # These are not supported on macos
- - os: macos-latest
- sanitizer: leak
- - os: macos-latest
- sanitizer: memory
- - os: macos-latest
- sanitizer: valgrind
-
- # These are not supported on arm
- - arch: arm-32
- sanitizer: memory
- - arch: armel-32
- sanitizer: memory
- - arch: arm-64
- sanitizer: memory
- - arch: arm-32
- sanitizer: thread
- - arch: armel-32
- sanitizer: thread
- - arch: arm-64
- sanitizer: thread
- - arch: armel-32
- sanitizer: valgrind
-
- # These are not supported under qemu-user
- - arch: arm-32
- sanitizer: address
- - arch: arm-32
- sanitizer: leak
- - arch: arm-32
- sanitizer: valgrind
- - arch: armel-32
- sanitizer: address
- - arch: armel-32
- sanitizer: leak
- - arch: arm-64
- sanitizer: address
- - arch: arm-64
- sanitizer: leak
- - arch: arm-64
- sanitizer: valgrind
-
- steps:
- - uses: actions/checkout@v2
- - name: enable 32bit architecture
- run: sudo dpkg --add-architecture i386
- if: matrix.arch == 'x86-32'
-
- - name: dependencies-apt
- if: matrix.os == 'ubuntu-latest' && matrix.arch != 'arm-32' && matrix.arch != 'armel-32' && matrix.arch != 'arm-64'
- run: sudo apt-get update && sudo apt-get install ${{ env.deps }} ${{ matrix.deps }} ${{ matrix.archdeps }}
- - name: dependencies-brew
- if: matrix.os == 'macos-latest' && matrix.arch != 'arm-32' && matrix.arch != 'armel-32' && matrix.arch != 'arm-64'
- run: brew install libtool automake ronn OJFord/homebrew-formulae/kramdown ${{ matrix.archdeps }} ;
- brew install --HEAD anarchivist/espeak-ng/waywardgeek-sonic
- - name: autoconf
- if: matrix.arch != 'arm-32' && matrix.arch != 'armel-32' && matrix.arch != 'arm-64'
- run: ./autogen.sh ; chmod -x INSTALL m4/*.m4
- - name: configure
- if: matrix.arch != 'arm-32' && matrix.arch != 'armel-32' && matrix.arch != 'arm-64'
- run: ${{ matrix.configenv }}
- CFLAGS="${{ matrix.configflags }} ${{ matrix.archconfigflags }}"
- CXXFLAGS="${{ matrix.configflags }} ${{ matrix.archconfigflags }}"
- ./configure ${{ matrix.config }}
- - name: Store the config
- if: ${{ failure() }} && matrix.arch != 'arm-32' && matrix.arch != 'armel-32' && matrix.arch != 'arm-64'
- uses: actions/upload-artifact@v2
- with:
- name: config-${{ matrix.arch }}-${{ matrix.sanitizer }}.log
- path: config.log
- - name: make
- if: matrix.arch != 'arm-32' && matrix.arch != 'armel-32' && matrix.arch != 'arm-64'
- run: ${{ matrix.build_env }} make
- - name: make check
- if: matrix.arch != 'arm-32' && matrix.arch != 'armel-32' && matrix.arch != 'arm-64'
- run: ${{ matrix.check_env }} make check
-
- - uses: pguyot/arm-runner-action@v2
- if: matrix.arch == 'arm-32' || matrix.arch == 'armel-32' || matrix.arch == 'arm-64'
- with:
- image_additional_mb: 4096
- base_image: ${{ matrix.archimage }}
- commands: |
- apt-get update && apt-get install -y ${{ env.deps }} ${{ matrix.deps }} ${{ matrix.archdeps }}
- ./autogen.sh ; chmod -x INSTALL m4/*.m4
- CFLAGS="${{ matrix.configflags }} ${{ matrix.archconfigflags }}" CXXFLAGS="${{ matrix.configflags }} ${{ matrix.archconfigflags }}" ./configure ${{ matrix.config }}
- ${{ matrix.build_env }} make
- ${{ matrix.check_env }} make check
-
- reprotest:
-
- runs-on: ubuntu-latest
- name: Build with reprotest on ${{ matrix.arch }}
- strategy:
- fail-fast: false
- matrix:
- arch: [x86-64, x86-32]
-
- include:
- - arch: x86-32
- archdeps: "gcc-multilib g++-multilib libpcaudio-dev:i386 libsonic-dev:i386 libc6-dbg:i386"
- archconfigflags: "-m32"
-
- - arch: x86-64
- archdeps: ""
- archconfigflags: ''
-
- steps:
- - uses: actions/checkout@v2
- - name: enable 32bit architecture
- run: sudo dpkg --add-architecture i386
- if: matrix.arch == 'x86-32'
- - name: dependencies
- run: sudo apt-get update && sudo apt-get install ${{ env.deps }} reprotest ${{ matrix.archdeps }}
- - name: autoconf
- run: ./autogen.sh ; chmod -x INSTALL m4/*.m4
- - name: run
- run: reprotest 'CFLAGS="${{ matrix.archconfigflags }}" CXXFLAGS="${{ matrix.archconfigflags }}" ./configure --without-gradle && make clean && make && make check && touch success' success
-
- distcheck:
-
- runs-on: ubuntu-latest
- name: Run distcheck
- steps:
- - uses: actions/checkout@v2
- - name: dependencies
- run: sudo apt-get update && sudo apt-get install ${{ env.deps }}
- - 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: make dist
- run: make dist
- - name: unpack
- run: mkdir unpack && tar -C unpack -xf *.tar.gz
- - name: re-configure
- run: cd unpack/espeak-ng-* && ./configure
- - name: re-make
- run: cd unpack/espeak-ng-* && make
- - name: re-make check
- run: cd unpack/espeak-ng-* && make check
|