mirror of
https://github.com/libssh2/libssh2.git
synced 2026-01-27 00:18:12 +03:00
- use the group expression from `reuse.yml` (via curl). - add auto-cancel for `ci` and `cifuzz`. - add auto-cancel to `appveyor_docker`. I'm just guessing here. The hope is that it fixes AppVeyor CI runs when re-pushing a PR. This frequently caused the freshly pushed session to fail waiting for a connection. - sync group expression in `appveyor_status` with `reuse`. Closes #1292
652 lines
24 KiB
YAML
652 lines
24 KiB
YAML
# Copyright (C) The libssh2 project and its contributors.
|
|
#
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
#
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
|
cancel-in-progress: true
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
check_style:
|
|
name: 'style-check'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: 'checksrc'
|
|
run: ./ci/checksrc.sh
|
|
|
|
spellcheck:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: 'install tools'
|
|
run: pip install -U codespell
|
|
- name: 'spellcheck'
|
|
run: ./ci/spellcheck.sh
|
|
|
|
build_integration:
|
|
name: 'integration'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
env:
|
|
CC: clang
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: 'cmake'
|
|
run: |
|
|
sudo apt-get --quiet 2 --option Dpkg::Use-Pty=0 install libssl-dev
|
|
./tests/cmake/test.sh
|
|
|
|
build_linux:
|
|
name: 'linux'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
compiler: [gcc, clang]
|
|
arch: [amd64]
|
|
crypto: [OpenSSL, wolfSSL, Libgcrypt, mbedTLS]
|
|
build: [cmake]
|
|
zlib: ['OFF', 'ON']
|
|
include:
|
|
- compiler: gcc
|
|
arch: amd64
|
|
crypto: OpenSSL
|
|
build: autotools
|
|
zlib: 'OFF'
|
|
- compiler: clang
|
|
arch: amd64
|
|
crypto: OpenSSL
|
|
build: autotools
|
|
zlib: 'OFF'
|
|
- compiler: clang
|
|
arch: amd64
|
|
crypto: OpenSSL
|
|
build: autotools
|
|
zlib: 'ON'
|
|
target: 'distcheck'
|
|
- compiler: gcc
|
|
arch: i386
|
|
crypto: mbedTLS
|
|
build: cmake
|
|
zlib: 'ON'
|
|
- compiler: gcc
|
|
arch: amd64
|
|
crypto: BoringSSL
|
|
build: cmake
|
|
zlib: 'ON'
|
|
- compiler: gcc
|
|
arch: amd64
|
|
crypto: OpenSSL-3-no-deprecated
|
|
build: cmake
|
|
zlib: 'ON'
|
|
- compiler: clang
|
|
arch: i386
|
|
crypto: Libgcrypt
|
|
build: autotools
|
|
zlib: 'ON'
|
|
options: --disable-static
|
|
env:
|
|
CC: ${{ matrix.compiler }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: 'install architecture'
|
|
if: ${{ matrix.arch != 'amd64' }}
|
|
run: |
|
|
sudo dpkg --add-architecture '${{ matrix.arch }}'
|
|
sudo apt-get --quiet 2 --option Dpkg::Use-Pty=0 update
|
|
# Workaround for https://github.com/actions/runner-images/issues/7589
|
|
sudo apt-get --quiet 2 --option Dpkg::Use-Pty=0 install libgcc-s1:${{ matrix.arch }}
|
|
sudo apt-get --quiet 2 --option Dpkg::Use-Pty=0 install gcc-multilib build-essential zlib1g-dev:${{ matrix.arch }}
|
|
|
|
- name: 'install packages'
|
|
run: |
|
|
[ '${{ matrix.crypto }}' = 'OpenSSL' ] && pkg='libssl-dev'
|
|
[ '${{ matrix.crypto }}' = 'wolfSSL' ] && pkg='libwolfssl-dev'
|
|
[ '${{ matrix.crypto }}' = 'Libgcrypt' ] && pkg='libgcrypt-dev'
|
|
if [ -n "${pkg}" ]; then
|
|
sudo apt-get --quiet 2 --option Dpkg::Use-Pty=0 install "${pkg}:${{ matrix.arch }}"
|
|
fi
|
|
|
|
- name: 'install mbedTLS from source'
|
|
if: ${{ matrix.crypto == 'mbedTLS' }}
|
|
run: |
|
|
MBEDTLSVER=mbedtls-3.5.1
|
|
curl -L https://github.com/Mbed-TLS/mbedtls/archive/$MBEDTLSVER.tar.gz | tar -xzf -
|
|
cd mbedtls-$MBEDTLSVER
|
|
if [ '${{ matrix.arch }}' = 'i386' ]; then
|
|
crossoptions='-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_VERSION=1 -DCMAKE_SYSTEM_PROCESSOR=${{ matrix.arch }}'
|
|
cflags='-m32 -mpclmul -msse2 -maes'
|
|
fi
|
|
cmake ${crossoptions} \
|
|
"-DCMAKE_C_FLAGS=${cflags}" \
|
|
-DENABLE_PROGRAMS=OFF \
|
|
-DENABLE_TESTING=OFF \
|
|
-DUSE_STATIC_MBEDTLS_LIBRARY=OFF \
|
|
-DUSE_SHARED_MBEDTLS_LIBRARY=ON \
|
|
-DCMAKE_INSTALL_PREFIX:PATH=$PWD/../usr
|
|
make -j3 install
|
|
cd ..
|
|
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/usr/lib" >> $GITHUB_ENV
|
|
echo "TOOLCHAIN_OPTION=$TOOLCHAIN_OPTION -DCMAKE_PREFIX_PATH=$PWD/usr" >> $GITHUB_ENV
|
|
|
|
- name: 'install BoringSSL from source'
|
|
if: ${{ matrix.crypto == 'BoringSSL' }}
|
|
run: |
|
|
BORINGSSLVER=1b7fdbd9101dedc3e0aa3fcf4ff74eacddb34ecc
|
|
mkdir boringssl
|
|
cd boringssl
|
|
curl "https://boringssl.googlesource.com/boringssl/+archive/$BORINGSSLVER.tar.gz" | tar -xzf -
|
|
cmake \
|
|
-DOPENSSL_SMALL=ON \
|
|
-DCMAKE_C_FLAGS=-fPIC \
|
|
-DCMAKE_INSTALL_PREFIX:PATH=$PWD/../usr
|
|
make -j3 install
|
|
cd ..
|
|
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/usr/lib" >> $GITHUB_ENV
|
|
echo "TOOLCHAIN_OPTION=$TOOLCHAIN_OPTION -DCMAKE_PREFIX_PATH=$PWD/usr" >> $GITHUB_ENV
|
|
|
|
- name: 'install OpenSSL from source'
|
|
if: ${{ matrix.crypto == 'OpenSSL-3-no-deprecated' }}
|
|
run: |
|
|
OPENSSLVER=openssl-3.2.0
|
|
curl -L https://www.openssl.org/source/$OPENSSLVER.tar.gz | tar -xzf -
|
|
cd $OPENSSLVER
|
|
./Configure no-deprecated \
|
|
no-apps no-docs no-tests no-makedepend \
|
|
no-comp no-quic no-legacy --prefix=/usr
|
|
make -j3 install DESTDIR=$PWD/..
|
|
cd ..
|
|
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/usr/lib" >> $GITHUB_ENV
|
|
echo "TOOLCHAIN_OPTION=$TOOLCHAIN_OPTION -DCMAKE_PREFIX_PATH=$PWD/usr" >> $GITHUB_ENV
|
|
|
|
- name: 'autotools autoreconf'
|
|
if: ${{ matrix.build == 'autotools' }}
|
|
run: autoreconf -fi
|
|
- name: 'autotools configure'
|
|
if: ${{ matrix.build == 'autotools' }}
|
|
run: |
|
|
if [ '${{ matrix.arch }}' = 'i386' ]; then
|
|
crossoptions='--host=i686-pc-linux-gnu'
|
|
export CFLAGS=-m32
|
|
fi
|
|
mkdir bld && cd bld && ../configure --enable-werror --enable-debug \
|
|
${crossoptions} ${{ matrix.options }}
|
|
|
|
- name: 'autotools build'
|
|
if: ${{ matrix.build == 'autotools' && !matrix.target }}
|
|
run: make -C bld -j3
|
|
- name: 'autotools tests'
|
|
if: ${{ matrix.build == 'autotools' && !matrix.target }}
|
|
timeout-minutes: 10
|
|
run: make -C bld check VERBOSE=1
|
|
- name: 'autotools distcheck'
|
|
if: ${{ matrix.target == 'distcheck' }}
|
|
timeout-minutes: 10
|
|
run: make -C bld -j3 distcheck
|
|
- name: 'cmake configure'
|
|
if: ${{ matrix.build == 'cmake' }}
|
|
run: |
|
|
if [ '${{ matrix.crypto }}' = 'BoringSSL' ] || \
|
|
[[ '${{ matrix.crypto }}' = 'OpenSSL-'* ]]; then
|
|
crypto='OpenSSL'
|
|
else
|
|
crypto='${{ matrix.crypto }}'
|
|
fi
|
|
[ '${{ matrix.arch }}' = 'i386' ] && crossoptions='-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_VERSION=1 -DCMAKE_SYSTEM_PROCESSOR=${{ matrix.arch }} -DCMAKE_C_FLAGS=-m32'
|
|
cmake -B bld ${crossoptions} $TOOLCHAIN_OPTION \
|
|
-DENABLE_WERROR=ON \
|
|
-DCRYPTO_BACKEND=${crypto} \
|
|
-DENABLE_ZLIB_COMPRESSION=${{ matrix.zlib }}
|
|
|
|
- name: 'cmake build'
|
|
if: ${{ matrix.build == 'cmake' }}
|
|
run: cmake --build bld --parallel 3 --target package
|
|
- name: 'cmake tests'
|
|
if: ${{ matrix.build == 'cmake' && matrix.crypto != 'wolfSSL' }}
|
|
timeout-minutes: 10
|
|
run: |
|
|
export OPENSSH_SERVER_IMAGE=ghcr.io/libssh2/ci_tests_openssh_server:$(git rev-parse --short=20 HEAD:tests/openssh_server)
|
|
cd bld && ctest -VV --output-on-failure
|
|
|
|
build_linux_cross_mingw64:
|
|
name: 'linux -> mingw-w64'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
build: [autotools, cmake]
|
|
compiler: [gcc]
|
|
env:
|
|
TRIPLET: 'x86_64-w64-mingw32'
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: 'install packages'
|
|
run: sudo apt-get --quiet 2 --option Dpkg::Use-Pty=0 install mingw-w64
|
|
- name: 'autotools autoreconf'
|
|
if: ${{ matrix.build == 'autotools' }}
|
|
run: autoreconf -fi
|
|
- name: 'autotools configure'
|
|
if: ${{ matrix.build == 'autotools' }}
|
|
run: mkdir bld && cd bld && ../configure --enable-werror --enable-debug --host=${TRIPLET}
|
|
- name: 'autotools build'
|
|
if: ${{ matrix.build == 'autotools' }}
|
|
run: make -C bld -j3
|
|
- name: 'cmake configure'
|
|
if: ${{ matrix.build == 'cmake' }}
|
|
run: |
|
|
cmake -B bld \
|
|
-DCMAKE_SYSTEM_NAME=Windows \
|
|
-DCMAKE_C_COMPILER_TARGET=${TRIPLET} \
|
|
-DCMAKE_C_COMPILER=${TRIPLET}-gcc \
|
|
-DENABLE_WERROR=ON
|
|
|
|
- name: 'cmake build'
|
|
if: ${{ matrix.build == 'cmake' }}
|
|
run: cmake --build bld --parallel 3
|
|
|
|
build_cygwin:
|
|
name: 'cygwin'
|
|
runs-on: windows-latest
|
|
timeout-minutes: 30
|
|
env:
|
|
SHELLOPTS: 'igncr'
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- { build: 'automake', platform: 'x86_64', compiler: 'gcc' }
|
|
- { build: 'cmake' , platform: 'x86_64', compiler: 'gcc' }
|
|
fail-fast: false
|
|
steps:
|
|
- run: git config --global core.autocrlf input
|
|
- uses: actions/checkout@v4
|
|
- uses: cygwin/cygwin-install-action@v4
|
|
with:
|
|
platform: ${{ matrix.platform }}
|
|
packages: autoconf libtool ${{ matrix.build }} gcc-core gcc-g++ binutils make libssl-devel zlib-devel
|
|
site: https://mirrors.kernel.org/sourceware/cygwin/
|
|
|
|
- name: 'autotools'
|
|
if: ${{ matrix.build == 'automake' }}
|
|
timeout-minutes: 10
|
|
shell: C:\cygwin\bin\bash.exe '{0}'
|
|
run: |
|
|
export PATH="/usr/bin:$(cygpath ${SYSTEMROOT})/system32"
|
|
autoreconf -fi
|
|
mkdir bld && cd bld && ../configure --enable-werror --enable-debug \
|
|
--with-crypto=openssl \
|
|
--disable-docker-tests
|
|
make -j3
|
|
make check VERBOSE=1
|
|
|
|
- name: 'cmake'
|
|
if: ${{ matrix.build == 'cmake' }}
|
|
timeout-minutes: 10
|
|
shell: C:\cygwin\bin\bash.exe '{0}'
|
|
run: |
|
|
export PATH="/usr/bin:$(cygpath ${SYSTEMROOT})/system32"
|
|
cmake -B bld \
|
|
-DENABLE_WERROR=ON \
|
|
-DENABLE_DEBUG_LOGGING=ON \
|
|
-DCRYPTO_BACKEND=OpenSSL \
|
|
-DOPENSSL_ROOT_DIR=/usr/lib \
|
|
-DENABLE_ZLIB_COMPRESSION=ON \
|
|
-DRUN_DOCKER_TESTS=OFF \
|
|
-DRUN_SSHD_TESTS=OFF
|
|
cmake --build bld --parallel 3
|
|
cd bld && ctest -VV --output-on-failure
|
|
|
|
build_msys2:
|
|
name: 'msys2'
|
|
runs-on: windows-latest
|
|
timeout-minutes: 30
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- { build: 'autotools', sys: msys , env: x86_64 }
|
|
- { build: 'cmake' , sys: msys , env: x86_64 }
|
|
- { build: 'autotools', sys: mingw64, env: x86_64 }
|
|
- { build: 'autotools', sys: mingw32, env: i686 }
|
|
- { build: 'autotools', sys: ucrt64, env: ucrt-x86_64 }
|
|
- { build: 'autotools', sys: clang64, env: clang-x86_64 }
|
|
- { build: 'cmake' , sys: ucrt64, env: ucrt-x86_64 }
|
|
- { build: 'cmake' , sys: clang64, env: clang-x86_64 }
|
|
- { build: 'cmake' , sys: mingw64, env: x86_64, test: 'uwp' }
|
|
- { build: 'cmake' , sys: mingw64, env: x86_64, test: 'no-options' }
|
|
fail-fast: false
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: msys2/setup-msys2@v2
|
|
if: ${{ matrix.sys == 'msys' }}
|
|
with:
|
|
msystem: ${{ matrix.sys }}
|
|
install: gcc ${{ matrix.build }} make openssl-devel zlib-devel
|
|
- uses: msys2/setup-msys2@v2
|
|
if: ${{ matrix.sys != 'msys' }}
|
|
with:
|
|
msystem: ${{ matrix.sys }}
|
|
install: >-
|
|
mingw-w64-${{ matrix.env }}-cc
|
|
mingw-w64-${{ matrix.env }}-${{ matrix.build }} make
|
|
mingw-w64-${{ matrix.env }}-openssl
|
|
|
|
- name: 'autotools autoreconf'
|
|
if: ${{ matrix.build == 'autotools' }}
|
|
shell: msys2 {0}
|
|
run: autoreconf -fi
|
|
- name: 'autotools configure'
|
|
if: ${{ matrix.build == 'autotools' }}
|
|
env:
|
|
SSHD: 'C:/Program Files/Git/usr/bin/sshd.exe'
|
|
shell: msys2 {0}
|
|
run: |
|
|
# sshd tests sometimes hang
|
|
mkdir bld && cd bld && ../configure --enable-werror --enable-debug \
|
|
--with-crypto=openssl \
|
|
--disable-docker-tests \
|
|
--disable-sshd-tests
|
|
|
|
- name: 'autotools build'
|
|
if: ${{ matrix.build == 'autotools' }}
|
|
shell: msys2 {0}
|
|
run: make -C bld -j3
|
|
- name: 'autotools tests'
|
|
if: ${{ matrix.build == 'autotools' }}
|
|
timeout-minutes: 10
|
|
shell: msys2 {0}
|
|
run: make -C bld check VERBOSE=1
|
|
- name: 'cmake configure'
|
|
if: ${{ matrix.build == 'cmake' }}
|
|
shell: msys2 {0}
|
|
run: |
|
|
if [[ '${{ matrix.env }}' = 'clang'* ]]; then
|
|
options='-DCMAKE_C_COMPILER=clang -DCMAKE_UNITY_BUILD=ON'
|
|
else
|
|
options='-DCMAKE_C_COMPILER=gcc'
|
|
fi
|
|
if [ '${{ matrix.test }}' = 'uwp' ]; then
|
|
options="${options} -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0"
|
|
pacman --noconfirm --ask 20 --noprogressbar --sync --needed 'mingw-w64-${{ matrix.env }}-winstorecompat-git'
|
|
specs="$(realpath gcc-specs-uwp)"
|
|
gcc -dumpspecs | sed -e 's/-lmingwex/-lwindowsapp -lmingwex -lwindowsapp -lwindowsappcompat/' -e 's/-lmsvcrt/-lmsvcr120_app/' > "${specs}"
|
|
cflags="-specs=${specs} -DWINSTORECOMPAT -DWINAPI_FAMILY=WINAPI_FAMILY_APP"
|
|
# CMake (as of v3.26.4) gets confused and applies the MSVC rc.exe command-line
|
|
# template to windres. Reset it to the windres template manually:
|
|
rcopts='<CMAKE_RC_COMPILER> -O coff <DEFINES> <INCLUDES> <FLAGS> <SOURCE> <OBJECT>'
|
|
elif [ '${{ matrix.test }}' = 'no-options' ]; then
|
|
options="${options} -DLIBSSH2_NO_DEPRECATED=ON"
|
|
cflags='-DLIBSSH2_NO_MD5 -DLIBSSH2_NO_MD5_PEM -DLIBSSH2_NO_HMAC_RIPEMD -DLIBSSH2_NO_DSA -DLIBSSH2_NO_AES_CBC -DLIBSSH2_NO_AES_CTR -DLIBSSH2_NO_BLOWFISH -DLIBSSH2_NO_RC4 -DLIBSSH2_NO_CAST -DLIBSSH2_NO_3DES'
|
|
else
|
|
cflags=''
|
|
rcopts=''
|
|
fi
|
|
cmake -B bld ${options} \
|
|
"-DCMAKE_C_FLAGS=${cflags}" \
|
|
"-DCMAKE_RC_COMPILE_OBJECT=${rcopts}" \
|
|
-DENABLE_WERROR=ON \
|
|
-DENABLE_DEBUG_LOGGING=ON \
|
|
-DCRYPTO_BACKEND=OpenSSL \
|
|
-DENABLE_ZLIB_COMPRESSION=ON \
|
|
-DRUN_DOCKER_TESTS=OFF \
|
|
-DRUN_SSHD_TESTS=OFF \
|
|
-DCMAKE_VERBOSE_MAKEFILE=ON
|
|
|
|
- name: 'cmake build'
|
|
if: ${{ matrix.build == 'cmake' }}
|
|
shell: msys2 {0}
|
|
run: cmake --build bld --parallel 3
|
|
- name: 'cmake tests'
|
|
# UWP missing 'msvcr120_app.dll', fails with exit code 0xc0000135
|
|
if: ${{ matrix.build == 'cmake' && matrix.test != 'uwp' }}
|
|
timeout-minutes: 10
|
|
shell: msys2 {0}
|
|
run: cd bld && ctest -VV --output-on-failure
|
|
|
|
build_msvc:
|
|
name: 'msvc'
|
|
runs-on: windows-latest
|
|
timeout-minutes: 30
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- { arch: x64 , plat: windows, crypto: WinCNG , log: 'OFF', shared: 'OFF', zlib: 'OFF', unity: 'OFF' }
|
|
- { arch: x64 , plat: windows, crypto: WinCNG , log: 'ON' , shared: 'ON' , zlib: 'OFF', unity: 'OFF' }
|
|
- { arch: x64 , plat: windows, crypto: OpenSSL, log: 'OFF', shared: 'ON' , zlib: 'OFF', unity: 'OFF' }
|
|
- { arch: x64 , plat: uwp , crypto: WinCNG , log: 'OFF', shared: 'ON' , zlib: 'OFF', unity: 'OFF' }
|
|
- { arch: arm64, plat: windows, crypto: WinCNG , log: 'OFF', shared: 'ON' , zlib: 'OFF', unity: 'OFF' }
|
|
- { arch: arm64, plat: uwp , crypto: WinCNG , log: 'OFF', shared: 'ON' , zlib: 'OFF', unity: 'ON' }
|
|
- { arch: x86 , plat: windows, crypto: WinCNG , log: 'OFF', shared: 'ON' , zlib: 'OFF', unity: 'OFF' }
|
|
fail-fast: false
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: 'cmake configure'
|
|
shell: bash
|
|
run: |
|
|
archgen=${{ matrix.arch }}; [ "${archgen}" = 'x86' ] && archgen='Win32'
|
|
if [ '${{ matrix.plat }}' = 'uwp' ]; then
|
|
system='WindowsStore'
|
|
options='-DCMAKE_SYSTEM_VERSION=10.0'
|
|
else
|
|
system='Windows'
|
|
fi
|
|
cmake -B bld ${options} \
|
|
-DCMAKE_SYSTEM_NAME=${system} \
|
|
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
|
-DCMAKE_GENERATOR_PLATFORM=${archgen} \
|
|
-DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-${{ matrix.plat }} \
|
|
-DCMAKE_VS_GLOBALS=TrackFileAccess=false \
|
|
-DCMAKE_UNITY_BUILD=${{ matrix.unity }} \
|
|
-DENABLE_WERROR=ON \
|
|
-DENABLE_DEBUG_LOGGING=${{ matrix.log }} \
|
|
-DBUILD_SHARED_LIBS=${{ matrix.shared }} \
|
|
-DCRYPTO_BACKEND=${{ matrix.crypto }} \
|
|
-DENABLE_ZLIB_COMPRESSION=${{ matrix.zlib }} \
|
|
-DRUN_DOCKER_TESTS=OFF \
|
|
-DRUN_SSHD_TESTS=OFF
|
|
|
|
- name: 'cmake build'
|
|
run: cmake --build bld --parallel 3 --target package --config Release
|
|
- name: 'cmake tests'
|
|
# UWP binaries require a CRT DLL that is not found. Static CRT not supported.
|
|
if: ${{ matrix.arch != 'arm64' && matrix.plat != 'uwp' }}
|
|
timeout-minutes: 10
|
|
run: cd bld && ctest -VV -C Release --output-on-failure
|
|
|
|
build_macos:
|
|
name: 'macOS (${{ matrix.build }}, ${{ matrix.crypto.name }})'
|
|
runs-on: macos-latest
|
|
timeout-minutes: 30
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
build: [autotools, cmake]
|
|
crypto:
|
|
- name: 'OpenSSL 3'
|
|
install: openssl
|
|
configure: --with-crypto=openssl --with-libssl-prefix=/usr/local/opt/openssl
|
|
cmake: -DCRYPTO_BACKEND=OpenSSL -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl
|
|
- name: 'OpenSSL 1.1'
|
|
install: openssl@1.1
|
|
configure: --with-crypto=openssl --with-libssl-prefix=/usr/local/opt/openssl@1.1
|
|
cmake: -DCRYPTO_BACKEND=OpenSSL -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1
|
|
- name: 'LibreSSL'
|
|
install: libressl
|
|
configure: --with-crypto=openssl --with-libssl-prefix=/usr/local/opt/libressl
|
|
cmake: -DCRYPTO_BACKEND=OpenSSL -DOPENSSL_ROOT_DIR=/usr/local/opt/libressl
|
|
- name: 'wolfSSL'
|
|
install: wolfssl
|
|
configure: --with-crypto=wolfssl --with-libwolfssl-prefix=/usr/local/opt/wolfssl
|
|
cmake: -DCRYPTO_BACKEND=wolfSSL
|
|
- name: 'libgcrypt'
|
|
install: libgcrypt
|
|
configure: --with-crypto=libgcrypt --with-libgcrypt-prefix=/usr/local/opt/libgcrypt
|
|
cmake: -DCRYPTO_BACKEND=Libgcrypt
|
|
- name: 'mbedTLS'
|
|
install: mbedtls
|
|
configure: --with-crypto=mbedtls --with-libmbedcrypto-prefix=/usr/local/opt/mbedtls
|
|
cmake: -DCRYPTO_BACKEND=mbedTLS -DMBEDTLS_INCLUDE_DIR=/usr/local/opt/mbedtls/include -DMBEDCRYPTO_LIBRARY=/usr/local/opt/mbedtls/lib/libmbedcrypto.a
|
|
steps:
|
|
- name: 'install packages'
|
|
run: brew install automake ${{ matrix.crypto.install }}
|
|
- uses: actions/checkout@v4
|
|
- name: 'autotools autoreconf'
|
|
if: ${{ matrix.build == 'autotools' }}
|
|
run: autoreconf -fi
|
|
- name: 'autotools configure'
|
|
if: ${{ matrix.build == 'autotools' }}
|
|
run: |
|
|
mkdir bld && cd bld && ../configure --enable-werror --enable-debug \
|
|
--with-libz ${{ matrix.crypto.configure }} \
|
|
--disable-docker-tests \
|
|
--disable-sshd-tests
|
|
|
|
- name: 'autotools build'
|
|
if: ${{ matrix.build == 'autotools' }}
|
|
run: make -C bld -j3
|
|
- name: 'autotools tests'
|
|
if: ${{ matrix.build == 'autotools' }}
|
|
timeout-minutes: 10
|
|
run: make -C bld check VERBOSE=1
|
|
- name: 'cmake configure'
|
|
if: ${{ matrix.build == 'cmake' }}
|
|
run: |
|
|
cmake -B bld ${{ matrix.crypto.cmake }} \
|
|
-DCMAKE_UNITY_BUILD=ON \
|
|
-DENABLE_WERROR=ON \
|
|
-DENABLE_DEBUG_LOGGING=ON \
|
|
-DENABLE_ZLIB_COMPRESSION=ON \
|
|
-DRUN_DOCKER_TESTS=OFF \
|
|
-DRUN_SSHD_TESTS=OFF
|
|
|
|
- name: 'cmake build'
|
|
if: ${{ matrix.build == 'cmake' }}
|
|
run: cmake --build bld --parallel 3
|
|
- name: 'cmake tests'
|
|
if: ${{ matrix.build == 'cmake' }}
|
|
timeout-minutes: 10
|
|
run: cd bld && ctest -VV --output-on-failure
|
|
|
|
build_freebsd:
|
|
name: 'FreeBSD (autotools, openssl, clang, amd64)'
|
|
runs-on: macos-12
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: 'autotools'
|
|
uses: cross-platform-actions/action@v0.21.1
|
|
with:
|
|
operating_system: "freebsd"
|
|
version: "13.2"
|
|
architecture: "x86_64"
|
|
run: |
|
|
# https://ports.freebsd.org/
|
|
sudo pkg install -y autoconf automake libtool
|
|
setenv CC clang
|
|
autoreconf -fi
|
|
mkdir bld && cd bld && ../configure --enable-werror --enable-debug \
|
|
--with-crypto=openssl \
|
|
--disable-docker-tests
|
|
make -j3
|
|
make check VERBOSE=1
|
|
|
|
build_freebsd_new:
|
|
name: 'FreeBSD 14 (autotools, openssl, clang, amd64)'
|
|
runs-on: ubuntu-22.04
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: 'autotools'
|
|
uses: vmactions/freebsd-vm@v1
|
|
with:
|
|
# https://ports.freebsd.org/
|
|
prepare: pkg install -y autoconf automake libtool bash
|
|
run: |
|
|
setenv CC clang
|
|
autoreconf -fi
|
|
mkdir bld && cd bld && ../configure --enable-werror --enable-debug \
|
|
--with-crypto=openssl \
|
|
--disable-docker-tests
|
|
make -j3
|
|
make check VERBOSE=1
|
|
|
|
build_netbsd:
|
|
name: 'NetBSD (cmake, openssl, clang, amd64)'
|
|
runs-on: macos-12
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: 'cmake'
|
|
uses: cross-platform-actions/action@v0.21.1
|
|
with:
|
|
operating_system: "netbsd"
|
|
version: "9.3"
|
|
architecture: "x86_64"
|
|
run: |
|
|
# https://pkgsrc.se/
|
|
sudo pkgin -y install cmake
|
|
cmake -B bld \
|
|
-DENABLE_WERROR=ON \
|
|
-DENABLE_DEBUG_LOGGING=ON \
|
|
-DCRYPTO_BACKEND=OpenSSL \
|
|
-DBUILD_STATIC_LIBS=OFF \
|
|
-DRUN_DOCKER_TESTS=OFF \
|
|
-DRUN_SSHD_TESTS=OFF
|
|
cmake --build bld --parallel 3
|
|
|
|
build_openbsd:
|
|
name: 'OpenBSD (cmake, libressl, clang, amd64)'
|
|
runs-on: macos-12
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: 'cmake'
|
|
uses: cross-platform-actions/action@v0.21.1
|
|
with:
|
|
operating_system: "openbsd"
|
|
version: "7.4"
|
|
architecture: "x86_64"
|
|
run: |
|
|
# https://openbsd.app/
|
|
sudo pkg_add cmake
|
|
cmake -B bld \
|
|
-DENABLE_WERROR=ON \
|
|
-DENABLE_DEBUG_LOGGING=ON \
|
|
-DCRYPTO_BACKEND=OpenSSL \
|
|
-DBUILD_STATIC_LIBS=OFF \
|
|
-DRUN_DOCKER_TESTS=OFF \
|
|
-DRUN_SSHD_TESTS=OFF
|
|
cmake --build bld --parallel 3
|
|
|
|
build_omnios:
|
|
name: 'OmniOS (autotools, openssl, gcc, amd64)'
|
|
runs-on: ubuntu-22.04
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: 'autotools'
|
|
uses: vmactions/omnios-vm@v1
|
|
with:
|
|
usesh: true
|
|
# https://pkg.omnios.org/r151048/core/en/index.shtml
|
|
prepare: pkg install build-essential libtool
|
|
run: |
|
|
autoreconf -fi
|
|
mkdir bld && cd bld && ../configure --enable-werror --enable-debug \
|
|
--with-crypto=openssl \
|
|
--disable-docker-tests
|
|
gmake -j3
|
|
gmake check VERBOSE=1
|