]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
CI: Add alternative path to build APR/APR-util releases from trunk trunk
authorJoe Orton <jorton@apache.org>
Mon, 23 Feb 2026 11:50:48 +0000 (11:50 +0000)
committerJoe Orton <jorton@apache.org>
Mon, 23 Feb 2026 11:50:48 +0000 (11:50 +0000)
a tarball if TEST_APR_TARBALL is set.

GitHub: part of #605

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1932005 13f79535-47bb-0310-9956-ffa450edef68

test/travis_before_linux.sh

index 0b7892cea8346fc4001eb89bc7cfaaa163e7b751..d35f61cf6336b95a9a012aead26d64b234589c63 100755 (executable)
@@ -60,17 +60,22 @@ function install_apx() {
     local giturl=https://github.com/apache/${name}.git
     local config=$3
     local buildconf=$4
-
-    case $version in
-    trunk|*.x) ref=refs/heads/${version} ;;
-    *) ref=refs/tags/${version} ;;
-    esac
-
-    # Fetch the object ID (hash) of latest commit
-    local commit=`git ls-remote ${giturl} ${ref} | cut -f1`
-    if test -z "$commit"; then
-        : Could not determine latest commit hash for ${ref} in ${giturl} - check branch is valid?
-        exit 1
+    local commit=tarball
+
+    mkdir -p ${HOME}/build
+
+    if ! test -v TEST_APR_TARBALL; then
+         case $version in
+            trunk|*.x) ref=refs/heads/${version} ;;
+            *) ref=refs/tags/${version} ;;
+         esac
+
+         # Fetch the object ID (hash) of latest commit
+         commit=`git ls-remote ${giturl} ${ref} | cut -f1`
+         if test -z "$commit"; then
+            : Could not determine latest commit hash for ${ref} in ${giturl} - check branch is valid?
+            exit 1
+         fi
     fi
 
     # Blow away the cached install root if the cached install is stale
@@ -81,16 +86,24 @@ function install_apx() {
         return 0
     fi
 
-    git init -q ${build}
-    pushd $build
+    if test -v TEST_APR_TARBALL; then
+         curl https://archive.apache.org/dist/apr/${name}-${version}.tar.gz > apx.tar.gz
+         tar -C ${HOME}/build -xzf apx.tar.gz
+         rm apx.tar.gz
+         pushd ${build}
+    else
+         git init -q ${build}
+         pushd $build
          # Clone and checkout the commit identified above.
          git remote add origin ${giturl}
          git fetch -q --depth=1 origin ${commit}
          git checkout ${commit}
          ./buildconf ${buildconf}
-         ./configure --prefix=${prefix} ${config}
-         make -j2
-         make install
+    fi
+
+    ./configure --prefix=${prefix} ${config}
+    make -j2
+    make install
     popd
 
     echo ${version} ${commit} "${config}" "CC=${CC}" > ${HOME}/root/.key-${name}