ngtcp2-linux.yml 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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.*'
  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.*'
  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. # unhandled
  45. quictls-version: 3.1.4+quic
  46. # renovate: datasource=github-tags depName=gnutls/gnutls versioning=semver registryUrl=https://github.com
  47. gnutls-version: 3.8.5
  48. wolfssl-version: master
  49. # renovate: datasource=github-tags depName=ngtcp2/nghttp3 versioning=semver registryUrl=https://github.com
  50. nghttp3-version: 1.3.0
  51. # renovate: datasource=github-tags depName=ngtcp2/ngtcp2 versioning=semver registryUrl=https://github.com
  52. ngtcp2-version: 1.5.0
  53. # renovate: datasource=github-tags depName=nghttp2/nghttp2 versioning=semver registryUrl=https://github.com
  54. nghttp2-version: 1.61.0
  55. # renovate: datasource=github-tags depName=icing/mod_h2 versioning=semver registryUrl=https://github.com
  56. mod_h2-version: 2.0.27
  57. jobs:
  58. autotools:
  59. name: ${{ matrix.build.name }}
  60. runs-on: 'ubuntu-latest'
  61. timeout-minutes: 60
  62. strategy:
  63. fail-fast: false
  64. matrix:
  65. build:
  66. - name: quictls
  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 --disable-ntlm
  70. --with-test-nghttpx="$HOME/nghttpx/bin/nghttpx"
  71. --with-openssl=$HOME/nghttpx
  72. - name: gnutls
  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-gnutls=$HOME/nghttpx
  78. - name: wolfssl
  79. configure: >-
  80. PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" LDFLAGS="-Wl,-rpath,$HOME/nghttpx/lib"
  81. --with-ngtcp2=$HOME/nghttpx --enable-warnings --enable-werror --enable-debug
  82. --with-test-nghttpx="$HOME/nghttpx/bin/nghttpx"
  83. --with-wolfssl=$HOME/nghttpx
  84. steps:
  85. - run: |
  86. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  87. sudo apt-get update
  88. sudo apt-get install libtool autoconf automake pkg-config stunnel4 \
  89. libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev libev-dev libc-ares-dev \
  90. nettle-dev libp11-kit-dev libtspi-dev libunistring-dev guile-2.2-dev libtasn1-bin \
  91. libtasn1-6-dev libidn2-0-dev gawk gperf libtss2-dev dns-root-data bison gtk-doc-tools \
  92. texinfo texlive texlive-extra-utils autopoint libev-dev \
  93. apache2 apache2-dev libnghttp2-dev
  94. name: 'install prereqs and impacket, pytest, crypto, apache2'
  95. - name: cache quictls
  96. uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
  97. id: cache-quictls-no-deprecated
  98. env:
  99. cache-name: cache-quictls-no-deprecated
  100. with:
  101. path: /home/runner/quictls
  102. key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.quictls-version }}
  103. - if: steps.cache-quictls-no-deprecated.outputs.cache-hit != 'true'
  104. run: |
  105. cd $HOME
  106. git clone --quiet --depth=1 -b openssl-${{ env.quictls-version }} https://github.com/quictls/openssl quictls
  107. cd quictls
  108. ./config no-deprecated --prefix=$HOME/nghttpx --libdir=$HOME/nghttpx/lib
  109. make
  110. name: 'build quictls'
  111. - run: |
  112. cd $HOME/quictls
  113. make -j1 install_sw
  114. name: 'install quictls'
  115. - name: cache gnutls
  116. uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
  117. id: cache-gnutls
  118. env:
  119. cache-name: cache-gnutls
  120. with:
  121. path: /home/runner/gnutls
  122. key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.gnutls-version }}
  123. - if: steps.cache-gnutls.outputs.cache-hit != 'true'
  124. run: |
  125. cd $HOME
  126. git clone --quiet --depth=1 -b ${{ env.gnutls-version }} https://github.com/gnutls/gnutls.git
  127. cd gnutls
  128. ./bootstrap
  129. ./configure --prefix=$HOME/nghttpx \
  130. PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" LDFLAGS="-Wl,-rpath,$HOME/nghttpx/lib -L$HOME/nghttpx/lib" \
  131. --with-included-libtasn1 --with-included-unistring \
  132. --disable-guile --disable-doc --disable-tests --disable-tools
  133. make
  134. name: 'build gnutls'
  135. - run: |
  136. cd $HOME/gnutls
  137. make install
  138. name: 'install gnutls'
  139. - name: cache wolfssl
  140. uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
  141. id: cache-wolfssl
  142. env:
  143. cache-name: cache-wolfssl
  144. with:
  145. path: /home/runner/wolfssl
  146. key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.wolfssl-version }}
  147. - if: steps.cache-wolfssl.outputs.cache-hit != 'true' || ${{ env.wolfssl-version }} == 'master'
  148. run: |
  149. cd $HOME
  150. rm -rf wolfssl
  151. git clone --quiet --depth=1 -b ${{ env.wolfssl-version }} https://github.com/wolfSSL/wolfssl.git
  152. cd wolfssl
  153. ./autogen.sh
  154. ./configure --enable-all --enable-quic --prefix=$HOME/nghttpx
  155. make
  156. name: 'build wolfssl'
  157. - run: |
  158. cd $HOME/wolfssl
  159. make install
  160. name: 'install wolfssl'
  161. - name: cache nghttp3
  162. uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
  163. id: cache-nghttp3
  164. env:
  165. cache-name: cache-nghttp3
  166. with:
  167. path: /home/runner/nghttp3
  168. key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.nghttp3-version }}
  169. - if: steps.cache-nghttp3.outputs.cache-hit != 'true'
  170. run: |
  171. cd $HOME
  172. git clone --quiet --depth=1 -b v${{ env.nghttp3-version }} https://github.com/ngtcp2/nghttp3
  173. cd nghttp3
  174. git submodule update --init
  175. autoreconf -fi
  176. ./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-lib-only
  177. make
  178. name: 'build nghttp3'
  179. - run: |
  180. cd $HOME/nghttp3
  181. make install
  182. name: 'install nghttp3'
  183. # depends on all other cached libs built so far
  184. - run: |
  185. git clone --quiet --depth=1 -b v${{ env.ngtcp2-version }} https://github.com/ngtcp2/ngtcp2
  186. cd ngtcp2
  187. autoreconf -fi
  188. ./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-lib-only --with-openssl --with-gnutls --with-wolfssl
  189. make install
  190. name: 'install ngtcp2'
  191. # depends on all other cached libs built so far
  192. - run: |
  193. git clone --quiet --depth=1 -b v${{ env.nghttp2-version }} https://github.com/nghttp2/nghttp2
  194. cd nghttp2
  195. autoreconf -fi
  196. ./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-http3
  197. make install
  198. name: 'install nghttp2'
  199. - name: cache mod_h2
  200. uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
  201. id: cache-mod_h2
  202. env:
  203. cache-name: cache-mod_h2
  204. with:
  205. path: /home/runner/mod_h2
  206. key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.mod_h2-version }}
  207. - if: steps.cache-mod_h2.outputs.cache-hit != 'true'
  208. run: |
  209. cd $HOME
  210. git clone --quiet --depth=1 -b v${{ env.mod_h2-version }} https://github.com/icing/mod_h2
  211. cd mod_h2
  212. autoreconf -fi
  213. ./configure
  214. make
  215. name: 'build mod_h2'
  216. - run: |
  217. cd $HOME/mod_h2
  218. sudo make install
  219. name: 'install mod_h2'
  220. - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
  221. - run: |
  222. sudo python3 -m pip install -r tests/requirements.txt -r tests/http/requirements.txt
  223. name: 'install python test prereqs'
  224. - run: autoreconf -fi
  225. name: 'autoreconf'
  226. - run: ./configure ${{ matrix.build.configure }}
  227. name: 'configure'
  228. - run: make V=1
  229. name: 'make'
  230. - run: make V=1 examples
  231. name: 'make examples'
  232. - run: make V=1 -C tests
  233. name: 'make tests'
  234. - run: make V=1 test-ci
  235. name: 'run tests'
  236. env:
  237. TFLAGS: "${{ matrix.build.tflags }}"
  238. - run: pytest -v tests
  239. name: 'run pytest'
  240. env:
  241. TFLAGS: "${{ matrix.build.tflags }}"
  242. CURL_CI: github