Skip to content

Commit b7aad86

Browse files
committed
Merge r1932005 from trunk: [skip ci]
CI: Add alternative path to build APR/APR-util releases from a tarball if TEST_APR_TARBALL is set. GitHub: part of #605 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1932006 13f79535-47bb-0310-9956-ffa450edef68
1 parent 721bd43 commit b7aad86

1 file changed

Lines changed: 29 additions & 16 deletions

File tree

test/travis_before_linux.sh

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,22 @@ function install_apx() {
2929
local giturl=https://github.com/apache/${name}.git
3030
local config=$3
3131
local buildconf=$4
32-
33-
case $version in
34-
trunk|*.x) ref=refs/heads/${version} ;;
35-
*) ref=refs/tags/${version} ;;
36-
esac
37-
38-
# Fetch the object ID (hash) of latest commit
39-
local commit=`git ls-remote ${giturl} ${ref} | cut -f1`
40-
if test -z "$commit"; then
41-
: Could not determine latest commit hash for ${ref} in ${giturl} - check branch is valid?
42-
exit 1
32+
local commit=tarball
33+
34+
mkdir -p ${HOME}/build
35+
36+
if ! test -v TEST_APR_TARBALL; then
37+
case $version in
38+
trunk|*.x) ref=refs/heads/${version} ;;
39+
*) ref=refs/tags/${version} ;;
40+
esac
41+
42+
# Fetch the object ID (hash) of latest commit
43+
commit=`git ls-remote ${giturl} ${ref} | cut -f1`
44+
if test -z "$commit"; then
45+
: Could not determine latest commit hash for ${ref} in ${giturl} - check branch is valid?
46+
exit 1
47+
fi
4348
fi
4449

4550
# Blow away the cached install root if the cached install is stale
@@ -50,16 +55,24 @@ function install_apx() {
5055
return 0
5156
fi
5257

53-
git init -q ${build}
54-
pushd $build
58+
if test -v TEST_APR_TARBALL; then
59+
curl https://archive.apache.org/dist/apr/${name}-${version}.tar.gz > apx.tar.gz
60+
tar -C ${HOME}/build -xzf apx.tar.gz
61+
rm apx.tar.gz
62+
pushd ${build}
63+
else
64+
git init -q ${build}
65+
pushd $build
5566
# Clone and checkout the commit identified above.
5667
git remote add origin ${giturl}
5768
git fetch -q --depth=1 origin ${commit}
5869
git checkout ${commit}
5970
./buildconf ${buildconf}
60-
./configure --prefix=${prefix} ${config}
61-
make -j2
62-
make install
71+
fi
72+
73+
./configure --prefix=${prefix} ${config}
74+
make -j2
75+
make install
6376
popd
6477

6578
echo ${version} ${commit} "${config}" "CC=${CC}" > ${HOME}/root/.key-${name}

0 commit comments

Comments
 (0)