GH-471 Check that OpenSSL has NPN enabled when testing NPN. #454
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The CI workflow tests Net-SSLeay against the following setups: | |
# | |
# - OS: Ubuntu 20.04 | |
# - Perl: the latest patch release of every minor release since 5.8 | |
# - libssl: the latest patch release of every minor release between: | |
# - OpenSSL: 0.9.8 and 3.2 | |
# - LibreSSL: 2.2 and 3.8 | |
# | |
# - Non-x86 architectures on Alpine Linux and Ubuntu | |
# | |
# - Various BSDs with different LibreSSL and OpenSSL versions | |
# | |
# - Windows with Cygwin | |
name: CI | |
on: | |
push: | |
branches: | |
- '*' | |
tags-ignore: | |
- '*' | |
pull_request: | |
env: | |
PERL_MM_USE_DEFAULT: 1 | |
RELEASE_TESTING: 0 | |
jobs: | |
ubuntu-openssl: | |
name: 'Ubuntu 20.04 (Perl ${{ matrix.perl }}, OpenSSL ${{ matrix.openssl }})' | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
perl: | |
- '5.36' | |
- '5.34' | |
- '5.32' | |
- '5.30' | |
- '5.28' | |
- '5.26' | |
- '5.24' | |
- '5.22' | |
- '5.20' | |
- '5.18' | |
- '5.16' | |
- '5.14' | |
- '5.12' | |
- '5.10' | |
- '5.8' | |
openssl: | |
- '3.2.0' | |
- '3.1.4' | |
- '3.0.12' | |
- '1.1.1w' | |
- '1.1.0l' | |
- '1.0.2u' | |
- '1.0.1u' | |
- '1.0.0t' | |
- '0.9.8zh' | |
steps: | |
- name: Check out | |
uses: actions/checkout@v3 | |
- name: Install Perl ${{ matrix.perl }} | |
uses: shogo82148/actions-setup-perl@v1 | |
with: | |
perl-version: ${{ matrix.perl }} | |
- name: 'Install OpenSSL ${{ matrix.openssl }}' | |
run: | | |
os="ubuntu-20.04" | |
ver="openssl-${{ matrix.openssl }}" | |
curl -L "https://github.com/p5-net-ssleay/ci-libssl/releases/download/$ver/$ver-$os.tar.xz" \ | |
| tar -C $HOME -Jx | |
- name: Install dependencies | |
run: cpanm --quiet --installdeps --notest . | |
- name: Create makefile | |
run: | | |
LD_LIBRARY_PATH="$HOME/libssl/lib" \ | |
OPENSSL_PREFIX="$HOME/libssl" \ | |
perl Makefile.PL | |
- name: Build | |
run: | | |
LD_LIBRARY_PATH="$HOME/libssl/lib" \ | |
make | |
- name: Run test suite | |
run: | | |
LD_LIBRARY_PATH="$HOME/libssl/lib" \ | |
make test | |
ubuntu-libressl: | |
name: 'Ubuntu 20.04 (Perl ${{ matrix.perl }}, LibreSSL ${{ matrix.libressl }})' | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
perl: | |
- '5.36' | |
- '5.34' | |
- '5.32' | |
- '5.30' | |
- '5.28' | |
- '5.26' | |
- '5.24' | |
- '5.22' | |
- '5.20' | |
- '5.18' | |
- '5.16' | |
- '5.14' | |
- '5.12' | |
- '5.10' | |
- '5.8' | |
libressl: | |
- '3.8.2' | |
- '3.7.3' | |
- '3.6.3' | |
- '3.5.4' | |
- '3.4.3' | |
- '3.3.6' | |
- '3.2.7' | |
- '3.1.5' | |
- '3.0.2' | |
- '2.9.2' | |
- '2.8.3' | |
- '2.7.5' | |
- '2.6.5' | |
- '2.5.5' | |
- '2.4.5' | |
- '2.3.10' | |
- '2.2.9' | |
steps: | |
- name: Check out | |
uses: actions/checkout@v3 | |
- name: Install Perl ${{ matrix.perl }} | |
uses: shogo82148/actions-setup-perl@v1 | |
with: | |
perl-version: ${{ matrix.perl }} | |
- name: 'Install LibreSSL ${{ matrix.libressl }}' | |
run: | | |
os="ubuntu-20.04" | |
ver="libressl-${{ matrix.libressl }}" | |
curl -L "https://github.com/p5-net-ssleay/ci-libssl/releases/download/$ver/$ver-$os.tar.xz" \ | |
| tar -C $HOME -Jx | |
- name: Install dependencies | |
run: cpanm --quiet --installdeps --notest . | |
- name: Create makefile | |
run: | | |
LD_LIBRARY_PATH="$HOME/libssl/lib" \ | |
OPENSSL_PREFIX="$HOME/libssl" \ | |
perl Makefile.PL | |
- name: Build | |
run: | | |
LD_LIBRARY_PATH="$HOME/libssl/lib" \ | |
make | |
- name: Run test suite | |
run: | | |
LD_LIBRARY_PATH="$HOME/libssl/lib" \ | |
make test | |
non_x86_alpine: | |
name: "${{ matrix.platform }}/Alpine/${{ matrix.alpine_version }} (${{ matrix.package }})" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
package: | |
- openssl | |
- libressl | |
platform: | |
- i386 | |
- s390x | |
- arm32v6 | |
- arm32v7 | |
- arm64v8 | |
alpine_version: | |
- '3.18' | |
- '3.17' | |
- '3.16' | |
- '3.15' | |
exclude: | |
- package: libressl | |
platform: s390x | |
alpine_version: '3.18' | |
steps: | |
- uses: actions/checkout@main | |
with: | |
submodules: recursive | |
- name: Get the qemu container | |
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | |
# NB: “openssl” is correct, even for LibreSSL: | |
- name: Run tests on ${{ matrix.platform }} | |
run: docker run --rm --interactive --mount type=bind,source=$(pwd),target=/host ${{ matrix.platform }}/alpine:${{ matrix.alpine_version}} sh -c "apk add perl-dev perl-app-cpanminus make gcc musl-dev zlib-dev ${{ matrix.package }}-dev openssl && perl -V && cd /host && cpanm --verbose --notest --installdeps . && perl Makefile.PL && make test" | |
non_x86_ubuntu: | |
name: "${{ matrix.platform }}/Ubuntu" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
platform: | |
- i386 | |
- s390x | |
- arm32v7 | |
- arm64v8 | |
steps: | |
- uses: actions/checkout@main | |
with: | |
submodules: recursive | |
- name: Get the qemu container | |
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | |
- name: Run tests on ${{ matrix.platform }} | |
run: docker run --rm --interactive --mount type=bind,source=$(pwd),target=/host ${{ matrix.platform }}/ubuntu bash -c "apt update && apt install -y cpanminus make gcc openssl libssl-dev zlib1g-dev && perl -V && cd /host && cpanm --notest --verbose --installdeps . || find /root/.cpanm/work/ -type f | xargs cat; perl Makefile.PL && make test" | |
BSDs: | |
runs-on: macos-12 | |
name: ${{ matrix.os.pretty_name }} ${{ matrix.os.version }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- name: freebsd | |
pretty_name: FreeBSD (OpenSSL default) | |
version: '13.2' | |
pkginstall: pkg install -y p5-ExtUtils-MakeMaker p5-App-cpanminus | |
- name: freebsd | |
pretty_name: FreeBSD (OpenSSL 3.0) | |
version: '13.2' | |
pkginstall: pkg install -y p5-ExtUtils-MakeMaker p5-App-cpanminus openssl30 | |
- name: freebsd | |
pretty_name: FreeBSD (OpenSSL 3.1) | |
version: '13.2' | |
pkginstall: pkg install -y p5-ExtUtils-MakeMaker p5-App-cpanminus openssl31 | |
- name: freebsd | |
pretty_name: FreeBSD (LibreSSL) | |
version: '13.2' | |
pkginstall: pkg install -y p5-ExtUtils-MakeMaker p5-App-cpanminus libressl libressl-devel | |
- name: openbsd | |
pretty_name: OpenBSD | |
version: '7.3' | |
pkginstall: pkg_add curl | |
- name: openbsd | |
pretty_name: OpenBSD | |
version: '7.2' | |
pkginstall: pkg_add curl | |
- name: netbsd | |
pretty_name: NetBSD | |
version: '9.3' | |
pkginstall: /usr/sbin/pkg_add http://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/9.3/All/p5-App-cpanminus | |
steps: | |
- uses: actions/checkout@main | |
with: | |
submodules: recursive | |
- name: Test on ${{ matrix.os.name }} | |
uses: cross-platform-actions/action@master | |
env: | |
AUTOMATED_TESTING: 1 | |
with: | |
operating_system: ${{ matrix.os.name }} | |
version: ${{ matrix.os.version }} | |
shell: bash | |
# Makefile.PL interacts with the TTY, which tricks up the runner. | |
# Thus the piped “echo n”. | |
# | |
run: | | |
sudo ${{ matrix.os.pkginstall }}; | |
which cpanm || curl https://cpanmin.us | perl - --sudo App::cpanminus | |
cpanm --verbose --notest --installdeps --with-configure .; | |
echo n | perl Makefile.PL; | |
make test; | |
cygwin: | |
runs-on: windows-latest | |
steps: | |
- name: Set up Cygwin | |
uses: cygwin/cygwin-install-action@master | |
with: | |
platform: x86_64 | |
packages: perl_base perl-ExtUtils-MakeMaker make gcc-g++ libcrypt-devel libssl-devel curl bash | |
- uses: actions/checkout@main | |
with: | |
submodules: recursive | |
- run: perl -V | |
shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' | |
- name: Install cpanm | |
run: curl https://cpanmin.us | perl - App::cpanminus | |
shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' | |
- name: Install Dependencies | |
run: cd $GITHUB_WORKSPACE; cpanm --verbose --notest --installdeps --with-configure . | |
shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' | |
- name: perl Makefile.PL | |
run: cd $GITHUB_WORKSPACE; perl Makefile.PL | |
shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' | |
- name: make | |
run: cd $GITHUB_WORKSPACE; make -j3 -j3 | |
shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' | |
- name: make test | |
run: cd $GITHUB_WORKSPACE; make test | |
shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' | |