From: Joe Orton Date: Fri, 1 Mar 2024 11:10:15 +0000 (+0000) Subject: Merge r1916051, r1916052, r1916053, r1916055, r1916056 from trunk: [CTR for CI changes] X-Git-Tag: 2.4.59-rc1-candidate~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df2c7b7cced5190fe236910ac8be2e0c7252d6dd;p=thirdparty%2Fapache%2Fhttpd.git Merge r1916051, r1916052, r1916053, r1916055, r1916056 from trunk: [CTR for CI changes] CI: Hopefully fix caching and artifact uploads by creating $JOBID as a unique key for each job in the matrix, using that as the cache key and in each artefact upload (otherwise multiple failures uploading "error_log" overwrite each other). CI: Enable caching for the rustls install used for mod_tls testing. CI: Re-enable caching for *fixed* versions of apr/apr-util which should now work correctly (since the version is in the cache key). For 1.x branches, CLEAR_CACHE must still be used. CI tweaks: - don't install CPAN modules if NO_TEST_FRAMEWORK is set - remove the workaround for mod_h2 APR build caching which should no longer be necessary now caching is fixed - fix capturing specific perl-framework failures with "TEST -v" mode Fix regression in r1916055 - don't duplicate logic in _run_linux.sh from _before_linux.sh in whether the perl-framework is used/needed. Github: closes #418 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1916069 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 4617d14f04a..33c7b858201 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -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 @@ -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 @@ -210,7 +208,6 @@ 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 @@ -218,10 +215,10 @@ jobs: 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. @@ -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 @@ -256,27 +255,23 @@ 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 @@ -284,6 +279,6 @@ jobs: - 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 diff --git a/test/travis_before_linux.sh b/test/travis_before_linux.sh index 1986c0fbcc6..2722c6a0b71 100755 --- a/test/travis_before_linux.sh +++ b/test/travis_before_linux.sh @@ -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 @@ -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 @@ -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 diff --git a/test/travis_run_linux.sh b/test/travis_run_linux.sh index 96103e1d5e8..373e6668ee6 100755 --- a/test/travis_run_linux.sh +++ b/test/travis_run_linux.sh @@ -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" @@ -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