Skip to content

Commit df2c7b7

Browse files
committed
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
1 parent 4201109 commit df2c7b7

File tree

3 files changed

+30
-34
lines changed

3 files changed

+30
-34
lines changed

.github/workflows/linux.yml

+9-14
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ jobs:
8080
APR_VERSION=1.7.4
8181
APU_VERSION=1.6.3
8282
APU_CONFIG="--with-crypto --with-ldap"
83-
CLEAR_CACHE=1
8483
# -------------------------------------------------------------------------
8584
- name: APR 1.8.x, APR-util 1.7.x
8685
config: --enable-mods-shared=reallyall
@@ -151,7 +150,6 @@ jobs:
151150
TEST_LDAP=1
152151
TEST_ARGS="-defines LDAP"
153152
TESTS="t/modules/"
154-
CLEAR_CACHE=1
155153
# -------------------------------------------------------------------------
156154
- name: APR trunk thread debugging
157155
config: --enable-mods-shared=reallyall --with-mpm=event
@@ -210,18 +208,17 @@ jobs:
210208
# TEST_MD=1
211209
# -------------------------------------------------------------------------
212210
### TODO: if: *condition_not_24x
213-
### TODO: fix caching here.
214211
- name: MOD_TLS test suite
215212
config: --enable-mods-shared=reallyall --with-mpm=event --enable-mpms-shared=event
216213
pkgs: curl python3-pytest nghttp2-client python3-cryptography python3-requests python3-multipart python3-filelock python3-websockets cargo cbindgen
217214
env: |
218215
APR_VERSION=1.7.4
219216
APU_VERSION=1.6.3
220217
APU_CONFIG="--with-crypto"
218+
RUSTLS_VERSION="v0.10.0"
221219
NO_TEST_FRAMEWORK=1
222220
TEST_INSTALL=1
223221
TEST_MOD_TLS=1
224-
CLEAR_CACHE=1
225222
# -------------------------------------------------------------------------
226223
### TODO if: *condition_not_24x
227224
### TODO: Fails because :i386 packages are not being found.
@@ -246,7 +243,9 @@ jobs:
246243
name: ${{ matrix.name }}
247244
steps:
248245
- name: Set environment variables
249-
run: echo "${{ matrix.env }}" >> $GITHUB_ENV
246+
run: |
247+
echo "${{ matrix.env }}" >> $GITHUB_ENV
248+
echo JOBID=`echo "${{ matrix.notest-cflags }} ${{ matrix.env }} ${{ matrix.config }}'"| md5sum - | sed 's/ .*//'` >> $GITHUB_ENV
250249
- name: apt refresh
251250
run: sudo apt-get -o Acquire::Retries=5 update
252251
- name: Install prerequisites
@@ -256,34 +255,30 @@ jobs:
256255
libnghttp2-dev libjansson-dev libpcre2-dev gdb
257256
perl-doc ${{ matrix.pkgs }}
258257
- uses: actions/checkout@v3
259-
- name: Cache APR build
258+
- name: Cache installed libraries
260259
uses: actions/cache@v3
261-
env:
262-
cache-name: cache-apru
263260
with:
264261
path: ~/root
265-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('/home/runner/root/.key-*') }}
262+
key: cache-libs-${{ env.JOBID }}
266263
- name: Cache CPAN modules
267264
uses: actions/cache@v3
268-
env:
269-
cache-name: cache-cpan
270265
with:
271266
path: ~/perl5
272-
key: ${{ runner.os }}-cpan-${{ env.cache-name }}-${{ hashFiles('/home/runner/perl5/.key') }}
267+
key: cache-cpan-${{ env.JOBID }}
273268
- name: Configure environment
274269
run: ./test/travis_before_linux.sh
275270
timeout-minutes: 15
276271
- uses: actions/upload-artifact@v3
277272
if: failure()
278273
with:
279-
name: config.log ${{ matrix.node-version }}
274+
name: config.log-${{ env.JOBID }}
280275
path: |
281276
/home/runner/build/**/config.log
282277
- name: Build and test
283278
run: ./test/travis_run_linux.sh
284279
- uses: actions/upload-artifact@v3
285280
if: failure()
286281
with:
287-
name: error_log ${{ matrix.node-version }}
282+
name: error_log-${{ env.JOBID }}
288283
path: test/perl-framework/t/logs/error_log
289284

test/travis_before_linux.sh

+15-7
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ function install_apx() {
7171
# Blow away the cached install root if the cached install is stale
7272
# or doesn't match the expected configuration.
7373
grep -q "${version} ${revision} ${config} CC=$CC" ${HOME}/root/.key-${name} || rm -rf ${prefix}
74-
# TEST_H2 APR cache seems to be broken, do not use.
75-
# Unknown why this happens on this CI job only and how to fix it
76-
if test -v TEST_H2; then
77-
rm -rf ${prefix}
78-
fi
7974

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

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

@@ -176,3 +172,15 @@ if test -v APU_VERSION; then
176172
install_apx apr-util ${APU_VERSION} "${APU_CONFIG}" --with-apr=$HOME/build/apr-${APR_VERSION}
177173
ldd $HOME/root/apr-util-${APU_VERSION}/lib/libaprutil-?.so || true
178174
fi
175+
176+
# Since librustls is not a package (yet) on any platform, we
177+
# build the version we want from source
178+
if test -v TEST_MOD_TLS -a -v RUSTLS_VERSION; then
179+
if ! test -d $HOME/root/rustls; then
180+
RUSTLS_HOME="$HOME/build/rustls-ffi"
181+
git clone -q --depth=1 -b "$RUSTLS_VERSION" https://github.com/rustls/rustls-ffi.git "$RUSTLS_HOME"
182+
pushd "$RUSTLS_HOME"
183+
make install DESTDIR="$HOME/root/rustls"
184+
popd
185+
fi
186+
fi

test/travis_run_linux.sh

+6-13
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ fi
3131

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

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

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

6962
if test -v TEST_OPENSSL3; then

0 commit comments

Comments
 (0)