eSpeak NG is an open source speech synthesizer that supports more than hundred languages and accents.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ci.yml 7.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. name: CI
  2. on:
  3. workflow_dispatch:
  4. push:
  5. branches: [ master ]
  6. pull_request:
  7. branches: [ master ]
  8. jobs:
  9. build:
  10. runs-on: ${{ matrix.os }}-${{ matrix.osver }}
  11. name: "${{ matrix.os }} ${{ matrix.arch }}: ${{ matrix.compiler }} + ${{ matrix.sanitizer }}"
  12. strategy:
  13. fail-fast: false
  14. matrix:
  15. os: [ubuntu, macos]
  16. arch: [amd64, i386, aarch64, arm, riscv64]
  17. sanitizer: [no, address, leak, memory, thread, undefined, valgrind]
  18. compiler: [gcc, clang]
  19. include:
  20. - os: ubuntu
  21. osver: 22.04
  22. sys: linux-gnu
  23. - os: macos
  24. osver: 12
  25. sys: apple-darwin21
  26. - os: macos
  27. compiler: clang
  28. sys: apple-darwin21.6.0
  29. - compiler: clang
  30. compiler_flags: "-fdebug-default-version=4"
  31. - arch: amd64
  32. ccarch: x86_64
  33. archcflags: ""
  34. cross: no
  35. - arch: i386
  36. ccarch: x86_64
  37. archcflags: "-m32 -msse2 -mfpmath=sse"
  38. cross: no
  39. - arch: aarch64
  40. ccarch: aarch64
  41. archcflags: "-Wl,--dynamic-linker=/usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1"
  42. runenv: 'LD_LIBRARY_PATH=/usr/aarch64-linux-gnu/lib:$LD_LIBRARY_PATH'
  43. cross: yes
  44. - arch: arm
  45. ccarch: arm
  46. sys: linux-gnueabi
  47. archcflags: "-D_FILE_OFFSET_BITS=64 -latomic -Wl,--dynamic-linker=/usr/arm-linux-gnueabi/lib/ld-linux.so.3"
  48. runenv: 'LD_LIBRARY_PATH=/usr/arm-linux-gnueabi/lib:$LD_LIBRARY_PATH'
  49. cross: yes
  50. - arch: riscv64
  51. ccarch: riscv64
  52. archcflags: "-Wl,--dynamic-linker=/usr/riscv64-linux-gnu/lib/ld-linux-riscv64-lp64d.so.1"
  53. runenv: 'LD_LIBRARY_PATH=/usr/riscv64-linux-gnu/lib:$LD_LIBRARY_PATH'
  54. cross: yes
  55. - sanitizer: "address"
  56. sanitizer_cflags: "-fsanitize=address"
  57. sanitize_env: "ASAN_OPTIONS=detect_leaks=0"
  58. - sanitizer: "leak"
  59. sanitizer_cflags: "-fsanitize=leak"
  60. sanitize_env: "LSAN_OPTIONS=fast_unwind_on_malloc=0"
  61. - sanitizer: "memory"
  62. configenv: "CC=clang CXX=clang++"
  63. sanitizer_cflags: "-fsanitize=memory -fsanitize-memory-track-origins=2"
  64. config: "--without-pcaudiolib --without-sonic"
  65. sanitize_env: "MSAN_OPTIONS=exitcode=42"
  66. - sanitizer: "thread"
  67. sanitizer_cflags: "-fsanitize=thread"
  68. - sanitizer: "undefined"
  69. sanitizer_cflags: "-fsanitize=undefined"
  70. sanitize_env: "UBSAN_OPTIONS=halt_on_error=1"
  71. - sanitizer: "valgrind"
  72. sanitize_env: 'VALGRIND="libtool --mode=execute valgrind --track-origins=yes --leak-check=full --error-exitcode=1"'
  73. exclude:
  74. - os: macos
  75. arch: i386
  76. - os: macos
  77. arch: aarch64
  78. - os: macos
  79. arch: arm
  80. - os: macos
  81. arch: riscv64
  82. - os: macos
  83. sanitizer: valgrind # Not supported on macOS
  84. - compiler: gcc
  85. sanitizer: memory # Not supported by GCC
  86. - os: macos
  87. compiler: clang
  88. sanitizer: leak # Not supported by Apple Clang
  89. - os: macos
  90. compiler: clang
  91. sanitizer: memory # Not supported by Apple Clang
  92. - os: macos
  93. compiler: gcc
  94. sanitizer: thread # Failing on CI, should be supported?
  95. # Valgrind is unavailable for cross-builds
  96. - arch: aarch64
  97. sanitizer: valgrind
  98. - arch: arm
  99. sanitizer: valgrind
  100. - arch: riscv64
  101. sanitizer: valgrind
  102. # Leak sanitizer is unavailable for cross-builds
  103. - arch: i386
  104. sanitizer: leak
  105. - arch: aarch64
  106. sanitizer: leak
  107. - arch: arm
  108. sanitizer: leak
  109. - arch: riscv64
  110. sanitizer: leak
  111. # Thread sanitizer is partially unavailable
  112. - arch: i386
  113. sanitizer: thread
  114. - arch: arm
  115. sanitizer: thread
  116. - arch: riscv64
  117. sanitizer: thread
  118. - arch: aarch64
  119. compiler: clang
  120. sanitizer: thread
  121. # Undefined sanitizer is partially unavailable
  122. - arch: riscv64
  123. sanitizer: undefined
  124. - arch: arm
  125. compiler: clang
  126. sanitizer: undefined
  127. - arch: aarch64
  128. compiler: clang
  129. sanitizer: undefined
  130. # Memory sanitizer is partially unavailable
  131. - arch: i386
  132. sanitizer: memory
  133. - arch: riscv64
  134. sanitizer: memory
  135. - arch: arm
  136. sanitizer: memory
  137. - arch: aarch64
  138. sanitizer: memory
  139. # Address sanitizer is partially unavailable
  140. - arch: riscv64
  141. sanitizer: address
  142. - arch: arm
  143. compiler: clang
  144. sanitizer: address
  145. - arch: aarch64
  146. compiler: clang
  147. sanitizer: address
  148. steps:
  149. # Linux - dependencies
  150. - name: apt-build-deps
  151. if: matrix.os == 'ubuntu'
  152. run: |
  153. [ 'x${{ matrix.cross }}' == 'xno' ] && sudo dpkg --add-architecture ${{ matrix.arch }}
  154. sudo apt-get update
  155. sudo apt-get install ronn kramdown python3
  156. - name: apt-arch-deps
  157. if: matrix.os == 'ubuntu' && matrix.cross == 'no'
  158. run: "sudo apt-get install libtool-bin valgrind g++-12-multilib linux-libc-dev:${{ matrix.arch }} libpcaudio-dev:${{ matrix.arch }} libsonic-dev:${{ matrix.arch }} libstdc++-12-dev:${{ matrix.arch }} libc6-dbg:${{ matrix.arch }}"
  159. - name: apt-cross-deps
  160. if: matrix.cross == 'yes'
  161. run: sudo apt-get install qemu-user g++-12-${{ matrix.arch }}-${{ matrix.sys }}
  162. - name: apt-compile-clang
  163. if: matrix.os == 'ubuntu' && matrix.compiler == 'clang'
  164. run: sudo apt-get install clang
  165. # MacOS - dependencies
  166. - name: brew-deps
  167. if: matrix.os == 'macos'
  168. run: brew install libtool automake ronn OJFord/homebrew-formulae/kramdown &&
  169. brew install --HEAD anarchivist/espeak-ng/waywardgeek-sonic
  170. - name: brew-compile-deps
  171. if: matrix.os == 'macos' && matrix.compiler == 'gcc'
  172. run: brew install gcc@12
  173. # Checkout code
  174. - uses: actions/checkout@v3
  175. # Configure
  176. - name: autoconf
  177. run: |
  178. ./autogen.sh
  179. chmod -x INSTALL m4/*.m4
  180. - name: configure
  181. run: |
  182. [ 'x${{ matrix.compiler }}' = 'xgcc' ] && export CC="${{ matrix.ccarch }}-${{ matrix.sys }}-gcc-12"
  183. [ 'x${{ matrix.compiler }}' = 'xgcc' ] && export CXX="${{ matrix.ccarch }}-${{ matrix.sys }}-g++-12"
  184. [ 'x${{ matrix.compiler }}' = 'xclang' ] && export CC="clang --target=${{ matrix.ccarch }}-${{ matrix.sys }}"
  185. [ 'x${{ matrix.compiler }}' = 'xclang' ] && export CXX="clang++ --target=${{ matrix.ccarch }}-${{ matrix.sys }}"
  186. [ 'x${{ matrix.cross }}' = 'xyes' ] && export LD="${{ matrix.ccarch }}-${{ matrix.sys }}-ld"
  187. export CFLAGS="-g -Og -fno-omit-frame-pointer ${{ matrix.compiler_flags }} ${{ matrix.sanitizer_cflags }} ${{ matrix.archcflags }}"
  188. export CXXFLAGS="-g -Og -fno-omit-frame-pointer ${{ matrix.compiler_flags }} ${{ matrix.sanitizer_cflags }} ${{ matrix.archcflags }}"
  189. ./configure --host=${{ matrix.arch }}-${{ matrix.sys }} ${{ matrix.config }}
  190. - name: config-failed-upload
  191. if: ${{ failure() }}
  192. uses: actions/upload-artifact@v3
  193. with:
  194. name: config-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.compiler }}-${{ matrix.sanitizer }}.log
  195. path: config.log
  196. # Build and test
  197. - name: make-binary
  198. run: make src/speak-ng src/espeak-ng
  199. - name: make-data
  200. run: ${{ matrix.sanitize_env }} ${{ matrix.runenv }} make all-am
  201. - name: test
  202. run: ${{ matrix.sanitize_env }} ${{ matrix.runenv }} make check