quiche-linux.yml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  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.62.1
  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. echo 'CC=gcc-12' >> $GITHUB_ENV
  83. echo 'CXX=g++-12' >> $GITHUB_ENV
  84. name: 'install prereqs and impacket, pytest, crypto'
  85. - name: cache nghttpx
  86. uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
  87. id: cache-nghttpx
  88. env:
  89. cache-name: cache-nghttpx
  90. with:
  91. path: /home/runner/nghttpx
  92. key: ${{ runner.os }}-build-${{ env.cache-name }}-openssl-${{ env.openssl-version }}-nghttp3-${{ env.nghttp3-version }}-ngtcp2-${{ env.ngtcp2-version }}-nghttp2-${{ env.nghttp2-version }}
  93. - if: steps.cache-nghttpx.outputs.cache-hit != 'true'
  94. run: |
  95. git clone --quiet --depth=1 -b openssl-${{ env.openssl-version }} https://github.com/quictls/openssl
  96. cd openssl
  97. ./config --prefix=$HOME/nghttpx --libdir=$HOME/nghttpx/lib
  98. make -j1 install_sw
  99. name: 'install quictls'
  100. - if: steps.cache-nghttpx.outputs.cache-hit != 'true'
  101. run: |
  102. git clone --quiet --depth=1 -b v${{ env.nghttp3-version }} https://github.com/ngtcp2/nghttp3
  103. cd nghttp3
  104. git submodule update --init
  105. autoreconf -fi
  106. ./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-lib-only
  107. make install
  108. name: 'install nghttp3'
  109. - if: steps.cache-nghttpx.outputs.cache-hit != 'true'
  110. run: |
  111. git clone --quiet --depth=1 -b v${{ env.ngtcp2-version }} https://github.com/ngtcp2/ngtcp2
  112. cd ngtcp2
  113. autoreconf -fi
  114. ./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-lib-only --with-openssl
  115. make install
  116. name: 'install ngtcp2'
  117. - if: steps.cache-nghttpx.outputs.cache-hit != 'true'
  118. run: |
  119. git clone --quiet --depth=1 -b v${{ env.nghttp2-version }} https://github.com/nghttp2/nghttp2
  120. cd nghttp2
  121. autoreconf -fi
  122. ./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-http3
  123. make install
  124. name: 'install nghttp2'
  125. - name: cache quiche
  126. uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
  127. id: cache-quiche
  128. env:
  129. cache-name: cache-quiche
  130. with:
  131. path: /home/runner/quiche
  132. key: ${{ runner.os }}-build-${{ env.cache-name }}-quiche-${{ env.quiche-version }}
  133. - if: steps.cache-quiche.outputs.cache-hit != 'true'
  134. run: |
  135. cd $HOME
  136. git clone --quiet --depth=1 -b ${{ env.quiche-version }} --recursive https://github.com/cloudflare/quiche.git
  137. cd quiche
  138. #### Work-around https://github.com/curl/curl/issues/7927 #######
  139. #### See https://github.com/alexcrichton/cmake-rs/issues/131 ####
  140. sed -i -e 's/cmake = "0.1"/cmake = "=0.1.45"/' quiche/Cargo.toml
  141. cargo build -v --package quiche --release --features ffi,pkg-config-meta,qlog --verbose
  142. mkdir -v quiche/deps/boringssl/src/lib
  143. ln -vnf $(find target/release -name libcrypto.a -o -name libssl.a) quiche/deps/boringssl/src/lib/
  144. # include dir
  145. # /home/runner/quiche/quiche/deps/boringssl/src/include
  146. # lib dir
  147. # /home/runner/quiche/quiche/deps/boringssl/src/lib
  148. name: 'build quiche and boringssl'
  149. - name: cache mod_h2
  150. uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
  151. id: cache-mod_h2
  152. env:
  153. cache-name: cache-mod_h2
  154. with:
  155. path: /home/runner/mod_h2
  156. key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.mod_h2-version }}
  157. - if: steps.cache-mod_h2.outputs.cache-hit != 'true'
  158. run: |
  159. cd $HOME
  160. git clone --quiet --depth=1 -b v${{ env.mod_h2-version }} https://github.com/icing/mod_h2
  161. cd mod_h2
  162. autoreconf -fi
  163. ./configure
  164. make
  165. name: 'build mod_h2'
  166. - run: |
  167. cd $HOME/mod_h2
  168. sudo make install
  169. name: 'install mod_h2'
  170. - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
  171. - run: |
  172. sudo python3 -m pip install -r tests/requirements.txt -r tests/http/requirements.txt
  173. name: 'install python test prereqs'
  174. - run: autoreconf -fi
  175. name: 'autoreconf'
  176. - run: ./configure ${{ matrix.build.configure }}
  177. name: 'configure'
  178. - run: make V=1
  179. name: 'make'
  180. - run: make V=1 examples
  181. name: 'make examples'
  182. - run: make V=1 -C tests
  183. name: 'make tests'
  184. - run: make V=1 test-ci
  185. name: 'run tests'
  186. env:
  187. TFLAGS: "${{ matrix.build.tflags }}"
  188. - run: pytest -v tests
  189. name: 'run pytest'
  190. env:
  191. TFLAGS: "${{ matrix.build.tflags }}"
  192. CURL_CI: github