From: Joe Orton Date: Thu, 21 Nov 2019 09:30:34 +0000 (+0000) Subject: Support travis builds against APR/APR-util non-trunk branches. X-Git-Tag: 2.5.0-alpha2-ci-test-only~1779 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e18b2f5a721528d70f08763fb1b919c23ad7c946;p=thirdparty%2Fapache%2Fhttpd.git Support travis builds against APR/APR-util non-trunk branches. Add job for APR 1.7.x + APR-util 1.7.x. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1870077 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/.travis.yml b/.travis.yml index 15e9a841608..fdb26de9fa2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -100,6 +100,11 @@ matrix: CONFIG="--enable-mods-shared=reallyall" APU_CONFIG="--with-crypto" # ------------------------------------------------------------------------- + - name: Linux Ubuntu, APR 1.7.x, APR-util 1.7.x + env: APR_VERSION=1.7.x APU_VERSION=1.7.x + CONFIG="--enable-mods-shared=reallyall" + APU_CONFIG="--with-crypto" + # ------------------------------------------------------------------------- - name: Linux Ubuntu, APR 1.7.0 --enable-pool-debug, APR-util 1.6.1 env: APR_VERSION=1.7.0 APR_CONFIG="--enable-pool-debug" APU_VERSION=1.6.1 diff --git a/test/travis_before_linux.sh b/test/travis_before_linux.sh index 999837f3aec..94287947c13 100755 --- a/test/travis_before_linux.sh +++ b/test/travis_before_linux.sh @@ -2,49 +2,48 @@ if ! test -v SKIP_TESTING; then svn export -q https://svn.apache.org/repos/asf/httpd/test/framework/trunk test/perl-framework fi -if test -v APR_VERSION; then - # For APR trunk the cached version at ~/root/apr-trunk will be - # stale if the current trunk revision is different from that of - # the cached build. Here, cache and check the rev number of the - # build accordingly. - trunk_url=https://svn.apache.org/repos/asf/apr/apr/trunk - if test $APR_VERSION = trunk; then - trunk_rev=`svn info --show-item last-changed-revision ${trunk_url}` - # Blow away the cached trunk install if the revision does not - # match. - test -f $HOME/root/apr-trunk/.revision-is-${trunk_rev} || rm -rf $HOME/root/apr-trunk - fi - if ! test -d $HOME/root/apr-${APR_VERSION}; then - case $APR_VERSION in - trunk) svn export -q -r ${trunk_rev} ${trunk_url} $HOME/build/apr-trunk ;; - *) svn export -q https://svn.apache.org/repos/asf/apr/apr/tags/${APR_VERSION} \ - $HOME/build/apr-${APR_VERSION} ;; - esac - pushd $HOME/build/apr-${APR_VERSION} - ./buildconf - ./configure ${APR_CONFIG} --prefix=$HOME/root/apr-${APR_VERSION} - make -j2 - make install - if test -v trunk_rev; then - # Record the revision built in the cache. - touch $HOME/root/apr-${APR_VERSION}/.revision-is-${trunk_rev} - fi - popd - APU_CONFIG="$APU_CONFIG --with-apr=$HOME/root/apr-${APR_VERSION}" + +function install_apx() { + local name=$1 + local version=$2 + local root=https://svn.apache.org/repos/asf/apr/${name} + local prefix=${HOME}/root/${name}-${version} + local build=${HOME}/build/${name}-${version} + local config=$3 + local buildconf=$4 + + case $version in + trunk) url=${root}/trunk ;; + *.x) url=${root}/branches/${version} ;; + *) url=${root}/tags/${version} ;; + esac + + local revision=`svn info --show-item last-changed-revision ${url}` + + # Blow away the cached install root if the revision does not + # match. + test -f ${prefix}/.revision-is-${revision} || rm -rf ${prefix} + + if test -d ${prefix}; then + return 0 fi + + svn export -q -r ${revision} ${url} ${build} + pushd $build + ./buildconf ${buildconf} + ./configure --prefix=${prefix} ${config} + make -j2 + make install + popd + + touch ${prefix}/.revision-is-${revision} +} + +if test -v APR_VERSION; then + install_apx apr ${APR_VERSION} "${APR_CONFIG}" + APU_CONFIG="$APU_CONFIG --with-apr=$HOME/root/apr-${APR_VERSION}" fi + if test -v APU_VERSION; then - if ! test -d $HOME/root/apu-${APU_VERSION}; then - case $APU_VERSION in - trunk) url=https://svn.apache.org/repos/asf/apr/apr-util/trunk ;; - *) url=https://svn.apache.org/repos/asf/apr/apr-util/tags/${APU_VERSION} ;; - esac - svn export -q ${url} $HOME/build/apu-${APU_VERSION} - pushd $HOME/build/apu-${APU_VERSION} - ./buildconf --with-apr=$HOME/build/apr-${APR_VERSION} - ./configure ${APU_CONFIG} --prefix=$HOME/root/apu-${APU_VERSION} - make -j2 - make install - popd - fi + install_apx apr-util ${APU_VERSION} "${APU_CONFIG}" --with-apr=$HOME/build/apr-${APR_VERSION} fi diff --git a/test/travis_run_linux.sh b/test/travis_run_linux.sh index 5f1268fe692..db2917e0257 100755 --- a/test/travis_run_linux.sh +++ b/test/travis_run_linux.sh @@ -19,7 +19,7 @@ else CONFIG="$CONFIG --with-apr=/usr" fi if test -v APU_VERSION; then - CONFIG="$CONFIG --with-apr-util=$HOME/root/apu-${APU_VERSION}" + CONFIG="$CONFIG --with-apr-util=$HOME/root/apr-util-${APU_VERSION}" else CONFIG="$CONFIG --with-apr-util=/usr" fi