TT#82051 Fix Travis builds

utils/build_deps.sh with its gdebi usage doesn't support our needs,
so switch to mk-build-deps instead and apply some needed workarounds
to successfully run on Travis environment, which uses Ubuntu
xenial/16.04 LTS:

* The Build-Depends changes from commits 0fc0c4732 and 2868fc6f5
  didn't have Ubuntu xenial/16.04 LTS in mind

* Commit 1f10dc30d introduced a RELEASE_DATE handling that's
  not supported by dpkg-parsechangelog on Ubuntu xenial/16.04 LTS

Change-Id: I5cd4e63e686d906b622eb965ba8e539ece01c53b
changes/76/40276/2
Michael Prokop 5 years ago
parent 64e6bf440b
commit e580c7c7f8

@ -3,9 +3,18 @@ compiler:
- gcc
- clang
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y gdebi-core
- sudo ./utils/build_deps.sh $TRAVIS_BUILD_DIR
- sudo apt-get update
- sudo apt-get -y install devscripts equivs
# workarounds for Ubuntu xenial/16.04 LTS,
# `apt-get -y build-dep -Ppkg.ngcp-rtpengine.nobcg729 .`
# as well as several Build-Deps aren't available
- sed -i '/libbcg729-dev/d' debian/control
- sed -i 's/default-libmysqlclient-dev/libmysqlclient-dev/' debian/control
- sed -i 's/libiptc-dev/iptables-dev/' debian/control
- sed -i 's/debhelper-compat.*/debhelper,/' debian/control
- mk-build-deps --build-dep --install --remove --root-cmd sudo
script:
- make -C iptables-extension
- make -C daemon -j`nproc`
# `dpkg-parsechangelog [...] -STimestamp` is not available
# on Ubuntu xenial/16.04 LTS
- RELEASE_DATE=travis-$(date +%s) make -C daemon -j$(nproc)

@ -1,22 +0,0 @@
#!/bin/bash
#
# build_deps script for travis CI
# installs the build_deps packages needed to build Kamailio
# environment based on Ubuntu 12.04 LTS (precise)
#
BASE_DIR=${1:-$(pwd)}
CONTROL_FILE="${BASE_DIR}/debian/control"
if ! [ -f "${CONTROL_FILE}" ]; then
echo "Error: No ${CONTROL_FILE} found"
exit 1
fi
BUILD_DEPS=($(/usr/bin/gdebi --quiet --non-interactive \
--option=APT::Install-Recommends=false \
--apt-line "${CONTROL_FILE}"))
if [ ${#BUILD_DEPS[@]} -eq 0 ]; then
echo "Error: no build deps packages resolved"
exit 2
fi
apt-get install -y "${BUILD_DEPS[@]}"
Loading…
Cancel
Save