Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.4.x: CI updates from trunk #418

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ jobs:
APR_VERSION=1.7.4
APU_VERSION=1.6.3
APU_CONFIG="--with-crypto --with-ldap"
CLEAR_CACHE=1
# -------------------------------------------------------------------------
- name: APR 1.8.x, APR-util 1.7.x
config: --enable-mods-shared=reallyall
Expand Down Expand Up @@ -151,7 +150,6 @@ jobs:
TEST_LDAP=1
TEST_ARGS="-defines LDAP"
TESTS="t/modules/"
CLEAR_CACHE=1
# -------------------------------------------------------------------------
- name: APR trunk thread debugging
config: --enable-mods-shared=reallyall --with-mpm=event
Expand Down Expand Up @@ -210,18 +208,17 @@ jobs:
# TEST_MD=1
# -------------------------------------------------------------------------
### TODO: if: *condition_not_24x
### TODO: fix caching here.
- name: MOD_TLS test suite
config: --enable-mods-shared=reallyall --with-mpm=event --enable-mpms-shared=event
pkgs: curl python3-pytest nghttp2-client python3-cryptography python3-requests python3-multipart python3-filelock python3-websockets cargo cbindgen
env: |
APR_VERSION=1.7.4
APU_VERSION=1.6.3
APU_CONFIG="--with-crypto"
RUSTLS_VERSION="v0.10.0"
NO_TEST_FRAMEWORK=1
TEST_INSTALL=1
TEST_MOD_TLS=1
CLEAR_CACHE=1
# -------------------------------------------------------------------------
### TODO if: *condition_not_24x
### TODO: Fails because :i386 packages are not being found.
Expand All @@ -246,7 +243,9 @@ jobs:
name: ${{ matrix.name }}
steps:
- name: Set environment variables
run: echo "${{ matrix.env }}" >> $GITHUB_ENV
run: |
echo "${{ matrix.env }}" >> $GITHUB_ENV
echo JOBID=`echo "${{ matrix.notest-cflags }} ${{ matrix.env }} ${{ matrix.config }}'"| md5sum - | sed 's/ .*//'` >> $GITHUB_ENV
- name: apt refresh
run: sudo apt-get -o Acquire::Retries=5 update
- name: Install prerequisites
Expand All @@ -256,34 +255,30 @@ jobs:
libnghttp2-dev libjansson-dev libpcre2-dev gdb
perl-doc ${{ matrix.pkgs }}
- uses: actions/checkout@v3
- name: Cache APR build
- name: Cache installed libraries
uses: actions/cache@v3
env:
cache-name: cache-apru
with:
path: ~/root
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('/home/runner/root/.key-*') }}
key: cache-libs-${{ env.JOBID }}
- name: Cache CPAN modules
uses: actions/cache@v3
env:
cache-name: cache-cpan
with:
path: ~/perl5
key: ${{ runner.os }}-cpan-${{ env.cache-name }}-${{ hashFiles('/home/runner/perl5/.key') }}
key: cache-cpan-${{ env.JOBID }}
- name: Configure environment
run: ./test/travis_before_linux.sh
timeout-minutes: 15
- uses: actions/upload-artifact@v3
if: failure()
with:
name: config.log ${{ matrix.node-version }}
name: config.log-${{ env.JOBID }}
path: |
/home/runner/build/**/config.log
- name: Build and test
run: ./test/travis_run_linux.sh
- uses: actions/upload-artifact@v3
if: failure()
with:
name: error_log ${{ matrix.node-version }}
name: error_log-${{ env.JOBID }}
path: test/perl-framework/t/logs/error_log

22 changes: 15 additions & 7 deletions test/travis_before_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@ function install_apx() {
# Blow away the cached install root if the cached install is stale
# or doesn't match the expected configuration.
grep -q "${version} ${revision} ${config} CC=$CC" ${HOME}/root/.key-${name} || rm -rf ${prefix}
# TEST_H2 APR cache seems to be broken, do not use.
# Unknown why this happens on this CI job only and how to fix it
if test -v TEST_H2; then
rm -rf ${prefix}
fi

if test -d ${prefix}; then
return 0
Expand All @@ -95,8 +90,9 @@ function install_apx() {
# Allow to load $HOME/build/apache/httpd/.gdbinit
echo "add-auto-load-safe-path $HOME/work/httpd/httpd/.gdbinit" >> $HOME/.gdbinit

# Prepare perl-framework test environment
if ! test -v SKIP_TESTING; then
# Unless either SKIP_TESTING or NO_TEST_FRAMEWORK are set, install
# CPAN modules required to run the Perl test framework.
if ! test -v SKIP_TESTING -o -v NO_TEST_FRAMEWORK; then
# Clear CPAN cache if necessary
if [ -v CLEAR_CACHE ]; then rm -rf ~/perl5; fi

Expand Down Expand Up @@ -176,3 +172,15 @@ if test -v APU_VERSION; then
install_apx apr-util ${APU_VERSION} "${APU_CONFIG}" --with-apr=$HOME/build/apr-${APR_VERSION}
ldd $HOME/root/apr-util-${APU_VERSION}/lib/libaprutil-?.so || true
fi

# Since librustls is not a package (yet) on any platform, we
# build the version we want from source
if test -v TEST_MOD_TLS -a -v RUSTLS_VERSION; then
if ! test -d $HOME/root/rustls; then
RUSTLS_HOME="$HOME/build/rustls-ffi"
git clone -q --depth=1 -b "$RUSTLS_VERSION" https://github.com/rustls/rustls-ffi.git "$RUSTLS_HOME"
pushd "$RUSTLS_HOME"
make install DESTDIR="$HOME/root/rustls"
popd
fi
fi
19 changes: 6 additions & 13 deletions test/travis_run_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ fi

PREFIX=${PREFIX:-$HOME/build/httpd-root}

# For trunk, "make check" is sufficient to run the test suite.
# For 2.4.x, the test suite must be run manually
if test ! -v SKIP_TESTING; then
# If perl-framework testing is required it is checked out here by
# _before_linux.sh:
if test -d test/perl-framework; then
CONFIG="$CONFIG --enable-load-all-modules"
if grep -q ^check: Makefile.in; then
CONFIG="--with-test-suite=test/perl-framework $CONFIG"
Expand All @@ -54,16 +54,9 @@ else
CONFIG="$CONFIG --with-apr-util=/usr"
fi

# Since librustls is not a package (yet) on any platform, we
# build the version we want from source
if test -v TEST_MOD_TLS; then
RUSTLS_HOME="$HOME/build/rustls-ffi"
RUSTLS_VERSION="v0.10.0"
git clone -b "$RUSTLS_VERSION" https://github.com/rustls/rustls-ffi.git "$RUSTLS_HOME"
pushd "$RUSTLS_HOME"
make install DESTDIR="$PREFIX"
popd
CONFIG="$CONFIG --with-tls --with-rustls=$PREFIX"
# Pick up the rustls install built previously.
if test -v TEST_MOD_TLS -a RUSTLS_VERSION; then
CONFIG="$CONFIG --with-tls --with-rustls=$HOME/root/rustls"
fi

if test -v TEST_OPENSSL3; then
Expand Down
Loading