quiche-linux.yml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. # Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
  2. #
  3. # SPDX-License-Identifier: curl
  4. name: quiche
  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: quiche-${{ github.event.pull_request.number || github.sha }}
  40. cancel-in-progress: true
  41. permissions: {}
  42. env:
  43. MAKEFLAGS: -j 3
  44. # unhandled
  45. openssl-version: 3.1.4+quic
  46. # renovate: datasource=github-tags depName=ngtcp2/nghttp3 versioning=semver registryUrl=https://github.com
  47. nghttp3-version: 1.3.0
  48. # renovate: datasource=github-tags depName=ngtcp2/ngtcp2 versioning=semver registryUrl=https://github.com
  49. ngtcp2-version: 1.5.0
  50. # renovate: datasource=github-tags depName=nghttp2/nghttp2 versioning=semver registryUrl=https://github.com
  51. nghttp2-version: 1.61.0
  52. # renovate: datasource=github-tags depName=cloudflare/quiche versioning=semver registryUrl=https://github.com
  53. quiche-version: 0.21.0
  54. # renovate: datasource=github-tags depName=icing/mod_h2 versioning=semver registryUrl=https://github.com
  55. mod_h2-version: 2.0.27
  56. jobs:
  57. autotools:
  58. name: ${{ matrix.build.name }}
  59. runs-on: 'ubuntu-latest'
  60. timeout-minutes: 60
  61. strategy:
  62. fail-fast: false
  63. matrix:
  64. build:
  65. - name: quiche
  66. install: >-
  67. libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev libev-dev libc-ares-dev
  68. install_steps: pytest
  69. configure: >-
  70. LDFLAGS="-Wl,-rpath,/home/runner/quiche/target/release"
  71. --with-openssl=/home/runner/quiche/quiche/deps/boringssl/src
  72. --enable-debug
  73. --with-quiche=/home/runner/quiche/target/release
  74. --with-test-nghttpx="$HOME/nghttpx/bin/nghttpx"
  75. --with-ca-fallback
  76. steps:
  77. - run: |
  78. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  79. sudo apt-get update
  80. sudo apt-get install libtool autoconf automake pkg-config stunnel4 ${{ matrix.build.install }}
  81. sudo apt-get install apache2 apache2-dev libnghttp2-dev
  82. name: 'install prereqs and impacket, pytest, crypto'
  83. - name: cache nghttpx
  84. uses: actions/cache@v4
  85. id: cache-nghttpx
  86. env:
  87. cache-name: cache-nghttpx
  88. with:
  89. path: /home/runner/nghttpx
  90. key: ${{ runner.os }}-build-${{ env.cache-name }}-openssl-${{ env.openssl-version }}-nghttp3-${{ env.nghttp3-version }}-ngtcp2-${{ env.ngtcp2-version }}-nghttp2-${{ env.nghttp2-version }}
  91. - if: steps.cache-nghttpx.outputs.cache-hit != 'true'
  92. run: |
  93. git clone --quiet --depth=1 -b openssl-${{ env.openssl-version }} https://github.com/quictls/openssl
  94. cd openssl
  95. ./config --prefix=$HOME/nghttpx --libdir=$HOME/nghttpx/lib
  96. make -j1 install_sw
  97. name: 'install quictls'
  98. - if: steps.cache-nghttpx.outputs.cache-hit != 'true'
  99. run: |
  100. git clone --quiet --depth=1 -b v${{ env.nghttp3-version }} https://github.com/ngtcp2/nghttp3
  101. cd nghttp3
  102. git submodule update --init
  103. autoreconf -fi
  104. ./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-lib-only
  105. make install
  106. name: 'install nghttp3'
  107. - if: steps.cache-nghttpx.outputs.cache-hit != 'true'
  108. run: |
  109. git clone --quiet --depth=1 -b v${{ env.ngtcp2-version }} https://github.com/ngtcp2/ngtcp2
  110. cd ngtcp2
  111. autoreconf -fi
  112. ./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-lib-only --with-openssl
  113. make install
  114. name: 'install ngtcp2'
  115. - if: steps.cache-nghttpx.outputs.cache-hit != 'true'
  116. run: |
  117. git clone --quiet --depth=1 -b v${{ env.nghttp2-version }} https://github.com/nghttp2/nghttp2
  118. cd nghttp2
  119. autoreconf -fi
  120. ./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-http3
  121. make install
  122. name: 'install nghttp2'
  123. - name: cache quiche
  124. uses: actions/cache@v4
  125. id: cache-quiche
  126. env:
  127. cache-name: cache-quiche
  128. with:
  129. path: /home/runner/quiche
  130. key: ${{ runner.os }}-build-${{ env.cache-name }}-quiche-${{ env.quiche-version }}
  131. - if: steps.cache-quiche.outputs.cache-hit != 'true'
  132. run: |
  133. cd $HOME
  134. git clone --quiet --depth=1 -b ${{ env.quiche-version }} --recursive https://github.com/cloudflare/quiche.git
  135. cd quiche
  136. #### Work-around https://github.com/curl/curl/issues/7927 #######
  137. #### See https://github.com/alexcrichton/cmake-rs/issues/131 ####
  138. sed -i -e 's/cmake = "0.1"/cmake = "=0.1.45"/' quiche/Cargo.toml
  139. cargo build -v --package quiche --release --features ffi,pkg-config-meta,qlog --verbose
  140. mkdir -v quiche/deps/boringssl/src/lib
  141. ln -vnf $(find target/release -name libcrypto.a -o -name libssl.a) quiche/deps/boringssl/src/lib/
  142. # include dir
  143. # /home/runner/quiche/quiche/deps/boringssl/src/include
  144. # lib dir
  145. # /home/runner/quiche/quiche/deps/boringssl/src/lib
  146. name: 'build quiche and boringssl'
  147. - name: cache mod_h2
  148. uses: actions/cache@v4
  149. id: cache-mod_h2
  150. env:
  151. cache-name: cache-mod_h2
  152. with:
  153. path: /home/runner/mod_h2
  154. key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.mod_h2-version }}
  155. - if: steps.cache-mod_h2.outputs.cache-hit != 'true'
  156. run: |
  157. cd $HOME
  158. git clone --quiet --depth=1 -b v${{ env.mod_h2-version }} https://github.com/icing/mod_h2
  159. cd mod_h2
  160. autoreconf -fi
  161. ./configure
  162. make
  163. name: 'build mod_h2'
  164. - run: |
  165. cd $HOME/mod_h2
  166. sudo make install
  167. name: 'install mod_h2'
  168. - uses: actions/checkout@v4
  169. - run: |
  170. sudo python3 -m pip install -r tests/requirements.txt -r tests/http/requirements.txt
  171. name: 'install python test prereqs'
  172. - run: autoreconf -fi
  173. name: 'autoreconf'
  174. - run: ./configure ${{ matrix.build.configure }}
  175. name: 'configure'
  176. - run: make V=1
  177. name: 'make'
  178. - run: make V=1 examples
  179. name: 'make examples'
  180. - run: make V=1 -C tests
  181. name: 'make tests'
  182. - run: make V=1 test-ci
  183. name: 'run tests'
  184. env:
  185. TFLAGS: "${{ matrix.build.tflags }}"
  186. - run: pytest -v tests
  187. name: 'run pytest'
  188. env:
  189. TFLAGS: "${{ matrix.build.tflags }}"
  190. CURL_CI: github