1# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 2# 3# SPDX-License-Identifier: curl 4 5name: quiche 6 7on: 8 push: 9 branches: 10 - master 11 - '*/ci' 12 paths-ignore: 13 - '**/*.md' 14 - '**/CMakeLists.txt' 15 - '.azure-pipelines.yml' 16 - '.circleci/**' 17 - '.cirrus.yml' 18 - 'appveyor.*' 19 - 'CMake/**' 20 - 'packages/**' 21 - 'plan9/**' 22 - 'projects/**' 23 - 'winbuild/**' 24 pull_request: 25 branches: 26 - master 27 paths-ignore: 28 - '**/*.md' 29 - '**/CMakeLists.txt' 30 - '.azure-pipelines.yml' 31 - '.circleci/**' 32 - '.cirrus.yml' 33 - 'appveyor.*' 34 - 'CMake/**' 35 - 'packages/**' 36 - 'plan9/**' 37 - 'projects/**' 38 - 'winbuild/**' 39 40concurrency: 41 # Hardcoded workflow filename as workflow name above is just Linux again 42 group: quiche-${{ github.event.pull_request.number || github.sha }} 43 cancel-in-progress: true 44 45permissions: {} 46 47env: 48 MAKEFLAGS: -j 3 49 # unhandled 50 openssl-version: 3.1.4+quic 51 # renovate: datasource=github-tags depName=ngtcp2/nghttp3 versioning=semver registryUrl=https://github.com 52 nghttp3-version: 1.3.0 53 # renovate: datasource=github-tags depName=ngtcp2/ngtcp2 versioning=semver registryUrl=https://github.com 54 ngtcp2-version: 1.5.0 55 # renovate: datasource=github-tags depName=nghttp2/nghttp2 versioning=semver registryUrl=https://github.com 56 nghttp2-version: 1.62.1 57 # renovate: datasource=github-tags depName=cloudflare/quiche versioning=semver registryUrl=https://github.com 58 quiche-version: 0.21.0 59 # renovate: datasource=github-tags depName=icing/mod_h2 versioning=semver registryUrl=https://github.com 60 mod_h2-version: 2.0.27 61 62jobs: 63 autotools: 64 name: ${{ matrix.build.name }} 65 runs-on: 'ubuntu-latest' 66 timeout-minutes: 60 67 strategy: 68 fail-fast: false 69 matrix: 70 build: 71 - name: quiche 72 install: >- 73 libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev libev-dev libc-ares-dev 74 install_steps: pytest 75 configure: >- 76 LDFLAGS="-Wl,-rpath,/home/runner/quiche/target/release" 77 --with-openssl=/home/runner/quiche/quiche/deps/boringssl/src 78 --enable-debug 79 --with-quiche=/home/runner/quiche/target/release 80 --with-test-nghttpx="$HOME/nghttpx/bin/nghttpx" 81 --with-ca-fallback 82 83 steps: 84 - run: | 85 sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list 86 sudo apt-get update 87 sudo apt-get install libtool autoconf automake pkg-config stunnel4 ${{ matrix.build.install }} 88 sudo apt-get install apache2 apache2-dev libnghttp2-dev 89 echo 'CC=gcc-12' >> $GITHUB_ENV 90 echo 'CXX=g++-12' >> $GITHUB_ENV 91 name: 'install prereqs and impacket, pytest, crypto' 92 93 - name: cache nghttpx 94 uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4 95 id: cache-nghttpx 96 env: 97 cache-name: cache-nghttpx 98 with: 99 path: /home/runner/nghttpx 100 key: ${{ runner.os }}-build-${{ env.cache-name }}-openssl-${{ env.openssl-version }}-nghttp3-${{ env.nghttp3-version }}-ngtcp2-${{ env.ngtcp2-version }}-nghttp2-${{ env.nghttp2-version }} 101 102 - if: steps.cache-nghttpx.outputs.cache-hit != 'true' 103 run: | 104 git clone --quiet --depth=1 -b openssl-${{ env.openssl-version }} https://github.com/quictls/openssl 105 cd openssl 106 ./config --prefix=$HOME/nghttpx --libdir=$HOME/nghttpx/lib 107 make -j1 install_sw 108 name: 'install quictls' 109 110 - if: steps.cache-nghttpx.outputs.cache-hit != 'true' 111 run: | 112 git clone --quiet --depth=1 -b v${{ env.nghttp3-version }} https://github.com/ngtcp2/nghttp3 113 cd nghttp3 114 git submodule update --init 115 autoreconf -fi 116 ./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-lib-only 117 make install 118 name: 'install nghttp3' 119 120 - if: steps.cache-nghttpx.outputs.cache-hit != 'true' 121 run: | 122 git clone --quiet --depth=1 -b v${{ env.ngtcp2-version }} https://github.com/ngtcp2/ngtcp2 123 cd ngtcp2 124 autoreconf -fi 125 ./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-lib-only --with-openssl 126 make install 127 name: 'install ngtcp2' 128 129 - if: steps.cache-nghttpx.outputs.cache-hit != 'true' 130 run: | 131 git clone --quiet --depth=1 -b v${{ env.nghttp2-version }} https://github.com/nghttp2/nghttp2 132 cd nghttp2 133 autoreconf -fi 134 ./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-http3 135 make install 136 name: 'install nghttp2' 137 138 - name: cache quiche 139 uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4 140 id: cache-quiche 141 env: 142 cache-name: cache-quiche 143 with: 144 path: /home/runner/quiche 145 key: ${{ runner.os }}-build-${{ env.cache-name }}-quiche-${{ env.quiche-version }} 146 147 - if: steps.cache-quiche.outputs.cache-hit != 'true' 148 run: | 149 cd $HOME 150 git clone --quiet --depth=1 -b ${{ env.quiche-version }} --recursive https://github.com/cloudflare/quiche.git 151 cd quiche 152 #### Work-around https://github.com/curl/curl/issues/7927 ####### 153 #### See https://github.com/alexcrichton/cmake-rs/issues/131 #### 154 sed -i -e 's/cmake = "0.1"/cmake = "=0.1.45"/' quiche/Cargo.toml 155 156 cargo build -v --package quiche --release --features ffi,pkg-config-meta,qlog --verbose 157 mkdir -v quiche/deps/boringssl/src/lib 158 ln -vnf $(find target/release -name libcrypto.a -o -name libssl.a) quiche/deps/boringssl/src/lib/ 159 160 # include dir 161 # /home/runner/quiche/quiche/deps/boringssl/src/include 162 # lib dir 163 # /home/runner/quiche/quiche/deps/boringssl/src/lib 164 name: 'build quiche and boringssl' 165 166 - name: cache mod_h2 167 uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4 168 id: cache-mod_h2 169 env: 170 cache-name: cache-mod_h2 171 with: 172 path: /home/runner/mod_h2 173 key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.mod_h2-version }} 174 175 - if: steps.cache-mod_h2.outputs.cache-hit != 'true' 176 run: | 177 cd $HOME 178 git clone --quiet --depth=1 -b v${{ env.mod_h2-version }} https://github.com/icing/mod_h2 179 cd mod_h2 180 autoreconf -fi 181 ./configure 182 make 183 name: 'build mod_h2' 184 185 - run: | 186 cd $HOME/mod_h2 187 sudo make install 188 name: 'install mod_h2' 189 190 - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 191 192 - run: | 193 sudo python3 -m pip install -r tests/requirements.txt -r tests/http/requirements.txt 194 name: 'install python test prereqs' 195 196 - run: autoreconf -fi 197 name: 'autoreconf' 198 199 - run: ./configure ${{ matrix.build.configure }} 200 name: 'configure' 201 202 - run: make V=1 203 name: 'make' 204 205 - run: make V=1 examples 206 name: 'make examples' 207 208 - run: make V=1 -C tests 209 name: 'make tests' 210 211 - run: make V=1 test-ci 212 name: 'run tests' 213 env: 214 TFLAGS: "${{ matrix.build.tflags }}" 215 216 - run: pytest -v tests 217 name: 'run pytest' 218 env: 219 TFLAGS: "${{ matrix.build.tflags }}" 220 CURL_CI: github 221