diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/dependabot.yml | 4 | ||||
-rw-r--r-- | .github/workflows/build.yml | 82 | ||||
-rw-r--r-- | .github/workflows/docker.yaml | 24 |
3 files changed, 69 insertions, 41 deletions
diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8c139c7..9cb65ba 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,3 +4,7 @@ updates: directory: "/" schedule: interval: "weekly" +- package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 51dcdfe..7cfb224 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,11 +7,11 @@ permissions: read-all env: LIBBPF_VERSION: v1.3.0 OPENSSL1_VERSION: 1_1_1w+quic - OPENSSL3_VERSION: 3.1.4+quic - BORINGSSL_VERSION: f42be90d665b6a376177648ccbb76fbbd6497c13 - AWSLC_VERSION: v1.20.0 - NGHTTP3_VERSION: v1.1.0 - NGTCP2_VERSION: v1.2.0 + OPENSSL3_VERSION: 3.1.5+quic + BORINGSSL_VERSION: 8e6a26d128484b886e6dcbfa558b993d38950bb5 + AWSLC_VERSION: v1.21.0 + NGHTTP3_VERSION: v1.2.0 + NGTCP2_VERSION: v1.3.0 jobs: build-cache: @@ -25,26 +25,26 @@ jobs: - uses: actions/checkout@v4 - name: Restore libbpf cache id: cache-libbpf - uses: actions/cache@v3 + uses: actions/cache@v4 if: runner.os == 'Linux' with: path: libbpf/build key: ${{ runner.os }}-libbpf-${{ env.LIBBPF_VERSION }} - name: Restore OpenSSL v1.1.1 cache id: cache-openssl1 - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: openssl1/build key: ${{ runner.os }}-openssl-${{ env.OPENSSL1_VERSION }} - name: Restore OpenSSL v3.x cache id: cache-openssl3 - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: openssl3/build key: ${{ runner.os }}-openssl-${{ env.OPENSSL3_VERSION }} - name: Restore BoringSSL cache id: cache-boringssl - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | boringssl/build/crypto/libcrypto.a @@ -53,7 +53,7 @@ jobs: key: ${{ runner.os }}-boringssl-${{ env.BORINGSSL_VERSION }} - name: Restore aws-lc cache id: cache-awslc - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | aws-lc/build/crypto/libcrypto.a @@ -62,19 +62,19 @@ jobs: key: ${{ runner.os }}-awslc-${{ env.AWSLC_VERSION }} - name: Restore nghttp3 cache id: cache-nghttp3 - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: nghttp3/build key: ${{ runner.os }}-nghttp3-${{ env.NGHTTP3_VERSION }} - name: Restore ngtcp2 + quictls/openssl v1.1.1 cache id: cache-ngtcp2-openssl1 - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ngtcp2-openssl1/build key: ${{ runner.os }}-ngtcp2-${{ env.NGTCP2_VERSION }}-openssl-${{ env.OPENSSL1_VERSION }} - name: Restore ngtcp2 + quictls/openssl v3.x cache id: cache-ngtcp2-openssl3 - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ngtcp2-openssl3/build key: ${{ runner.os }}-ngtcp2-${{ env.NGTCP2_VERSION }}-openssl-${{ env.OPENSSL3_VERSION }} @@ -93,6 +93,7 @@ jobs: - name: Linux setup if: runner.os == 'Linux' && steps.settings.outputs.needs-build == 'true' run: | + sudo apt-get update sudo apt-get install \ g++-12 \ clang-15 \ @@ -137,8 +138,11 @@ jobs: - name: Build BoringSSL if: steps.cache-boringssl.outputs.cache-hit != 'true' run: | - git clone https://boringssl.googlesource.com/boringssl + mkdir boringssl cd boringssl + git init + git remote add origin https://boringssl.googlesource.com/boringssl + git fetch origin --depth 1 ${{ env.BORINGSSL_VERSION }} git checkout ${{ env.BORINGSSL_VERSION }} mkdir build cd build @@ -156,6 +160,7 @@ jobs: run: | git clone --depth 1 -b ${{ env.NGHTTP3_VERSION}} https://github.com/ngtcp2/nghttp3 cd nghttp3 + git submodule update --init --depth 1 autoreconf -i ./configure --prefix=$PWD/build --enable-lib-only make -j"$(nproc 2> /dev/null || sysctl -n hw.ncpu)" check @@ -165,6 +170,7 @@ jobs: run: | git clone --depth 1 -b ${{ env.NGTCP2_VERSION }} https://github.com/ngtcp2/ngtcp2 ngtcp2-openssl1 cd ngtcp2-openssl1 + git submodule update --init --depth 1 autoreconf -i ./configure --prefix=$PWD/build --enable-lib-only \ PKG_CONFIG_PATH="../openssl1/build/lib/pkgconfig" \ @@ -178,6 +184,7 @@ jobs: run: | git clone --depth 1 -b ${{ env.NGTCP2_VERSION }} https://github.com/ngtcp2/ngtcp2 ngtcp2-openssl3 cd ngtcp2-openssl3 + git submodule update --init --depth 1 autoreconf -i ./configure --prefix=$PWD/build --enable-lib-only \ PKG_CONFIG_PATH="../openssl3/build/lib/pkgconfig" \ @@ -228,6 +235,7 @@ jobs: - name: Linux setup if: runner.os == 'Linux' run: | + sudo apt-get update sudo apt-get install \ g++-12 \ clang-15 \ @@ -237,7 +245,6 @@ jobs: libtool \ pkg-config \ zlib1g-dev \ - libcunit1-dev \ libssl-dev \ libxml2-dev \ libev-dev \ @@ -246,6 +253,7 @@ jobs: libjemalloc-dev \ libc-ares-dev \ libelf-dev \ + libbrotli-dev \ cmake \ cmake-data echo 'CPPFLAGS=-fsanitize=address,undefined -fno-sanitize-recover=undefined -g' >> $GITHUB_ENV @@ -257,8 +265,8 @@ jobs: libev \ libevent \ c-ares \ - cunit \ libressl \ + brotli \ autoconf \ automake \ pkg-config \ @@ -285,7 +293,7 @@ jobs: echo 'CC=gcc' >> $GITHUB_ENV echo 'CXX=g++' >> $GITHUB_ENV - name: Restore libbpf cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 if: matrix.http3 == 'http3' && matrix.compiler == 'clang' && runner.os == 'Linux' with: path: libbpf/build @@ -302,21 +310,21 @@ jobs: echo 'EXTRA_AUTOTOOLS_OPTS='"$EXTRA_AUTOTOOLS_OPTS" >> $GITHUB_ENV echo 'EXTRA_CMAKE_OPTS='"$EXTRA_CMAKE_OPTS" >> $GITHUB_ENV - name: Restore quictls/openssl v1.1.1 cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 if: matrix.http3 == 'http3' && matrix.openssl == 'openssl1' with: path: openssl1/build key: ${{ runner.os }}-openssl-${{ env.OPENSSL1_VERSION }} fail-on-cache-miss: true - name: Restore quictls/openssl v3.x cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 if: matrix.http3 == 'http3' && matrix.openssl == 'openssl3' with: path: openssl3/build key: ${{ runner.os }}-openssl-${{ env.OPENSSL3_VERSION }} fail-on-cache-miss: true - name: Restore BoringSSL cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 if: matrix.openssl == 'boringssl' with: path: | @@ -326,7 +334,7 @@ jobs: key: ${{ runner.os }}-boringssl-${{ env.BORINGSSL_VERSION }} fail-on-cache-miss: true - name: Restore aws-lc cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 if: matrix.openssl == 'awslc' with: path: | @@ -364,21 +372,21 @@ jobs: echo 'BORINGSSL_LIBS='"$OPENSSL_LIBS" >> $GITHUB_ENV echo 'EXTRA_AUTOTOOLS_OPTS='"$EXTRA_AUTOTOOLS_OPTS" >> $GITHUB_ENV - name: Restore nghttp3 cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 if: matrix.http3 == 'http3' with: path: nghttp3/build key: ${{ runner.os }}-nghttp3-${{ env.NGHTTP3_VERSION }} fail-on-cache-miss: true - name: Restore ngtcp2 + quictls/openssl v1.1.1 cache + BoringSSL - uses: actions/cache/restore@v3 + 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 }} fail-on-cache-miss: true - name: Restore ngtcp2 + quictls/openssl v3.x cache + aws-lc - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 if: matrix.http3 == 'http3' && (matrix.openssl == 'openssl3' || matrix.openssl == 'awslc') with: path: ngtcp2-openssl3/build @@ -398,7 +406,7 @@ jobs: echo 'EXTRA_CMAKE_OPTS='"$EXTRA_CMAKE_OPTS" >> $GITHUB_ENV - name: Setup git submodules run: | - git submodule update --init + git submodule update --init --depth 1 - name: Configure autotools run: | autoreconf -i @@ -430,12 +438,12 @@ jobs: if: matrix.buildtool == 'autotools' && runner.os == 'Linux' run: | make -j"$(nproc)" distcheck \ - DISTCHECK_CONFIGURE_FLAGS="--with-mruby --with-neverbleed --with-libev --enable-werror $EXTRA_AUTOTOOLS_OPTS CPPFLAGS=\"$CPPFLAGS\" LDFLAGS=\"$LDFLAGS\"" + 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 autotools (MacOS) if: matrix.buildtool == 'autotools' && runner.os == 'macOS' run: | make -j"$(sysctl -n hw.ncpu)" distcheck \ - DISTCHECK_CONFIGURE_FLAGS="--with-mruby --with-libev --enable-werror $EXTRA_AUTOTOOLS_OPTS CPPFLAGS=\"$CPPFLAGS\" LDFLAGS=\"$LDFLAGS\"" + DISTCHECK_CONFIGURE_FLAGS="--with-mruby --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: | @@ -478,20 +486,12 @@ jobs: libtool \ pkg-config \ wine - - name: Build CUnit - run: | - curl -LO https://jaist.dl.sourceforge.net/project/cunit/CUnit/2.1-3/CUnit-2.1-3.tar.bz2 - tar xf CUnit-2.1-3.tar.bz2 - cd CUnit-2.1-3 - ./bootstrap - ./configure --disable-shared --host="$HOST" --prefix="$PWD/build" - make -j$(nproc) install - name: Configure autotools run: | + git submodule update --init --depth 1 autoreconf -i && \ - ./configure --enable-werror --enable-lib-only --with-cunit \ - --host="$HOST" PKG_CONFIG_PATH="$PWD/CUnit-2.1-3/build/lib/pkgconfig" \ - CFLAGS="-g -O2 -D_WIN32_WINNT=0x0600" + ./configure --enable-werror --enable-lib-only --host="$HOST" \ + CFLAGS="-g -O2 -D_WIN32_WINNT=0x0600" LIBS="-pthread" - name: Build nghttp2 run: | make -j$(nproc) @@ -499,6 +499,7 @@ jobs: - name: Run tests if: matrix.host == 'x86_64-w64-mingw32' run: | + export WINEPATH=/usr/x86_64-w64-mingw32/lib cd tests wine main.exe @@ -516,11 +517,10 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: microsoft/setup-msbuild@v1 - - run: | - vcpkg --triplet=${{ matrix.arch }}-windows install cunit + - uses: microsoft/setup-msbuild@v2 - name: Configure cmake run: | + git submodule update --init --depth 1 mkdir build cd build cmake -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_GENERATOR_PLATFORM=${{ matrix.platform }} -DVCPKG_TARGET_TRIPLET=${{ matrix.arch}}-windows .. diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml new file mode 100644 index 0000000..7945573 --- /dev/null +++ b/.github/workflows/docker.yaml @@ -0,0 +1,24 @@ +name: docker-build + +on: + push: + paths: + - docker/Dockerfile + branches: + - '**' + +permissions: read-all + +jobs: + build: + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build + uses: docker/build-push-action@v5 + with: + context: docker + build-args: NGHTTP2_BRANCH=${{ github.ref_name }} |