summaryrefslogtreecommitdiffstats
path: root/.github/workflows/build.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/build.yml')
-rw-r--r--.github/workflows/build.yml136
1 files changed, 90 insertions, 46 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 7728f0b..2b21273 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -8,16 +8,16 @@ env:
LIBBPF_VERSION: v1.3.0
OPENSSL1_VERSION: 1_1_1w+quic
OPENSSL3_VERSION: 3.1.5+quic
- BORINGSSL_VERSION: fae0964b3d44e94ca2a2d21f86e61dabe683d130
- AWSLC_VERSION: v1.23.0
- NGHTTP3_VERSION: v1.2.0
- NGTCP2_VERSION: v1.4.0
+ BORINGSSL_VERSION: 6ab7c1482bf4cdc91c87bc512aaf68ffb18975ec
+ AWSLC_VERSION: v1.26.0
+ NGHTTP3_VERSION: v1.3.0
+ NGTCP2_VERSION: v1.5.0
jobs:
build-cache:
strategy:
matrix:
- os: [ubuntu-22.04, macos-12]
+ os: [ubuntu-22.04, macos-13, macos-14]
runs-on: ${{ matrix.os }}
@@ -30,19 +30,19 @@ jobs:
if: runner.os == 'Linux'
with:
path: libbpf/build
- key: ${{ runner.os }}-libbpf-${{ env.LIBBPF_VERSION }}
+ key: ${{ matrix.os }}-libbpf-${{ env.LIBBPF_VERSION }}
- name: Restore OpenSSL v1.1.1 cache
id: cache-openssl1
uses: actions/cache@v4
with:
path: openssl1/build
- key: ${{ runner.os }}-openssl-${{ env.OPENSSL1_VERSION }}
+ key: ${{ matrix.os }}-openssl-${{ env.OPENSSL1_VERSION }}
- name: Restore OpenSSL v3.x cache
id: cache-openssl3
uses: actions/cache@v4
with:
path: openssl3/build
- key: ${{ runner.os }}-openssl-${{ env.OPENSSL3_VERSION }}
+ key: ${{ matrix.os }}-openssl-${{ env.OPENSSL3_VERSION }}
- name: Restore BoringSSL cache
id: cache-boringssl
uses: actions/cache@v4
@@ -51,7 +51,7 @@ jobs:
boringssl/build/crypto/libcrypto.a
boringssl/build/ssl/libssl.a
boringssl/include
- key: ${{ runner.os }}-boringssl-${{ env.BORINGSSL_VERSION }}
+ key: ${{ matrix.os }}-boringssl-${{ env.BORINGSSL_VERSION }}
- name: Restore aws-lc cache
id: cache-awslc
uses: actions/cache@v4
@@ -60,25 +60,25 @@ jobs:
aws-lc/build/crypto/libcrypto.a
aws-lc/build/ssl/libssl.a
aws-lc/include
- key: ${{ runner.os }}-awslc-${{ env.AWSLC_VERSION }}
+ key: ${{ matrix.os }}-awslc-${{ env.AWSLC_VERSION }}
- name: Restore nghttp3 cache
id: cache-nghttp3
uses: actions/cache@v4
with:
path: nghttp3/build
- key: ${{ runner.os }}-nghttp3-${{ env.NGHTTP3_VERSION }}
+ key: ${{ matrix.os }}-nghttp3-${{ env.NGHTTP3_VERSION }}
- name: Restore ngtcp2 + quictls/openssl v1.1.1 cache
id: cache-ngtcp2-openssl1
uses: actions/cache@v4
with:
path: ngtcp2-openssl1/build
- key: ${{ runner.os }}-ngtcp2-${{ env.NGTCP2_VERSION }}-openssl-${{ env.OPENSSL1_VERSION }}
+ key: ${{ matrix.os }}-ngtcp2-${{ env.NGTCP2_VERSION }}-openssl-${{ env.OPENSSL1_VERSION }}
- name: Restore ngtcp2 + quictls/openssl v3.x cache
id: cache-ngtcp2-openssl3
uses: actions/cache@v4
with:
path: ngtcp2-openssl3/build
- key: ${{ runner.os }}-ngtcp2-${{ env.NGTCP2_VERSION }}-openssl-${{ env.OPENSSL3_VERSION }}
+ key: ${{ matrix.os }}-ngtcp2-${{ env.NGTCP2_VERSION }}-openssl-${{ env.OPENSSL3_VERSION }}
- id: settings
if: |
(steps.cache-libbpf.outputs.cache-hit != 'true' && runner.os == 'Linux') ||
@@ -198,33 +198,50 @@ jobs:
strategy:
matrix:
- os: [ubuntu-22.04, macos-12]
+ os: [ubuntu-22.04, macos-13, macos-14]
compiler: [gcc, clang]
buildtool: [autotools, cmake]
http3: [http3, no-http3]
openssl: [openssl1, openssl3, boringssl, awslc]
exclude:
- - os: macos-12
+ - os: macos-13
+ openssl: openssl3
+ - os: macos-14
openssl: openssl3
- http3: no-http3
openssl: openssl3
- - os: macos-12
+ - os: macos-13
+ compiler: gcc
+ - os: macos-14
compiler: gcc
- # disable macos cmake because of include path issue
- os: macos-12
+ os: macos-13
buildtool: cmake
- - os: macos-12
+ - # disable macos cmake because of include path issue
+ os: macos-14
+ buildtool: cmake
+ - os: macos-13
+ openssl: boringssl
+ - os: macos-14
openssl: boringssl
- openssl: boringssl
buildtool: cmake
- openssl: boringssl
compiler: gcc
- - os: macos-12
+ - os: macos-13
+ openssl: awslc
+ - os: macos-14
openssl: awslc
- openssl: awslc
buildtool: cmake
- openssl: awslc
compiler: gcc
+ include:
+ - os: ubuntu-22.04
+ compiler: clang
+ buildtool: distcheck
+ http3: http3
+ openssl: awslc
runs-on: ${{ matrix.os }}
@@ -294,6 +311,8 @@ jobs:
run: |
echo 'CC=gcc-12' >> $GITHUB_ENV
echo 'CXX=g++-12' >> $GITHUB_ENV
+ # g++-12 is known to produce false positive warnings.
+ echo 'CXXFLAGS=-Wno-restrict' >> $GITHUB_ENV
- name: Setup gcc (MacOS)
if: runner.os == 'macOS' && matrix.compiler == 'gcc'
run: |
@@ -304,7 +323,7 @@ jobs:
if: matrix.http3 == 'http3' && matrix.compiler == 'clang' && runner.os == 'Linux'
with:
path: libbpf/build
- key: ${{ runner.os }}-libbpf-${{ env.LIBBPF_VERSION }}
+ key: ${{ matrix.os }}-libbpf-${{ env.LIBBPF_VERSION }}
fail-on-cache-miss: true
- name: Set libbpf variables
if: matrix.http3 == 'http3' && matrix.compiler == 'clang' && runner.os == 'Linux'
@@ -316,19 +335,27 @@ jobs:
echo 'EXTRA_AUTOTOOLS_OPTS='"$EXTRA_AUTOTOOLS_OPTS" >> $GITHUB_ENV
echo 'EXTRA_CMAKE_OPTS='"$EXTRA_CMAKE_OPTS" >> $GITHUB_ENV
+ - name: Setup libev variables
+ if: matrix.os == 'macos-14'
+ run: |
+ LIBEV_CFLAGS="-I/opt/homebrew/Cellar/libev/4.33/include"
+ LIBEV_LIBS="-L/opt/homebrew/Cellar/libev/4.33/lib -lev"
+
+ echo 'LIBEV_CFLAGS='"$LIBEV_CFLAGS" >> $GITHUB_ENV
+ echo 'LIBEV_LIBS='"$LIBEV_LIBS" >> $GITHUB_ENV
- name: Restore quictls/openssl v1.1.1 cache
uses: actions/cache/restore@v4
- if: matrix.http3 == 'http3' && matrix.openssl == 'openssl1'
+ if: matrix.openssl == 'openssl1'
with:
path: openssl1/build
- key: ${{ runner.os }}-openssl-${{ env.OPENSSL1_VERSION }}
+ key: ${{ matrix.os }}-openssl-${{ env.OPENSSL1_VERSION }}
fail-on-cache-miss: true
- name: Restore quictls/openssl v3.x cache
uses: actions/cache/restore@v4
- if: matrix.http3 == 'http3' && matrix.openssl == 'openssl3'
+ if: matrix.openssl == 'openssl3'
with:
path: openssl3/build
- key: ${{ runner.os }}-openssl-${{ env.OPENSSL3_VERSION }}
+ key: ${{ matrix.os }}-openssl-${{ env.OPENSSL3_VERSION }}
fail-on-cache-miss: true
- name: Restore BoringSSL cache
uses: actions/cache/restore@v4
@@ -338,7 +365,7 @@ jobs:
boringssl/build/crypto/libcrypto.a
boringssl/build/ssl/libssl.a
boringssl/include
- key: ${{ runner.os }}-boringssl-${{ env.BORINGSSL_VERSION }}
+ key: ${{ matrix.os }}-boringssl-${{ env.BORINGSSL_VERSION }}
fail-on-cache-miss: true
- name: Restore aws-lc cache
uses: actions/cache/restore@v4
@@ -348,7 +375,7 @@ jobs:
aws-lc/build/crypto/libcrypto.a
aws-lc/build/ssl/libssl.a
aws-lc/include
- key: ${{ runner.os }}-awslc-${{ env.AWSLC_VERSION }}
+ key: ${{ matrix.os }}-awslc-${{ env.AWSLC_VERSION }}
fail-on-cache-miss: true
- name: Set BoringSSL variables
if: matrix.openssl == 'boringssl'
@@ -383,22 +410,30 @@ jobs:
if: matrix.http3 == 'http3'
with:
path: nghttp3/build
- key: ${{ runner.os }}-nghttp3-${{ env.NGHTTP3_VERSION }}
+ key: ${{ matrix.os }}-nghttp3-${{ env.NGHTTP3_VERSION }}
fail-on-cache-miss: true
- name: Restore ngtcp2 + quictls/openssl v1.1.1 cache + BoringSSL
uses: actions/cache/restore@v4
if: matrix.http3 == 'http3' && (matrix.openssl == 'openssl1' || matrix.openssl == 'boringssl')
with:
path: ngtcp2-openssl1/build
- key: ${{ runner.os }}-ngtcp2-${{ env.NGTCP2_VERSION }}-openssl-${{ env.OPENSSL1_VERSION }}
+ key: ${{ matrix.os }}-ngtcp2-${{ env.NGTCP2_VERSION }}-openssl-${{ env.OPENSSL1_VERSION }}
fail-on-cache-miss: true
- name: Restore ngtcp2 + quictls/openssl v3.x cache + aws-lc
uses: actions/cache/restore@v4
if: matrix.http3 == 'http3' && (matrix.openssl == 'openssl3' || matrix.openssl == 'awslc')
with:
path: ngtcp2-openssl3/build
- key: ${{ runner.os }}-ngtcp2-${{ env.NGTCP2_VERSION }}-openssl-${{ env.OPENSSL3_VERSION }}
+ key: ${{ matrix.os }}-ngtcp2-${{ env.NGTCP2_VERSION }}-openssl-${{ env.OPENSSL3_VERSION }}
fail-on-cache-miss: true
+ - name: Setup extra environment variables
+ if: matrix.http3 == 'no-http3'
+ run: |
+ PKG_CONFIG_PATH="$PWD/openssl1/build/lib/pkgconfig:$PWD/openssl3/build/lib/pkgconfig"
+ LDFLAGS="$LDFLAGS -Wl,-rpath,$PWD/openssl1/build/lib -Wl,-rpath,$PWD/openssl3/build/lib"
+
+ echo 'PKG_CONFIG_PATH='"$PKG_CONFIG_PATH" >> $GITHUB_ENV
+ echo 'LDFLAGS='"$LDFLAGS" >> $GITHUB_ENV
- name: Setup extra environment variables for HTTP/3
if: matrix.http3 == 'http3'
run: |
@@ -415,55 +450,64 @@ jobs:
run: |
autoreconf -i
./configure
- - name: Configure cmake (Linux)
- if: matrix.buildtool == 'cmake' && runner.os == 'Linux'
+ - name: Make distribution and unpack
+ if: matrix.buildtool != 'distcheck'
run: |
make dist
VERSION=$(grep PACKAGE_VERSION config.h | cut -d' ' -f3 | tr -d '"')
tar xf nghttp2-$VERSION.tar.gz
cd nghttp2-$VERSION
- echo 'NGHTTP2_CMAKE_DIR='"$PWD" >> $GITHUB_ENV
+ echo 'NGHTTP2_BUILD_DIR='"$PWD" >> $GITHUB_ENV
+ - name: Configure cmake (Linux)
+ if: matrix.buildtool == 'cmake' && runner.os == 'Linux'
+ run: |
+ cd $NGHTTP2_BUILD_DIR
cmake -DENABLE_WERROR=1 -DWITH_MRUBY=1 -DWITH_NEVERBLEED=1 -DENABLE_APP=1 $EXTRA_CMAKE_OPTS -DCPPFLAGS="$CPPFLAGS" -DLDFLAGS="$LDFLAGS" -DBUILD_STATIC_LIBS=ON -DBUILD_TESTING=ON .
- name: Configure cmake (MacOS)
if: matrix.buildtool == 'cmake' && runner.os == 'macOS'
run: |
- make dist
- VERSION=$(grep PACKAGE_VERSION config.h | cut -d' ' -f3 | tr -d '"')
- tar xf nghttp2-$VERSION.tar.gz
- cd nghttp2-$VERSION
- echo 'NGHTTP2_CMAKE_DIR='"$PWD" >> $GITHUB_ENV
-
# This fixes infamous 'stdio.h not found' error.
echo 'SDKROOT='"$(xcrun --sdk macosx --show-sdk-path)" >> $GITHUB_ENV
+ cd $NGHTTP2_BUILD_DIR
+
cmake -DENABLE_WERROR=1 -DWITH_MRUBY=1 -DENABLE_APP=1 $EXTRA_CMAKE_OPTS -DCPPFLAGS="$CPPFLAGS" -DLDFLAGS="$LDFLAGS" -DBUILD_STATIC_LIBS=ON -DBUILD_TESTING=ON .
- name: Build nghttp2 with autotools (Linux)
if: matrix.buildtool == 'autotools' && runner.os == 'Linux'
run: |
- make -j"$(nproc)" distcheck \
- DISTCHECK_CONFIGURE_FLAGS="--with-mruby --with-neverbleed --with-libev --with-libbrotlienc --with-libbrotlidec --enable-werror $EXTRA_AUTOTOOLS_OPTS CPPFLAGS=\"$CPPFLAGS\" LDFLAGS=\"$LDFLAGS\""
+ cd $NGHTTP2_BUILD_DIR
+
+ ./configure --with-mruby --with-neverbleed --with-libev --with-libbrotlienc --with-libbrotlidec --enable-werror $EXTRA_AUTOTOOLS_OPTS
+ make -j"$(nproc)" check
- name: Build nghttp2 with autotools (MacOS)
if: matrix.buildtool == 'autotools' && runner.os == 'macOS'
run: |
- make -j"$(sysctl -n hw.ncpu)" distcheck \
- DISTCHECK_CONFIGURE_FLAGS="--with-mruby --with-libev --with-libbrotlienc --with-libbrotlidec --enable-werror $EXTRA_AUTOTOOLS_OPTS CPPFLAGS=\"$CPPFLAGS\" LDFLAGS=\"$LDFLAGS\""
+ cd $NGHTTP2_BUILD_DIR
+
+ ./configure --with-mruby --with-libev --with-libbrotlienc --with-libbrotlidec --enable-werror $EXTRA_AUTOTOOLS_OPTS
+ make -j"$(sysctl -n hw.ncpu)" check
+ - name: Build nghttp2 with autotools (distcheck)
+ if: matrix.buildtool == 'distcheck'
+ run: |
+ make -j"$(nproc)" distcheck \
+ DISTCHECK_CONFIGURE_FLAGS="--with-mruby --with-neverbleed --with-libev --with-libbrotlienc --with-libbrotlidec --enable-werror $EXTRA_AUTOTOOLS_OPTS CPPFLAGS=\"$CPPFLAGS\" LDFLAGS=\"$LDFLAGS\""
- name: Build nghttp2 with cmake
if: matrix.buildtool == 'cmake'
run: |
- cd $NGHTTP2_CMAKE_DIR
+ cd $NGHTTP2_BUILD_DIR
make -j"$(nproc 2> /dev/null || sysctl -n hw.ncpu)"
make -j"$(nproc 2> /dev/null || sysctl -n hw.ncpu)" check
- uses: actions/setup-go@v5
- if: matrix.buildtool == 'cmake'
+ if: matrix.buildtool != 'distcheck'
with:
go-version-file: go.mod
- name: Integration test
# Integration tests for nghttpx; autotools erases build
# artifacts.
- if: matrix.buildtool == 'cmake'
+ if: matrix.buildtool != 'distcheck'
run: |
- cd $NGHTTP2_CMAKE_DIR/integration-tests
+ cd $NGHTTP2_BUILD_DIR/integration-tests
make it
build-cross: