331 строка
12 KiB
YAML
331 строка
12 KiB
YAML
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
|
#
|
|
# SPDX-License-Identifier: curl
|
|
|
|
name: Linux
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- '*/ci'
|
|
paths-ignore:
|
|
- '**/*.md'
|
|
- '.azure-pipelines.yml'
|
|
- '.circleci/**'
|
|
- '.cirrus.yml'
|
|
- 'appveyor.yml'
|
|
- 'packages/**'
|
|
- 'plan9/**'
|
|
- 'projects/**'
|
|
- 'winbuild/**'
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
paths-ignore:
|
|
- '**/*.md'
|
|
- '.azure-pipelines.yml'
|
|
- '.circleci/**'
|
|
- '.cirrus.yml'
|
|
- 'appveyor.yml'
|
|
- 'packages/**'
|
|
- 'plan9/**'
|
|
- 'projects/**'
|
|
- 'winbuild/**'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
|
cancel-in-progress: true
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
autotools:
|
|
name: ${{ matrix.build.name }}
|
|
runs-on: 'ubuntu-latest'
|
|
container: ${{ matrix.build.container }}
|
|
timeout-minutes: 90
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
build:
|
|
- name: quiche
|
|
install_packages: zlib1g-dev valgrind
|
|
install_steps: quiche pytest
|
|
configure: LDFLAGS="-Wl,-rpath,/home/runner/work/curl/curl/quiche/target/release" --with-openssl=/home/runner/work/curl/curl/quiche/quiche/deps/boringssl/src --enable-debug --with-quiche=/home/runner/work/curl/curl/quiche/target/release
|
|
|
|
- name: bearssl
|
|
install_packages: zlib1g-dev valgrind
|
|
install_steps: bearssl pytest
|
|
configure: LDFLAGS="-Wl,-rpath,$HOME/bear/lib" --with-bearssl=$HOME/bear --enable-debug
|
|
|
|
- name: bearssl-clang
|
|
install_packages: zlib1g-dev clang
|
|
install_steps: bearssl
|
|
configure: CC=clang LDFLAGS="-Wl,-rpath,$HOME/bear/lib" --with-bearssl=$HOME/bear --enable-debug
|
|
|
|
- name: libressl
|
|
install_packages: zlib1g-dev valgrind
|
|
install_steps: libressl pytest
|
|
configure: LDFLAGS="-Wl,-rpath,$HOME/libressl/lib" --with-openssl=$HOME/libressl --enable-debug
|
|
|
|
- name: libressl-clang
|
|
install_packages: zlib1g-dev clang
|
|
install_steps: libressl
|
|
configure: CC=clang LDFLAGS="-Wl,-rpath,$HOME/libressl/lib" --with-openssl=$HOME/libressl --enable-debug
|
|
|
|
- name: mbedtls
|
|
install_packages: libnghttp2-dev valgrind
|
|
install_steps: mbedtls pytest
|
|
configure: LDFLAGS="-Wl,-rpath,$HOME/mbed/lib" --with-mbedtls=$HOME/mbed --enable-debug
|
|
|
|
- name: mbedtls-clang
|
|
install_packages: libnghttp2-dev clang
|
|
install_steps: mbedtls
|
|
configure: CC=clang LDFLAGS="-Wl,-rpath,$HOME/mbed/lib" --with-mbedtls=$HOME/mbed --enable-debug
|
|
|
|
- name: msh3
|
|
install_packages: zlib1g-dev valgrind
|
|
install_steps: quictls msh3
|
|
configure: LDFLAGS="-Wl,-rpath,$HOME/msh3/lib -Wl,-rpath,$HOME/quictls/lib" --with-msh3=$HOME/msh3 --with-openssl=$HOME/quictls --enable-debug
|
|
|
|
- name: openssl3
|
|
install_packages: zlib1g-dev valgrind
|
|
install_steps: gcc-11 openssl3 pytest
|
|
configure: LDFLAGS="-Wl,-rpath,$HOME/openssl3/lib64" --with-openssl=$HOME/openssl3 --enable-debug --enable-websockets
|
|
|
|
- name: openssl3-O3
|
|
install_packages: zlib1g-dev valgrind
|
|
install_steps: gcc-11 openssl3
|
|
configure: CFLAGS=-O3 LDFLAGS="-Wl,-rpath,$HOME/openssl3/lib64" --with-openssl=$HOME/openssl3 --enable-debug --enable-websockets
|
|
|
|
- name: openssl3-clang
|
|
install_packages: zlib1g-dev clang
|
|
install_steps: openssl3
|
|
configure: CC=clang LDFLAGS="-Wl,-rpath,$HOME/openssl3/lib64" --with-openssl=$HOME/openssl3 --enable-debug --enable-websockets
|
|
|
|
- name: address-sanitizer
|
|
install_packages: zlib1g-dev libssh2-1-dev clang libssl-dev libubsan1 libasan8 libtsan2
|
|
install_steps: pytest
|
|
configure: >
|
|
CC=clang
|
|
CFLAGS="-fsanitize=address,undefined,signed-integer-overflow -fno-sanitize-recover=undefined,integer -Wformat -Werror=format-security -Werror=array-bounds -g"
|
|
LDFLAGS="-fsanitize=address,undefined -fno-sanitize-recover=undefined,integer"
|
|
LIBS="-ldl -lubsan"
|
|
--with-openssl --enable-debug --enable-websockets
|
|
|
|
- name: memory-sanitizer
|
|
install_packages: clang
|
|
install_steps:
|
|
configure: >
|
|
CC=clang
|
|
CFLAGS="-fsanitize=memory -Wformat -Werror=format-security -Werror=array-bounds -g"
|
|
LDFLAGS="-fsanitize=memory"
|
|
LIBS="-ldl"
|
|
--without-ssl --without-zlib --without-brotli --without-zstd --without-libpsl --without-nghttp2 --enable-debug --enable-websocketsx
|
|
|
|
- name: event-based
|
|
install_packages: libssh-dev valgrind
|
|
configure: --enable-debug --disable-shared --disable-threaded-resolver --with-libssh --with-openssl
|
|
tflags: -n -e '!TLS-SRP'
|
|
|
|
- name: hyper
|
|
install_steps: rust hyper valgrind
|
|
configure: LDFLAGS="-Wl,-rpath,$HOME/hyper/target/debug" --with-openssl --with-hyper=$HOME/hyper --enable-debug --enable-websockets
|
|
|
|
- name: rustls
|
|
install_steps: rust rustls pytest valgrind
|
|
configure: --with-rustls=$HOME/rustls --enable-debug
|
|
|
|
- name: Intel compiler - without SSL
|
|
install_packages: zlib1g-dev valgrind
|
|
install_steps: intel
|
|
configure: CC=icc --enable-debug --without-ssl
|
|
|
|
- name: Intel compiler - OpenSSL
|
|
install_packages: zlib1g-dev libssl-dev valgrind
|
|
install_steps: intel
|
|
configure: CC=icc --enable-debug --with-openssl
|
|
|
|
- name: NSS
|
|
install_packages: clang libnss3-dev libnghttp2-dev nss-plugin-pem
|
|
configure: CC=clang CPPFLAGS="-isystem /usr/include/nss" --with-nss --enable-debug --with-nss-deprecated
|
|
|
|
- name: Slackware-openssl-with-gssapi-gcc
|
|
# These are essentially the same flags used to build the curl Slackware package
|
|
# https://ftpmirror.infania.net/slackware/slackware64-current/source/n/curl/curl.SlackBuild
|
|
configure: --with-openssl --with-libssh2 --with-gssapi --enable-ares --enable-static=no --without-ca-bundle --with-ca-path=/etc/ssl/certs
|
|
# Docker Hub image that `container-job` executes in
|
|
container: 'andy5995/slackware-build-essential:15.0'
|
|
|
|
steps:
|
|
- if: ${{ matrix.build.container == null }}
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install libtool autoconf automake pkg-config stunnel4 libpsl-dev libbrotli-dev libzstd-dev ${{ matrix.build.install_packages }}
|
|
sudo python3 -m pip install impacket
|
|
name: 'install prereqs and impacket'
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- if: ${{ contains(matrix.build.install_steps, 'gcc-11') }}
|
|
run: |
|
|
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
|
|
sudo apt-get update
|
|
sudo apt-get install gcc-11
|
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100
|
|
sudo update-alternatives --set gcc /usr/bin/gcc-11
|
|
gcc --version
|
|
name: 'install gcc-11'
|
|
|
|
- if: ${{ contains(matrix.build.install_steps, 'bearssl') }}
|
|
run: |
|
|
curl -LOsSf --retry 6 --retry-connrefused --max-time 999 https://bearssl.org/bearssl-0.6.tar.gz
|
|
tar -xzf bearssl-0.6.tar.gz
|
|
cd bearssl-0.6
|
|
make
|
|
mkdir -p $HOME/bear/lib $HOME/bear/include
|
|
cp inc/*.h $HOME/bear/include
|
|
cp build/libbearssl.* $HOME/bear/lib
|
|
name: 'install bearssl'
|
|
|
|
- if: ${{ contains(matrix.build.install_steps, 'libressl') }}
|
|
run: |
|
|
git clone --quiet --depth=1 -b v3.6.1 https://github.com/libressl-portable/portable.git libressl-git
|
|
cd libressl-git
|
|
./autogen.sh
|
|
./configure --prefix=$HOME/libressl
|
|
make install
|
|
name: 'install libressl'
|
|
|
|
- if: ${{ contains(matrix.build.install_steps, 'quiche') }}
|
|
run: |
|
|
git clone --quiet --depth=1 --recursive https://github.com/cloudflare/quiche.git
|
|
cd quiche
|
|
#### Work-around https://github.com/curl/curl/issues/7927 #######
|
|
#### See https://github.com/alexcrichton/cmake-rs/issues/131 ####
|
|
sed -i -e 's/cmake = "0.1"/cmake = "=0.1.45"/' quiche/Cargo.toml
|
|
|
|
# /home/runner/work/curl/curl/boringssl
|
|
|
|
cargo build -v --package quiche --release --features ffi,pkg-config-meta,qlog --verbose
|
|
mkdir -v quiche/deps/boringssl/src/lib
|
|
ln -vnf $(find target/release -name libcrypto.a -o -name libssl.a) quiche/deps/boringssl/src/lib/
|
|
|
|
# include dir
|
|
# /home/runner/work/curl/curl/quiche/quiche/deps/boringssl/src/include
|
|
# lib dir
|
|
# /home/runner/work/curl/curl/quiche/quiche/deps/boringssl/src/lib
|
|
|
|
name: 'build quiche and boringssl'
|
|
|
|
- if: ${{ contains(matrix.build.install_steps, 'mbedtls') }}
|
|
run: |
|
|
git clone --quiet --depth=1 -b v3.3.0 https://github.com/ARMmbed/mbedtls
|
|
cd mbedtls
|
|
make DESTDIR=$HOME/mbed install
|
|
name: 'install mbedtls'
|
|
|
|
- if: ${{ contains(matrix.build.install_steps, 'openssl3') }}
|
|
run: |
|
|
git clone --quiet --depth=1 https://github.com/openssl/openssl
|
|
cd openssl
|
|
./config enable-tls1_3 --prefix=$HOME/openssl3
|
|
make install_sw
|
|
name: 'install openssl'
|
|
|
|
- if: ${{ contains(matrix.build.install_steps, 'quictls') }}
|
|
run: |
|
|
git clone --quiet --depth=1 -b OpenSSL_1_1_1t+quic https://github.com/quictls/openssl
|
|
cd openssl
|
|
./config enable-tls1_3 --prefix=$HOME/quictls
|
|
make install_sw
|
|
name: 'install quictls'
|
|
|
|
- if: ${{ contains(matrix.build.install_steps, 'msh3') }}
|
|
run: |
|
|
git clone --quiet -b v0.6.0 --depth=1 --recursive https://github.com/nibanks/msh3
|
|
cd msh3 && mkdir build && cd build
|
|
cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=$HOME/msh3 ..
|
|
cmake --build .
|
|
cmake --install .
|
|
name: 'install msh3'
|
|
|
|
- if: ${{ contains(matrix.build.install_steps, 'rust') }}
|
|
run: |
|
|
cd $HOME
|
|
curl -sSf --compressed https://sh.rustup.rs/ | sh -s -- -y
|
|
source $HOME/.cargo/env
|
|
rustup toolchain install nightly
|
|
name: 'install rust'
|
|
|
|
- if: ${{ contains(matrix.build.install_steps, 'rustls') }}
|
|
run: |
|
|
git clone --quiet --depth=1 -b v0.9.2 --recursive https://github.com/rustls/rustls-ffi.git
|
|
cd rustls-ffi
|
|
make DESTDIR=$HOME/rustls install
|
|
name: 'install rustls'
|
|
|
|
- if: ${{ contains(matrix.build.install_steps, 'hyper') }}
|
|
run: |
|
|
cd $HOME
|
|
git clone --quiet --depth=1 https://github.com/hyperium/hyper.git
|
|
cd $HOME/hyper
|
|
RUSTFLAGS="--cfg hyper_unstable_ffi" cargo +nightly rustc --features client,http1,http2,ffi -Z unstable-options --crate-type cdylib
|
|
echo "LD_LIBRARY_PATH=$HOME/hyper/target/debug:/usr/local/lib" >> $GITHUB_ENV
|
|
name: 'install hyper'
|
|
|
|
- if: ${{ contains(matrix.build.install_steps, 'intel') }}
|
|
run: |
|
|
cd /tmp
|
|
curl -sSf --compressed https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | sudo apt-key add -
|
|
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
|
|
sudo apt install --no-install-recommends intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
|
|
source /opt/intel/oneapi/setvars.sh
|
|
printenv >> $GITHUB_ENV
|
|
name: 'install Intel compilers'
|
|
|
|
- if: ${{ contains(matrix.build.install_steps, 'pytest') }}
|
|
run: |
|
|
sudo apt-get install apache2 apache2-dev libnghttp2-dev
|
|
sudo python3 -m pip install -r tests/http/requirements.txt
|
|
git clone --quiet --depth=1 -b master https://github.com/icing/mod_h2
|
|
cd mod_h2
|
|
autoreconf -fi
|
|
./configure PKG_CONFIG_PATH="$HOME/all/lib/pkgconfig"
|
|
make
|
|
sudo make install
|
|
name: 'install pytest and apach2-dev mod-h2'
|
|
|
|
- run: autoreconf -fi
|
|
name: 'autoreconf'
|
|
|
|
- run: ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }}
|
|
name: 'configure'
|
|
|
|
- run: make V=1
|
|
name: 'make'
|
|
|
|
- run: ./src/curl -V
|
|
name: 'check curl -V output'
|
|
|
|
- run: make V=1 examples
|
|
name: 'make examples'
|
|
|
|
- run: make V=1 -C tests
|
|
name: 'make tests'
|
|
|
|
- run: make V=1 test-ci
|
|
name: 'run tests'
|
|
env:
|
|
TFLAGS: "${{ matrix.build.tflags }}"
|
|
|
|
- if: ${{ contains(matrix.build.install_steps, 'pytest') }}
|
|
# run for `tests` directory, so pytest does not pick up any other
|
|
# packages we might have built here
|
|
run:
|
|
pytest tests
|
|
name: 'run pytest'
|
|
env:
|
|
TFLAGS: "${{ matrix.build.tflags }}"
|