]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Support travis builds against APR/APR-util non-trunk branches.
authorJoe Orton <jorton@apache.org>
Thu, 21 Nov 2019 09:30:34 +0000 (09:30 +0000)
committerJoe Orton <jorton@apache.org>
Thu, 21 Nov 2019 09:30:34 +0000 (09:30 +0000)
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

.travis.yml
test/travis_before_linux.sh
test/travis_run_linux.sh

index 15e9a8416082aa70e953f82651f69e0eb695f17e..fdb26de9fa264f72231a10fa27a9c64958c3cc6a 100644 (file)
@@ -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
index 999837f3aec450ca0b536e7c2faea80c5a30c923..94287947c13e8f43d5f42e5521729393f88bb798 100755 (executable)
@@ -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
index 5f1268fe692f296c3a74c54882d60ab0d7e8334b..db2917e025731066c90b27f2d013469e37a0d3c0 100755 (executable)
@@ -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