• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
2#
3# SPDX-License-Identifier: curl
4
5name: ngtcp2-linux
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: ngtcp2-${{ github.event.pull_request.number || github.sha }}
43  cancel-in-progress: true
44
45permissions: {}
46
47env:
48  MAKEFLAGS: -j 3
49  # unhandled
50  quictls-version: 3.1.4+quic
51  # renovate: datasource=github-tags depName=gnutls/gnutls versioning=semver registryUrl=https://github.com
52  gnutls-version: 3.8.5
53  wolfssl-version: master
54  # renovate: datasource=github-tags depName=ngtcp2/nghttp3 versioning=semver registryUrl=https://github.com
55  nghttp3-version: 1.3.0
56  # renovate: datasource=github-tags depName=ngtcp2/ngtcp2 versioning=semver registryUrl=https://github.com
57  ngtcp2-version: 1.5.0
58  # renovate: datasource=github-tags depName=nghttp2/nghttp2 versioning=semver registryUrl=https://github.com
59  nghttp2-version: 1.62.1
60  # renovate: datasource=github-tags depName=icing/mod_h2 versioning=semver registryUrl=https://github.com
61  mod_h2-version: 2.0.27
62
63jobs:
64  autotools:
65    name: ${{ matrix.build.name }}
66    runs-on: 'ubuntu-latest'
67    timeout-minutes: 60
68    strategy:
69      fail-fast: false
70      matrix:
71        build:
72          - name: quictls
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 --disable-ntlm
76              --with-test-nghttpx="$HOME/nghttpx/bin/nghttpx"
77              --with-openssl=$HOME/nghttpx
78          - name: gnutls
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-gnutls=$HOME/nghttpx
84          - name: wolfssl
85            configure: >-
86              PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" LDFLAGS="-Wl,-rpath,$HOME/nghttpx/lib"
87              --with-ngtcp2=$HOME/nghttpx --enable-warnings --enable-werror --enable-debug
88              --with-test-nghttpx="$HOME/nghttpx/bin/nghttpx"
89              --with-wolfssl=$HOME/nghttpx
90
91    steps:
92      - run: |
93          sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
94          sudo apt-get update
95          sudo apt-get install libtool autoconf automake pkg-config stunnel4 \
96            libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev libev-dev libc-ares-dev \
97            nettle-dev libp11-kit-dev libtspi-dev libunistring-dev guile-2.2-dev libtasn1-bin \
98            libtasn1-6-dev libidn2-0-dev gawk gperf libtss2-dev dns-root-data bison gtk-doc-tools \
99            texinfo texlive texlive-extra-utils autopoint libev-dev \
100            apache2 apache2-dev libnghttp2-dev
101          echo 'CC=gcc-12' >> $GITHUB_ENV
102          echo 'CXX=g++-12' >> $GITHUB_ENV
103        name: 'install prereqs and impacket, pytest, crypto, apache2'
104
105      - name: cache quictls
106        uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
107        id: cache-quictls-no-deprecated
108        env:
109          cache-name: cache-quictls-no-deprecated
110        with:
111          path: /home/runner/quictls
112          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.quictls-version }}
113
114      - if: steps.cache-quictls-no-deprecated.outputs.cache-hit != 'true'
115        run: |
116          cd $HOME
117          git clone --quiet --depth=1 -b openssl-${{ env.quictls-version }} https://github.com/quictls/openssl quictls
118          cd quictls
119          ./config no-deprecated --prefix=$HOME/nghttpx --libdir=$HOME/nghttpx/lib
120          make
121        name: 'build quictls'
122
123      - run: |
124          cd $HOME/quictls
125          make -j1 install_sw
126        name: 'install quictls'
127
128
129      - name: cache gnutls
130        uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
131        id: cache-gnutls
132        env:
133          cache-name: cache-gnutls
134        with:
135          path: /home/runner/gnutls
136          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.gnutls-version }}
137
138      - if: steps.cache-gnutls.outputs.cache-hit != 'true'
139        run: |
140          cd $HOME
141          git clone --quiet --depth=1 -b ${{ env.gnutls-version }} https://github.com/gnutls/gnutls.git
142          cd gnutls
143          ./bootstrap
144          ./configure  --prefix=$HOME/nghttpx \
145            PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" LDFLAGS="-Wl,-rpath,$HOME/nghttpx/lib -L$HOME/nghttpx/lib" \
146            --with-included-libtasn1 --with-included-unistring \
147            --disable-guile --disable-doc --disable-tests --disable-tools
148          make
149        name: 'build gnutls'
150
151      - run: |
152          cd $HOME/gnutls
153          make install
154        name: 'install gnutls'
155
156      - name: cache wolfssl
157        uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
158        id: cache-wolfssl
159        env:
160          cache-name: cache-wolfssl
161        with:
162          path: /home/runner/wolfssl
163          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.wolfssl-version }}
164
165      - if: steps.cache-wolfssl.outputs.cache-hit != 'true' || ${{ env.wolfssl-version }} == 'master'
166        run: |
167          cd $HOME
168          rm -rf wolfssl
169          git clone --quiet --depth=1 -b ${{ env.wolfssl-version }} https://github.com/wolfSSL/wolfssl.git
170          cd wolfssl
171          ./autogen.sh
172          ./configure --enable-all --enable-quic --prefix=$HOME/nghttpx
173          make
174        name: 'build wolfssl'
175
176      - run: |
177          cd $HOME/wolfssl
178          make install
179        name: 'install wolfssl'
180
181
182      - name: cache nghttp3
183        uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
184        id: cache-nghttp3
185        env:
186          cache-name: cache-nghttp3
187        with:
188          path: /home/runner/nghttp3
189          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.nghttp3-version }}
190
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
197          autoreconf -fi
198          ./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-lib-only
199          make
200        name: 'build nghttp3'
201
202      - run: |
203          cd $HOME/nghttp3
204          make install
205        name: 'install nghttp3'
206
207      # depends on all other cached libs built so far
208      - run: |
209          git clone --quiet --depth=1 -b v${{ env.ngtcp2-version }} https://github.com/ngtcp2/ngtcp2
210          cd ngtcp2
211          autoreconf -fi
212          ./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-lib-only --with-openssl --with-gnutls --with-wolfssl
213          make install
214        name: 'install ngtcp2'
215
216      # depends on all other cached libs built so far
217      - run: |
218          git clone --quiet --depth=1 -b v${{ env.nghttp2-version }} https://github.com/nghttp2/nghttp2
219          cd nghttp2
220          autoreconf -fi
221          ./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-http3
222          make install
223        name: 'install nghttp2'
224
225      - name: cache mod_h2
226        uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
227        id: cache-mod_h2
228        env:
229          cache-name: cache-mod_h2
230        with:
231          path: /home/runner/mod_h2
232          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.mod_h2-version }}
233
234      - if: steps.cache-mod_h2.outputs.cache-hit != 'true'
235        run: |
236          cd $HOME
237          git clone --quiet --depth=1 -b v${{ env.mod_h2-version }} https://github.com/icing/mod_h2
238          cd mod_h2
239          autoreconf -fi
240          ./configure
241          make
242        name: 'build mod_h2'
243
244      - run: |
245          cd $HOME/mod_h2
246          sudo make install
247        name: 'install mod_h2'
248
249      - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
250
251      - run: |
252          sudo python3 -m pip install -r tests/requirements.txt -r tests/http/requirements.txt
253        name: 'install python test prereqs'
254
255      - run: autoreconf -fi
256        name: 'autoreconf'
257
258      - run: ./configure ${{ matrix.build.configure }}
259        name: 'configure'
260
261      - run: make V=1
262        name: 'make'
263
264      - run: make V=1 examples
265        name: 'make examples'
266
267      - run: make V=1 -C tests
268        name: 'make tests'
269
270      - run: make V=1 test-ci
271        name: 'run tests'
272        env:
273          TFLAGS: "${{ matrix.build.tflags }}"
274
275      - run: pytest -v tests
276        name: 'run pytest'
277        env:
278          TFLAGS: "${{ matrix.build.tflags }}"
279          CURL_CI: github
280