ngtcp2-linux.yml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. # Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
  2. #
  3. # SPDX-License-Identifier: curl
  4. name: ngtcp2-linux
  5. on:
  6. push:
  7. branches:
  8. - master
  9. - '*/ci'
  10. paths-ignore:
  11. - '**/*.md'
  12. - '**/CMakeLists.txt'
  13. - '.azure-pipelines.yml'
  14. - '.circleci/**'
  15. - '.cirrus.yml'
  16. - 'appveyor.yml'
  17. - 'CMake/**'
  18. - 'packages/**'
  19. - 'plan9/**'
  20. - 'projects/**'
  21. - 'winbuild/**'
  22. pull_request:
  23. branches:
  24. - master
  25. paths-ignore:
  26. - '**/*.md'
  27. - '**/CMakeLists.txt'
  28. - '.azure-pipelines.yml'
  29. - '.circleci/**'
  30. - '.cirrus.yml'
  31. - 'appveyor.yml'
  32. - 'CMake/**'
  33. - 'packages/**'
  34. - 'plan9/**'
  35. - 'projects/**'
  36. - 'winbuild/**'
  37. concurrency:
  38. # Hardcoded workflow filename as workflow name above is just Linux again
  39. group: ngtcp2-${{ github.event.pull_request.number || github.sha }}
  40. cancel-in-progress: true
  41. permissions: {}
  42. env:
  43. MAKEFLAGS: -j 3
  44. quictls-version: 3.0.10+quic
  45. gnutls-version: 3.8.0
  46. wolfssl-version: master
  47. nghttp3-version: v0.15.0
  48. ngtcp2-version: v0.19.1
  49. nghttp2-version: v1.56.0
  50. mod_h2-version: v2.0.21
  51. jobs:
  52. autotools:
  53. name: ${{ matrix.build.name }}
  54. runs-on: 'ubuntu-latest'
  55. timeout-minutes: 60
  56. strategy:
  57. fail-fast: false
  58. matrix:
  59. build:
  60. - name: quictls
  61. configure: >-
  62. PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" LDFLAGS="-Wl,-rpath,$HOME/nghttpx/lib"
  63. --with-ngtcp2=$HOME/nghttpx --enable-warnings --enable-werror --enable-debug
  64. --with-test-nghttpx="$HOME/nghttpx/bin/nghttpx"
  65. --with-openssl=$HOME/nghttpx
  66. - name: gnutls
  67. configure: >-
  68. PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" LDFLAGS="-Wl,-rpath,$HOME/nghttpx/lib"
  69. --with-ngtcp2=$HOME/nghttpx --enable-warnings --enable-werror --enable-debug
  70. --with-test-nghttpx="$HOME/nghttpx/bin/nghttpx"
  71. --with-gnutls=$HOME/nghttpx
  72. - name: wolfssl
  73. configure: >-
  74. PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" LDFLAGS="-Wl,-rpath,$HOME/nghttpx/lib"
  75. --with-ngtcp2=$HOME/nghttpx --enable-warnings --enable-werror --enable-debug
  76. --with-test-nghttpx="$HOME/nghttpx/bin/nghttpx"
  77. --with-wolfssl=$HOME/nghttpx
  78. steps:
  79. - run: |
  80. sudo apt-get update
  81. sudo apt-get install libtool autoconf automake pkg-config stunnel4 \
  82. libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev libev-dev libc-ares-dev \
  83. nettle-dev libp11-kit-dev libtspi-dev libunistring-dev guile-2.2-dev libtasn1-bin \
  84. libtasn1-6-dev libidn2-0-dev gawk gperf libtss2-dev dns-root-data bison gtk-doc-tools \
  85. texinfo texlive texlive-extra-utils autopoint libev-dev \
  86. apache2 apache2-dev libnghttp2-dev
  87. name: 'install prereqs and impacket, pytest, crypto, apache2'
  88. - name: cache quictls
  89. uses: actions/cache@v3
  90. id: cache-quictls
  91. env:
  92. cache-name: cache-quictls
  93. with:
  94. path: /home/runner/quictls
  95. key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.quictls-version }}
  96. - if: steps.cache-quictls.outputs.cache-hit != 'true'
  97. run: |
  98. cd $HOME
  99. git clone --quiet --depth=1 -b openssl-${{ env.quictls-version }} https://github.com/quictls/openssl quictls
  100. cd quictls
  101. ./config --prefix=$HOME/nghttpx --libdir=$HOME/nghttpx/lib
  102. make
  103. name: 'build quictls'
  104. - run: |
  105. cd $HOME/quictls
  106. make -j1 install_sw
  107. name: 'install quictls'
  108. - name: cache gnutls
  109. uses: actions/cache@v3
  110. id: cache-gnutls
  111. env:
  112. cache-name: cache-gnutls
  113. with:
  114. path: /home/runner/gnutls
  115. key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.gnutls-version }}
  116. - if: steps.cache-gnutls.outputs.cache-hit != 'true'
  117. run: |
  118. cd $HOME
  119. git clone --quiet --depth=1 -b ${{ env.gnutls-version }} https://github.com/gnutls/gnutls.git
  120. cd gnutls
  121. ./bootstrap
  122. ./configure --prefix=$HOME/nghttpx \
  123. PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" LDFLAGS="-Wl,-rpath,$HOME/nghttpx/lib -L$HOME/nghttpx/lib" \
  124. --with-included-libtasn1 --with-included-unistring \
  125. --disable-guile --disable-doc --disable-tests --disable-tools
  126. make
  127. name: 'build gnutls'
  128. - run: |
  129. cd $HOME/gnutls
  130. make install
  131. name: 'install gnutls'
  132. - name: cache wolfssl
  133. uses: actions/cache@v3
  134. id: cache-wolfssl
  135. env:
  136. cache-name: cache-wolfssl
  137. with:
  138. path: /home/runner/wolfssl
  139. key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.wolfssl-version }}
  140. - if: steps.cache-wolfssl.outputs.cache-hit != 'true' || ${{ env.wolfssl-version }} == 'master'
  141. run: |
  142. cd $HOME
  143. rm -rf wolfssl
  144. git clone --quiet --depth=1 -b ${{ env.wolfssl-version }} https://github.com/wolfSSL/wolfssl.git
  145. cd wolfssl
  146. ./autogen.sh
  147. ./configure --enable-all --enable-quic --prefix=$HOME/nghttpx
  148. make
  149. name: 'build wolfssl'
  150. - run: |
  151. cd $HOME/wolfssl
  152. make install
  153. name: 'install wolfssl'
  154. - name: cache nghttp3
  155. uses: actions/cache@v3
  156. id: cache-nghttp3
  157. env:
  158. cache-name: cache-nghttp3
  159. with:
  160. path: /home/runner/nghttp3
  161. key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.nghttp3-version }}
  162. - if: steps.cache-nghttp3.outputs.cache-hit != 'true'
  163. run: |
  164. cd $HOME
  165. git clone --quiet --depth=1 -b ${{ env.nghttp3-version }} https://github.com/ngtcp2/nghttp3
  166. cd nghttp3
  167. autoreconf -fi
  168. ./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-lib-only
  169. make
  170. name: 'build nghttp3'
  171. - run: |
  172. cd $HOME/nghttp3
  173. make install
  174. name: 'install nghttp3'
  175. # depends on all other cached libs built so far
  176. - run: |
  177. git clone --quiet --depth=1 -b ${{ env.ngtcp2-version }} https://github.com/ngtcp2/ngtcp2
  178. cd ngtcp2
  179. autoreconf -fi
  180. ./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-lib-only --with-openssl --with-gnutls --with-wolfssl
  181. make install
  182. name: 'install ngtcp2'
  183. # depends on all other cached libs built so far
  184. - run: |
  185. git clone --quiet --depth=1 -b ${{ env.nghttp2-version }} https://github.com/nghttp2/nghttp2
  186. cd nghttp2
  187. autoreconf -fi
  188. ./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-http3
  189. make install
  190. name: 'install nghttp2'
  191. - name: cache mod_h2
  192. uses: actions/cache@v3
  193. id: cache-mod_h2
  194. env:
  195. cache-name: cache-mod_h2
  196. with:
  197. path: /home/runner/mod_h2
  198. key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.mod_h2-version }}
  199. - if: steps.cache-mod_h2.outputs.cache-hit != 'true'
  200. run: |
  201. cd $HOME
  202. git clone --quiet --depth=1 -b ${{ env.mod_h2-version }} https://github.com/icing/mod_h2
  203. cd mod_h2
  204. autoreconf -fi
  205. ./configure
  206. make
  207. name: 'build mod_h2'
  208. - run: |
  209. cd $HOME/mod_h2
  210. sudo make install
  211. name: 'install mod_h2'
  212. - uses: actions/checkout@v4
  213. - run: |
  214. sudo python3 -m pip install -r tests/requirements.txt -r tests/http/requirements.txt
  215. name: 'install python test prereqs'
  216. - run: autoreconf -fi
  217. name: 'autoreconf'
  218. - run: ./configure ${{ matrix.build.configure }}
  219. name: 'configure'
  220. - run: make V=1
  221. name: 'make'
  222. - run: make V=1 examples
  223. name: 'make examples'
  224. - run: make V=1 -C tests
  225. name: 'make tests'
  226. - run: make V=1 test-ci
  227. name: 'run tests'
  228. env:
  229. TFLAGS: "${{ matrix.build.tflags }}"
  230. - run: pytest -v tests
  231. name: 'run pytest'
  232. env:
  233. TFLAGS: "${{ matrix.build.tflags }}"
  234. CURL_CI: github