Skip to content

Commit 3018561

Browse files
committed
CI: Add alternative path to build apr/apr-util releases from tarballs
for older releases, where ./buildconf may not work any more.
1 parent 9462635 commit 3018561

2 files changed

Lines changed: 32 additions & 18 deletions

File tree

.github/workflows/linux.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,11 @@ jobs:
9595
APU_CONFIG="--with-crypto --with-ldap"
9696
CLEAR_CACHE=1
9797
# -------------------------------------------------------------------------
98-
- name: APR 1.3.12, APR-util 1.3.12
98+
- name: APR 1.4.8, APR-util 1.3.12
9999
config: --enable-mods-shared=reallyall
100100
env: |
101-
APR_VERSION=1.3.12
101+
TEST_APR_TARBALL=yes
102+
APR_VERSION=1.4.8
102103
APU_VERSION=1.3.12
103104
APU_CONFIG="--with-crypto --with-ldap"
104105
# -------------------------------------------------------------------------

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)