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 9.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. name: CI
  2. on:
  3. workflow_dispatch:
  4. push:
  5. branches: [ master ]
  6. pull_request:
  7. branches: [ master ]
  8. env:
  9. deps: libpcaudio-dev libsonic-dev ronn kramdown python3
  10. jobs:
  11. build:
  12. runs-on: ${{ matrix.os }}
  13. name: Build with ${{ matrix.sanitizer }} sanitizer on ${{ matrix.os }} ${{ matrix.arch }}
  14. strategy:
  15. fail-fast: false
  16. matrix:
  17. os: [ubuntu-latest, macos-latest]
  18. arch: [x86-64, x86-32, arm-32, armel-32, arm-64]
  19. sanitizer: [no, address, leak, memory, thread, undefined, valgrind]
  20. include:
  21. - sanitizer: "no"
  22. deps: ""
  23. configflags: "-g -Og -fno-omit-frame-pointer"
  24. config: ""
  25. build_env: ""
  26. check_env: ""
  27. - sanitizer: "address"
  28. deps: ""
  29. configflags: "-fsanitize=address -g -Og -fno-omit-frame-pointer"
  30. config: ""
  31. build_env: "ASAN_OPTIONS=detect_leaks=0"
  32. check_env: "ASAN_OPTIONS=detect_leaks=0"
  33. - sanitizer: "leak"
  34. deps: ""
  35. configflags: '-fsanitize=leak -g -Og -fno-omit-frame-pointer'
  36. config: ""
  37. build_env: "LSAN_OPTIONS=fast_unwind_on_malloc=0"
  38. check_env: "LSAN_OPTIONS=fast_unwind_on_malloc=0"
  39. - sanitizer: "memory"
  40. deps: "clang"
  41. configenv: "CC=clang CXX=clang++"
  42. configflags: "-fsanitize=memory -fsanitize-memory-track-origins=2 -g -Og -fno-omit-frame-pointer"
  43. config: "--without-pcaudiolib --without-sonic"
  44. build_env: "MSAN_OPTIONS=exitcode=42"
  45. check_env: "MSAN_OPTIONS=exitcode=42"
  46. - sanitizer: "thread"
  47. deps: ""
  48. configflags: "-fsanitize=thread -g -Og -fno-omit-frame-pointer"
  49. config: ""
  50. build_env: ""
  51. check_env: ""
  52. - sanitizer: "undefined"
  53. deps: ""
  54. configflags: "-fsanitize=undefined -g -Og -fno-omit-frame-pointer"
  55. config: ""
  56. build_env: "UBSAN_OPTIONS=halt_on_error=1"
  57. check_env: "UBSAN_OPTIONS=halt_on_error=1"
  58. - sanitizer: "valgrind"
  59. deps: "libtool-bin valgrind"
  60. configflags: '-g -Og -fno-omit-frame-pointer'
  61. config: ""
  62. build_env: 'VALGRIND="libtool --mode=execute valgrind --track-origins=yes --leak-check=full --error-exitcode=1" '
  63. check_env: 'VALGRIND="libtool --mode=execute valgrind --track-origins=yes --leak-check=full --error-exitcode=1" '
  64. - arch: x86-32
  65. archdeps: "gcc-multilib g++-multilib libpcaudio-dev:i386 libsonic-dev:i386 libc6-dbg:i386"
  66. archconfigflags: "-m32"
  67. archimage: ''
  68. - arch: x86-64
  69. archdeps: ""
  70. archconfigflags: ''
  71. archimage: ''
  72. - arch: arm-32
  73. archdeps: "build-essential automake autoconf libtool"
  74. archconfigflags: "-D_FILE_OFFSET_BITS=64"
  75. archimage: 'raspios_lite:latest'
  76. - arch: armel-32
  77. archdeps: "build-essential automake autoconf libtool"
  78. archconfigflags: "-D_FILE_OFFSET_BITS=64"
  79. archimage: 'raspi_1_bullseye:20220121'
  80. - arch: arm-64
  81. archdeps: "build-essential automake autoconf libtool"
  82. archconfigflags: ""
  83. archimage: 'raspios_lite_arm64:latest'
  84. exclude:
  85. # These are not supported on 32bit
  86. - arch: x86-32
  87. sanitizer: leak
  88. - arch: x86-32
  89. sanitizer: memory
  90. - arch: x86-32
  91. sanitizer: thread
  92. # 32-bit macOS is not supported
  93. - os: macos-latest
  94. arch: x86-32
  95. # arm macOS is not supported
  96. - os: macos-latest
  97. arch: arm-32
  98. - os: macos-latest
  99. arch: armel-32
  100. - os: macos-latest
  101. arch: arm-64
  102. # These are not supported on macos
  103. - os: macos-latest
  104. sanitizer: leak
  105. - os: macos-latest
  106. sanitizer: memory
  107. - os: macos-latest
  108. sanitizer: valgrind
  109. # These are not supported on arm
  110. - arch: arm-32
  111. sanitizer: memory
  112. - arch: armel-32
  113. sanitizer: memory
  114. - arch: arm-64
  115. sanitizer: memory
  116. - arch: arm-32
  117. sanitizer: thread
  118. - arch: armel-32
  119. sanitizer: thread
  120. - arch: arm-64
  121. sanitizer: thread
  122. - arch: armel-32
  123. sanitizer: valgrind
  124. # These are not supported under qemu-user
  125. - arch: arm-32
  126. sanitizer: address
  127. - arch: arm-32
  128. sanitizer: leak
  129. - arch: arm-32
  130. sanitizer: valgrind
  131. - arch: armel-32
  132. sanitizer: address
  133. - arch: armel-32
  134. sanitizer: leak
  135. - arch: arm-64
  136. sanitizer: address
  137. - arch: arm-64
  138. sanitizer: leak
  139. - arch: arm-64
  140. sanitizer: valgrind
  141. steps:
  142. - uses: actions/checkout@v2
  143. - name: enable 32bit architecture
  144. run: sudo dpkg --add-architecture i386
  145. if: matrix.arch == 'x86-32'
  146. - name: dependencies-apt
  147. if: matrix.os == 'ubuntu-latest' && matrix.arch != 'arm-32' && matrix.arch != 'armel-32' && matrix.arch != 'arm-64'
  148. run: sudo apt-get update && sudo apt-get install ${{ env.deps }} ${{ matrix.deps }} ${{ matrix.archdeps }}
  149. - name: dependencies-brew
  150. if: matrix.os == 'macos-latest' && matrix.arch != 'arm-32' && matrix.arch != 'armel-32' && matrix.arch != 'arm-64'
  151. run: brew install libtool automake ronn OJFord/homebrew-formulae/kramdown ${{ matrix.archdeps }} ;
  152. brew install --HEAD anarchivist/espeak-ng/waywardgeek-sonic
  153. - name: autoconf
  154. if: matrix.arch != 'arm-32' && matrix.arch != 'armel-32' && matrix.arch != 'arm-64'
  155. run: ./autogen.sh ; chmod -x INSTALL m4/*.m4
  156. - name: configure
  157. if: matrix.arch != 'arm-32' && matrix.arch != 'armel-32' && matrix.arch != 'arm-64'
  158. run: ${{ matrix.configenv }}
  159. CFLAGS="${{ matrix.configflags }} ${{ matrix.archconfigflags }}"
  160. CXXFLAGS="${{ matrix.configflags }} ${{ matrix.archconfigflags }}"
  161. ./configure ${{ matrix.config }}
  162. - name: Store the config
  163. if: ${{ failure() }} && matrix.arch != 'arm-32' && matrix.arch != 'armel-32' && matrix.arch != 'arm-64'
  164. uses: actions/upload-artifact@v2
  165. with:
  166. name: config-${{ matrix.arch }}-${{ matrix.sanitizer }}.log
  167. path: config.log
  168. - name: make
  169. if: matrix.arch != 'arm-32' && matrix.arch != 'armel-32' && matrix.arch != 'arm-64'
  170. run: ${{ matrix.build_env }} make
  171. - name: make check
  172. if: matrix.arch != 'arm-32' && matrix.arch != 'armel-32' && matrix.arch != 'arm-64'
  173. run: ${{ matrix.check_env }} make check
  174. - uses: pguyot/arm-runner-action@v2
  175. if: matrix.arch == 'arm-32' || matrix.arch == 'armel-32' || matrix.arch == 'arm-64'
  176. with:
  177. image_additional_mb: 4096
  178. base_image: ${{ matrix.archimage }}
  179. commands: |
  180. apt-get update && apt-get install -y ${{ env.deps }} ${{ matrix.deps }} ${{ matrix.archdeps }}
  181. ./autogen.sh ; chmod -x INSTALL m4/*.m4
  182. CFLAGS="${{ matrix.configflags }} ${{ matrix.archconfigflags }}" CXXFLAGS="${{ matrix.configflags }} ${{ matrix.archconfigflags }}" ./configure ${{ matrix.config }}
  183. ${{ matrix.build_env }} make
  184. ${{ matrix.check_env }} make check
  185. reprotest:
  186. runs-on: ubuntu-latest
  187. name: Build with reprotest on ${{ matrix.arch }}
  188. strategy:
  189. fail-fast: false
  190. matrix:
  191. arch: [x86-64, x86-32]
  192. include:
  193. - arch: x86-32
  194. archdeps: "gcc-multilib g++-multilib libpcaudio-dev:i386 libsonic-dev:i386 libc6-dbg:i386"
  195. archconfigflags: "-m32"
  196. - arch: x86-64
  197. archdeps: ""
  198. archconfigflags: ''
  199. steps:
  200. - uses: actions/checkout@v2
  201. - name: enable 32bit architecture
  202. run: sudo dpkg --add-architecture i386
  203. if: matrix.arch == 'x86-32'
  204. - name: dependencies
  205. run: sudo apt-get update && sudo apt-get install ${{ env.deps }} reprotest ${{ matrix.archdeps }}
  206. - name: autoconf
  207. run: ./autogen.sh ; chmod -x INSTALL m4/*.m4
  208. - name: run
  209. run: reprotest 'CFLAGS="${{ matrix.archconfigflags }}" CXXFLAGS="${{ matrix.archconfigflags }}" ./configure --without-gradle && make clean && make && make check && touch success' success
  210. distcheck:
  211. runs-on: ubuntu-latest
  212. name: Run distcheck
  213. steps:
  214. - uses: actions/checkout@v2
  215. - name: dependencies
  216. run: sudo apt-get update && sudo apt-get install ${{ env.deps }}
  217. - name: autoconf
  218. run: ./autogen.sh ; chmod -x INSTALL m4/*.m4
  219. - name: configure
  220. run: ./configure
  221. - name: make
  222. run: make
  223. - name: make check
  224. run: make check
  225. - name: make dist
  226. run: make dist
  227. - name: unpack
  228. run: mkdir unpack && tar -C unpack -xf *.tar.gz
  229. - name: re-configure
  230. run: cd unpack/espeak-ng-* && ./configure
  231. - name: re-make
  232. run: cd unpack/espeak-ng-* && make
  233. - name: re-make check
  234. run: cd unpack/espeak-ng-* && make check