ngtcp2-linux.yml 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  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.62.1
  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. echo 'CC=gcc-12' >> $GITHUB_ENV
  95. echo 'CXX=g++-12' >> $GITHUB_ENV
  96. name: 'install prereqs and impacket, pytest, crypto, apache2'
  97. - name: cache quictls
  98. uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
  99. id: cache-quictls-no-deprecated
  100. env:
  101. cache-name: cache-quictls-no-deprecated
  102. with:
  103. path: /home/runner/quictls
  104. key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.quictls-version }}
  105. - if: steps.cache-quictls-no-deprecated.outputs.cache-hit != 'true'
  106. run: |
  107. cd $HOME
  108. git clone --quiet --depth=1 -b openssl-${{ env.quictls-version }} https://github.com/quictls/openssl quictls
  109. cd quictls
  110. ./config no-deprecated --prefix=$HOME/nghttpx --libdir=$HOME/nghttpx/lib
  111. make
  112. name: 'build quictls'
  113. - run: |
  114. cd $HOME/quictls
  115. make -j1 install_sw
  116. name: 'install quictls'
  117. - name: cache gnutls
  118. uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
  119. id: cache-gnutls
  120. env:
  121. cache-name: cache-gnutls
  122. with:
  123. path: /home/runner/gnutls
  124. key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.gnutls-version }}
  125. - if: steps.cache-gnutls.outputs.cache-hit != 'true'
  126. run: |
  127. cd $HOME
  128. git clone --quiet --depth=1 -b ${{ env.gnutls-version }} https://github.com/gnutls/gnutls.git
  129. cd gnutls
  130. ./bootstrap
  131. ./configure --prefix=$HOME/nghttpx \
  132. PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" LDFLAGS="-Wl,-rpath,$HOME/nghttpx/lib -L$HOME/nghttpx/lib" \
  133. --with-included-libtasn1 --with-included-unistring \
  134. --disable-guile --disable-doc --disable-tests --disable-tools
  135. make
  136. name: 'build gnutls'
  137. - run: |
  138. cd $HOME/gnutls
  139. make install
  140. name: 'install gnutls'
  141. - name: cache wolfssl
  142. uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
  143. id: cache-wolfssl
  144. env:
  145. cache-name: cache-wolfssl
  146. with:
  147. path: /home/runner/wolfssl
  148. key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.wolfssl-version }}
  149. - if: steps.cache-wolfssl.outputs.cache-hit != 'true' || ${{ env.wolfssl-version }} == 'master'
  150. run: |
  151. cd $HOME
  152. rm -rf wolfssl
  153. git clone --quiet --depth=1 -b ${{ env.wolfssl-version }} https://github.com/wolfSSL/wolfssl.git
  154. cd wolfssl
  155. ./autogen.sh
  156. ./configure --enable-all --enable-quic --prefix=$HOME/nghttpx
  157. make
  158. name: 'build wolfssl'
  159. - run: |
  160. cd $HOME/wolfssl
  161. make install
  162. name: 'install wolfssl'
  163. - name: cache nghttp3
  164. uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
  165. id: cache-nghttp3
  166. env:
  167. cache-name: cache-nghttp3
  168. with:
  169. path: /home/runner/nghttp3
  170. key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.nghttp3-version }}
  171. - if: steps.cache-nghttp3.outputs.cache-hit != 'true'
  172. run: |
  173. cd $HOME
  174. git clone --quiet --depth=1 -b v${{ env.nghttp3-version }} https://github.com/ngtcp2/nghttp3
  175. cd nghttp3
  176. git submodule update --init
  177. autoreconf -fi
  178. ./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-lib-only
  179. make
  180. name: 'build nghttp3'
  181. - run: |
  182. cd $HOME/nghttp3
  183. make install
  184. name: 'install nghttp3'
  185. # depends on all other cached libs built so far
  186. - run: |
  187. git clone --quiet --depth=1 -b v${{ env.ngtcp2-version }} https://github.com/ngtcp2/ngtcp2
  188. cd ngtcp2
  189. autoreconf -fi
  190. ./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-lib-only --with-openssl --with-gnutls --with-wolfssl
  191. make install
  192. name: 'install ngtcp2'
  193. # depends on all other cached libs built so far
  194. - run: |
  195. git clone --quiet --depth=1 -b v${{ env.nghttp2-version }} https://github.com/nghttp2/nghttp2
  196. cd nghttp2
  197. autoreconf -fi
  198. ./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-http3
  199. make install
  200. name: 'install nghttp2'
  201. - name: cache mod_h2
  202. uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
  203. id: cache-mod_h2
  204. env:
  205. cache-name: cache-mod_h2
  206. with:
  207. path: /home/runner/mod_h2
  208. key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.mod_h2-version }}
  209. - if: steps.cache-mod_h2.outputs.cache-hit != 'true'
  210. run: |
  211. cd $HOME
  212. git clone --quiet --depth=1 -b v${{ env.mod_h2-version }} https://github.com/icing/mod_h2
  213. cd mod_h2
  214. autoreconf -fi
  215. ./configure
  216. make
  217. name: 'build mod_h2'
  218. - run: |
  219. cd $HOME/mod_h2
  220. sudo make install
  221. name: 'install mod_h2'
  222. - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
  223. - run: |
  224. sudo python3 -m pip install -r tests/requirements.txt -r tests/http/requirements.txt
  225. name: 'install python test prereqs'
  226. - run: autoreconf -fi
  227. name: 'autoreconf'
  228. - run: ./configure ${{ matrix.build.configure }}
  229. name: 'configure'
  230. - run: make V=1
  231. name: 'make'
  232. - run: make V=1 examples
  233. name: 'make examples'
  234. - run: make V=1 -C tests
  235. name: 'make tests'
  236. - run: make V=1 test-ci
  237. name: 'run tests'
  238. env:
  239. TFLAGS: "${{ matrix.build.tflags }}"
  240. - run: pytest -v tests
  241. name: 'run pytest'
  242. env:
  243. TFLAGS: "${{ matrix.build.tflags }}"
  244. CURL_CI: github