http3-linux.yml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542
  1. # Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
  2. #
  3. # SPDX-License-Identifier: curl
  4. name: Linux HTTP/3
  5. 'on':
  6. push:
  7. branches:
  8. - master
  9. - '*/ci'
  10. paths-ignore:
  11. - '**/*.md'
  12. - '**/CMakeLists.txt'
  13. - '.circleci/**'
  14. - 'appveyor.*'
  15. - 'CMake/**'
  16. - 'packages/**'
  17. - 'plan9/**'
  18. - 'projects/**'
  19. - 'winbuild/**'
  20. pull_request:
  21. branches:
  22. - master
  23. paths-ignore:
  24. - '**/*.md'
  25. - '**/CMakeLists.txt'
  26. - '.circleci/**'
  27. - 'appveyor.*'
  28. - 'CMake/**'
  29. - 'packages/**'
  30. - 'plan9/**'
  31. - 'projects/**'
  32. - 'winbuild/**'
  33. concurrency:
  34. # Hardcoded workflow filename as workflow name above is just Linux again
  35. group: http3-${{ github.event.pull_request.number || github.sha }}
  36. cancel-in-progress: true
  37. permissions: {}
  38. env:
  39. MAKEFLAGS: -j 5
  40. # handled in renovate.json
  41. openssl-version: 3.4.0
  42. # handled in renovate.json
  43. quictls-version: 3.3.0
  44. # renovate: datasource=github-tags depName=gnutls/gnutls versioning=semver registryUrl=https://github.com
  45. gnutls-version: 3.8.8
  46. wolfssl-version: master
  47. # renovate: datasource=github-tags depName=ngtcp2/nghttp3 versioning=semver registryUrl=https://github.com
  48. nghttp3-version: 1.6.0
  49. # renovate: datasource=github-tags depName=ngtcp2/ngtcp2 versioning=semver registryUrl=https://github.com
  50. ngtcp2-version: 1.8.1
  51. # renovate: datasource=github-tags depName=nghttp2/nghttp2 versioning=semver registryUrl=https://github.com
  52. nghttp2-version: 1.64.0
  53. # renovate: datasource=github-tags depName=cloudflare/quiche versioning=semver registryUrl=https://github.com
  54. quiche-version: 0.22.0
  55. jobs:
  56. setup:
  57. runs-on: ubuntu-latest
  58. outputs:
  59. wolfssl-version: ${{ steps.wolfssl-version.outputs.result }}
  60. steps:
  61. - id: wolfssl-version
  62. uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
  63. with:
  64. result-encoding: string
  65. script: |
  66. let version = '${{ env.wolfssl-version }}'
  67. if (version != 'master') {
  68. return version
  69. }
  70. let { data: commits } = await github.rest.repos.listCommits({
  71. owner: 'wolfSSL',
  72. repo: 'wolfssl',
  73. })
  74. return commits[0].sha
  75. build-cache:
  76. needs:
  77. - setup
  78. runs-on: ubuntu-latest
  79. steps:
  80. - name: cache quictls
  81. uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
  82. id: cache-quictls-no-deprecated
  83. env:
  84. cache-name: cache-quictls-no-deprecated
  85. with:
  86. path: /home/runner/quictls/build
  87. key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.quictls-version }}-quic1
  88. - name: cache gnutls
  89. uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
  90. id: cache-gnutls
  91. env:
  92. cache-name: cache-gnutls
  93. with:
  94. path: /home/runner/gnutls/build
  95. key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.gnutls-version }}
  96. - name: cache wolfssl
  97. uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
  98. id: cache-wolfssl
  99. env:
  100. cache-name: cache-wolfssl
  101. wolfssl-version: ${{ needs.setup.outputs.wolfssl-version }}
  102. with:
  103. path: /home/runner/wolfssl/build
  104. key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.wolfssl-version }}
  105. - name: cache nghttp3
  106. uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
  107. id: cache-nghttp3
  108. env:
  109. cache-name: cache-nghttp3
  110. with:
  111. path: /home/runner/nghttp3/build
  112. key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.nghttp3-version }}
  113. - name: cache ngtcp2
  114. uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
  115. id: cache-ngtcp2
  116. env:
  117. cache-name: cache-ngtcp2
  118. with:
  119. path: /home/runner/ngtcp2/build
  120. key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.ngtcp2-version }}
  121. - name: cache nghttp2
  122. uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
  123. id: cache-nghttp2
  124. env:
  125. cache-name: cache-nghttp2
  126. with:
  127. path: /home/runner/nghttp2/build
  128. key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.nghttp2-version }}
  129. - id: settings
  130. if: |
  131. steps.cache-quictls-no-deprecated.outputs.cache-hit != 'true' ||
  132. steps.cache-gnutls.outputs.cache-hit != 'true' ||
  133. steps.cache-wolfssl.outputs.cache-hit != 'true' ||
  134. steps.cache-nghttp3.outputs.cache-hit != 'true' ||
  135. steps.cache-ngtcp2.outputs.cache-hit != 'true' ||
  136. steps.cache-nghttp2.outputs.cache-hit != 'true'
  137. run: |
  138. echo 'needs-build=true' >> $GITHUB_OUTPUT
  139. - name: install build prereqs
  140. if: steps.settings.outputs.needs-build == 'true'
  141. run: |
  142. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  143. sudo apt-get update -y
  144. sudo apt-get install -y --no-install-suggests --no-install-recommends \
  145. libtool autoconf automake pkgconf stunnel4 \
  146. libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev libev-dev libc-ares-dev \
  147. nettle-dev libp11-kit-dev libtspi-dev libunistring-dev guile-2.2-dev libtasn1-bin \
  148. libtasn1-6-dev libidn2-0-dev gawk gperf libtss2-dev dns-root-data bison gtk-doc-tools \
  149. texinfo texlive texlive-extra-utils autopoint libev-dev \
  150. apache2 apache2-dev libnghttp2-dev
  151. echo 'CC=gcc-12' >> $GITHUB_ENV
  152. echo 'CXX=g++-12' >> $GITHUB_ENV
  153. - if: steps.cache-quictls-no-deprecated.outputs.cache-hit != 'true'
  154. run: |
  155. cd $HOME
  156. git clone --quiet --depth=1 -b openssl-${{ env.quictls-version }}-quic1 https://github.com/quictls/openssl quictls
  157. cd quictls
  158. ./config no-deprecated --prefix=$PWD/build --libdir=lib
  159. make
  160. make -j1 install_sw
  161. name: 'build quictls'
  162. - if: steps.cache-gnutls.outputs.cache-hit != 'true'
  163. run: |
  164. cd $HOME
  165. git clone --quiet --depth=1 -b ${{ env.gnutls-version }} https://github.com/gnutls/gnutls.git
  166. cd gnutls
  167. ./bootstrap
  168. ./configure --disable-dependency-tracking --prefix=$PWD/build \
  169. LDFLAGS="-Wl,-rpath,$PWD/build/lib -L$PWD/build/lib" \
  170. --with-included-libtasn1 --with-included-unistring \
  171. --disable-guile --disable-doc --disable-tests --disable-tools
  172. make
  173. make install
  174. name: 'build gnutls'
  175. - if: steps.cache-wolfssl.outputs.cache-hit != 'true'
  176. env:
  177. wolfssl-version: ${{ needs.setup.outputs.wolfssl-version }}
  178. run: |
  179. cd $HOME
  180. mkdir wolfssl
  181. cd wolfssl
  182. git init
  183. git remote add origin https://github.com/wolfSSL/wolfssl.git
  184. git fetch origin --depth=1 ${{ env.wolfssl-version }}
  185. git checkout ${{ env.wolfssl-version }}
  186. ./autogen.sh
  187. ./configure --disable-dependency-tracking --enable-all --enable-quic --prefix=$PWD/build
  188. make
  189. make install
  190. name: 'build wolfssl'
  191. - if: steps.cache-nghttp3.outputs.cache-hit != 'true'
  192. run: |
  193. cd $HOME
  194. git clone --quiet --depth=1 -b v${{ env.nghttp3-version }} https://github.com/ngtcp2/nghttp3
  195. cd nghttp3
  196. git submodule update --init --depth=1
  197. autoreconf -fi
  198. ./configure --disable-dependency-tracking --prefix=$PWD/build PKG_CONFIG_PATH="$PWD/build/lib/pkgconfig" --enable-lib-only
  199. make
  200. make install
  201. name: 'build nghttp3'
  202. - if: steps.cache-ngtcp2.outputs.cache-hit != 'true'
  203. run: |
  204. cd $HOME
  205. git clone --quiet --depth=1 -b v${{ env.ngtcp2-version }} https://github.com/ngtcp2/ngtcp2
  206. cd ngtcp2
  207. autoreconf -fi
  208. ./configure --disable-dependency-tracking --prefix=$PWD/build \
  209. PKG_CONFIG_PATH="$PWD/build/lib/pkgconfig:$HOME/quictls/build/lib/pkgconfig:$HOME/gnutls/build/lib/pkgconfig:$HOME/wolfssl/build/lib/pkgconfig:$HOME/nghttp3/build/lib/pkgconfig" \
  210. --enable-lib-only --with-openssl --with-gnutls --with-wolfssl
  211. make install
  212. name: 'build ngtcp2'
  213. - if: steps.cache-nghttp2.outputs.cache-hit != 'true'
  214. run: |
  215. cd $HOME
  216. git clone --quiet --depth=1 -b v${{ env.nghttp2-version }} https://github.com/nghttp2/nghttp2
  217. cd nghttp2
  218. autoreconf -fi
  219. ./configure --disable-dependency-tracking --prefix=$PWD/build \
  220. PKG_CONFIG_PATH="$HOME/build/lib/pkgconfig:$HOME/quictls/build/lib/pkgconfig:$HOME/nghttp3/build/lib/pkgconfig:$HOME/ngtcp2/build/lib/pkgconfig" \
  221. LDFLAGS="-Wl,-rpath,$HOME/quictls/build/lib" \
  222. --enable-http3
  223. make install
  224. name: 'build nghttp2'
  225. linux:
  226. name: ${{ matrix.build.generate && 'CM' || 'AM' }} ${{ matrix.build.name }}
  227. needs:
  228. - setup
  229. - build-cache
  230. runs-on: 'ubuntu-24.04'
  231. timeout-minutes: 45
  232. strategy:
  233. fail-fast: false
  234. matrix:
  235. build:
  236. - name: quictls
  237. PKG_CONFIG_PATH: '$HOME/quictls/build/lib/pkgconfig:$HOME/nghttp3/build/lib/pkgconfig:$HOME/ngtcp2/build/lib/pkgconfig:$HOME/nghttp2/build/lib/pkgconfig'
  238. configure: >-
  239. LDFLAGS="-Wl,-rpath,$HOME/quictls/build/lib"
  240. --with-ngtcp2=$HOME/ngtcp2/build --enable-warnings --enable-werror --enable-debug --disable-ntlm
  241. --with-test-nghttpx="$HOME/nghttp2/build/bin/nghttpx"
  242. --with-openssl=$HOME/quictls/build
  243. - name: gnutls
  244. PKG_CONFIG_PATH: '$HOME/gnutls/build/lib/pkgconfig:$HOME/nghttp3/build/lib/pkgconfig:$HOME/ngtcp2/build/lib/pkgconfig:$HOME/nghttp2/build/lib/pkgconfig'
  245. configure: >-
  246. LDFLAGS="-Wl,-rpath,$HOME/gnutls/build/lib"
  247. --with-ngtcp2=$HOME/ngtcp2/build --enable-warnings --enable-werror --enable-debug
  248. --with-test-nghttpx="$HOME/nghttp2/build/bin/nghttpx"
  249. --with-gnutls=$HOME/gnutls/build
  250. - name: wolfssl
  251. PKG_CONFIG_PATH: '$HOME/wolfssl/build/lib/pkgconfig:$HOME/nghttp3/build/lib/pkgconfig:$HOME/ngtcp2/build/lib/pkgconfig:$HOME/nghttp2/build/lib/pkgconfig'
  252. configure: >-
  253. LDFLAGS="-Wl,-rpath,$HOME/wolfssl/build/lib"
  254. --with-ngtcp2=$HOME/ngtcp2/build --enable-warnings --enable-werror --enable-debug
  255. --with-test-nghttpx="$HOME/nghttp2/build/bin/nghttpx"
  256. --with-wolfssl=$HOME/wolfssl/build
  257. - name: wolfssl
  258. PKG_CONFIG_PATH: '$HOME/wolfssl/build/lib/pkgconfig:$HOME/nghttp3/build/lib/pkgconfig:$HOME/ngtcp2/build/lib/pkgconfig:$HOME/nghttp2/build/lib/pkgconfig'
  259. generate: >-
  260. -DCURL_USE_WOLFSSL=ON -DUSE_NGTCP2=ON -DENABLE_DEBUG=ON
  261. -DTEST_NGHTTPX="$HOME/nghttp2/build/bin/nghttpx"
  262. -DHTTPD_NGHTTPX="$HOME/nghttp2/build/bin/nghttpx"
  263. - name: openssl-quic
  264. PKG_CONFIG_PATH: '$HOME/openssl/build/lib64/pkgconfig'
  265. configure: >-
  266. LDFLAGS="-Wl,-rpath,$HOME/openssl/build/lib64"
  267. --enable-warnings --enable-werror --enable-debug --disable-ntlm
  268. --with-test-nghttpx="$HOME/nghttp2/build/bin/nghttpx"
  269. --with-openssl=$HOME/openssl/build --with-openssl-quic
  270. --with-nghttp3=$HOME/nghttp3/build
  271. - name: quiche
  272. configure: >-
  273. LDFLAGS="-Wl,-rpath,$HOME/quiche/target/release"
  274. --with-openssl=$HOME/quiche/quiche/deps/boringssl/src
  275. --enable-warnings --enable-werror --enable-debug
  276. --with-quiche=$HOME/quiche/target/release
  277. --with-test-nghttpx="$HOME/nghttp2/build/bin/nghttpx"
  278. --with-ca-fallback
  279. - name: quiche
  280. PKG_CONFIG_PATH: '$HOME/quiche/target/release'
  281. generate: >-
  282. -DOPENSSL_ROOT_DIR=$HOME/quiche/quiche/deps/boringssl/src -DENABLE_DEBUG=ON
  283. -DUSE_QUICHE=ON
  284. -DTEST_NGHTTPX="$HOME/nghttp2/build/bin/nghttpx"
  285. -DHTTPD_NGHTTPX="$HOME/nghttp2/build/bin/nghttpx"
  286. -DCURL_CA_FALLBACK=ON
  287. steps:
  288. - run: |
  289. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  290. sudo apt-get update -y
  291. sudo apt-get install -y --no-install-suggests --no-install-recommends \
  292. libtool autoconf automake ninja-build pkgconf stunnel4 \
  293. libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev libev-dev libc-ares-dev \
  294. nettle-dev libp11-kit-dev libtspi-dev libunistring-dev guile-2.2-dev libtasn1-bin \
  295. libtasn1-6-dev libidn2-0-dev gawk gperf libtss2-dev dns-root-data bison gtk-doc-tools \
  296. texinfo texlive texlive-extra-utils autopoint libev-dev \
  297. apache2 apache2-dev libnghttp2-dev vsftpd
  298. python3 -m venv $HOME/venv
  299. echo 'CC=gcc-12' >> $GITHUB_ENV
  300. echo 'CXX=g++-12' >> $GITHUB_ENV
  301. name: 'install prereqs'
  302. - name: cache quictls
  303. uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
  304. id: cache-quictls-no-deprecated
  305. env:
  306. cache-name: cache-quictls-no-deprecated
  307. with:
  308. path: /home/runner/quictls/build
  309. key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.quictls-version }}
  310. fail-on-cache-miss: true
  311. - name: cache gnutls
  312. if: matrix.build.name == 'gnutls'
  313. uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
  314. id: cache-gnutls
  315. env:
  316. cache-name: cache-gnutls
  317. with:
  318. path: /home/runner/gnutls/build
  319. key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.gnutls-version }}
  320. fail-on-cache-miss: true
  321. - name: cache wolfssl
  322. if: matrix.build.name == 'wolfssl'
  323. uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
  324. id: cache-wolfssl
  325. env:
  326. cache-name: cache-wolfssl
  327. wolfssl-version: ${{ needs.setup.outputs.wolfssl-version }}
  328. with:
  329. path: /home/runner/wolfssl/build
  330. key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.wolfssl-version }}
  331. fail-on-cache-miss: true
  332. - name: cache nghttp3
  333. uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
  334. id: cache-nghttp3
  335. env:
  336. cache-name: cache-nghttp3
  337. with:
  338. path: /home/runner/nghttp3/build
  339. key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.nghttp3-version }}
  340. fail-on-cache-miss: true
  341. - name: cache ngtcp2
  342. uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
  343. id: cache-ngtcp2
  344. env:
  345. cache-name: cache-ngtcp2
  346. with:
  347. path: /home/runner/ngtcp2/build
  348. key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.ngtcp2-version }}
  349. fail-on-cache-miss: true
  350. - name: cache nghttp2
  351. uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
  352. id: cache-nghttp2
  353. env:
  354. cache-name: cache-nghttp2
  355. with:
  356. path: /home/runner/nghttp2/build
  357. key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.nghttp2-version }}
  358. fail-on-cache-miss: true
  359. - name: cache openssl
  360. if: matrix.build.name == 'openssl-quic'
  361. uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
  362. id: cache-openssl
  363. env:
  364. cache-name: cache-openssl
  365. with:
  366. path: /home/runner/openssl/build
  367. key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.openssl-version }}
  368. - name: 'install openssl'
  369. if: matrix.build.name == 'openssl-quic' && steps.cache-openssl.outputs.cache-hit != 'true'
  370. run: |
  371. git clone --quiet --depth=1 -b openssl-${{ env.openssl-version }} https://github.com/openssl/openssl
  372. cd openssl
  373. ./config --prefix=$HOME/openssl/build
  374. make -j1 install_sw
  375. cat exporters/openssl.pc
  376. - name: cache quiche
  377. if: matrix.build.name == 'quiche'
  378. uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
  379. id: cache-quiche
  380. env:
  381. cache-name: cache-quiche
  382. with:
  383. path: /home/runner/quiche
  384. key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.quiche-version }}
  385. - if: matrix.build.name == 'quiche' && steps.cache-quiche.outputs.cache-hit != 'true'
  386. run: |
  387. cd $HOME
  388. git clone --quiet --depth=1 -b ${{ env.quiche-version }} --recursive https://github.com/cloudflare/quiche.git
  389. cd quiche
  390. #### Work-around https://github.com/curl/curl/issues/7927 #######
  391. #### See https://github.com/alexcrichton/cmake-rs/issues/131 ####
  392. sed -i -e 's/cmake = "0.1"/cmake = "=0.1.45"/' quiche/Cargo.toml
  393. cargo build -v --package quiche --release --features ffi,pkg-config-meta,qlog --verbose
  394. ln -s libquiche.so target/release/libquiche.so.0
  395. mkdir -v quiche/deps/boringssl/src/lib
  396. ln -vnf $(find target/release -name libcrypto.a -o -name libssl.a) quiche/deps/boringssl/src/lib/
  397. # include dir
  398. # $HOME/quiche/quiche/deps/boringssl/src/include
  399. # lib dir
  400. # $HOME/quiche/quiche/deps/boringssl/src/lib
  401. name: 'build quiche and boringssl'
  402. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
  403. - run: autoreconf -fi
  404. if: ${{ matrix.build.configure }}
  405. name: 'autoreconf'
  406. - name: 'configure'
  407. run: |
  408. if [ -n '${{ matrix.build.PKG_CONFIG_PATH }}' ]; then
  409. export PKG_CONFIG_PATH="${{ matrix.build.PKG_CONFIG_PATH }}"
  410. fi
  411. if [ -n '${{ matrix.build.generate }}' ]; then
  412. cmake -B . -G Ninja \
  413. -DCMAKE_C_COMPILER_TARGET=$(uname -m)-pc-linux-gnu -DBUILD_STATIC_LIBS=ON \
  414. -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON -DCURL_WERROR=ON \
  415. -DCURL_BROTLI=ON -DCURL_ZSTD=ON \
  416. ${{ matrix.build.generate }}
  417. else
  418. ./configure --disable-dependency-tracking --enable-unity --enable-test-bundles --enable-warnings --enable-werror \
  419. ${{ matrix.build.configure }}
  420. fi
  421. - name: 'configure log'
  422. if: ${{ !cancelled() }}
  423. run: cat config.log CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true
  424. - name: 'curl_config.h'
  425. run: |
  426. echo '::group::raw'; cat lib/curl_config.h || true; echo '::endgroup::'
  427. grep -F '#define' lib/curl_config.h | sort || true
  428. - name: 'test configs'
  429. run: |
  430. cat tests/config || true
  431. cat tests/http/config.ini || true
  432. - name: 'build'
  433. run: |
  434. if [ -n '${{ matrix.build.generate }}' ]; then
  435. cmake --build . --verbose
  436. else
  437. make V=1
  438. fi
  439. - run: ./src/curl -V
  440. name: 'check curl -V output'
  441. - name: 'build tests'
  442. run: |
  443. if [ -n '${{ matrix.build.generate }}' ]; then
  444. cmake --build . --verbose --target testdeps
  445. else
  446. make V=1 -C tests
  447. fi
  448. - name: 'install test prereqs'
  449. run: |
  450. source $HOME/venv/bin/activate
  451. python3 -m pip install -r tests/requirements.txt
  452. - name: 'run tests'
  453. env:
  454. TFLAGS: "${{ matrix.build.tflags }}"
  455. run: |
  456. source $HOME/venv/bin/activate
  457. if [ -n '${{ matrix.build.generate }}' ]; then
  458. cmake --build . --verbose --target test-ci
  459. else
  460. make V=1 test-ci
  461. fi
  462. - name: 'install pytest prereqs'
  463. run: |
  464. source $HOME/venv/bin/activate
  465. python3 -m pip install -r tests/http/requirements.txt
  466. - name: 'run pytest'
  467. env:
  468. TFLAGS: "${{ matrix.build.tflags }}"
  469. CURL_CI: github
  470. run: |
  471. source $HOME/venv/bin/activate
  472. if [ -n '${{ matrix.build.generate }}' ]; then
  473. cmake --build . --verbose --target curl-pytest-ci
  474. else
  475. make V=1 pytest-ci
  476. fi
  477. - name: 'build examples'
  478. run: |
  479. if [ -n '${{ matrix.build.generate }}' ]; then
  480. cmake --build . --verbose --target curl-examples
  481. else
  482. make V=1 examples
  483. fi