mumble/scripts/travis-ci/before_install.bash
Mikkel Krautz edd1de098a scripts/travis-ci: bump apt timeout in before_install.bash.
After switching to using a mirror of MXE on dl.mumble.info we've begun
running into timeouts from apt on Travis CI. For example:

	E: Failed to fetch https://dl.mumble.info/mirror/pkg.mxe.cc/repos/apt/debian/pool/main/m/mxe-x86-64-unknown-linux-gnu-cmake/mxe-x86-64-unknown-linux-gnu-cmake_3.5.2-20170208_amd64.deb  Operation too slow. Less than 10 bytes/sec transferred the last 10 seconds

The error is from cURL, and it means that the options CURLOPT_LOW_SPEED_LIMIT
and CURLOPT_LOW_SPEED_TIME are set quite low.
(See bb0ffcc36f/lib/speedcheck.c)

To fix this, we set the Acquire::http::Timeout option to 120 seconds.
This causes apt's https transport to set CURLOPT_LOW_SPEED_TIME to 120.
(See https://github.com/Debian/apt/blob/debian/wheezy/methods/https.cc#L224-L230)

Fixes mumble-voip/mumble#3312
2018-01-20 15:24:42 +01:00

71 lines
3.0 KiB
Bash
Executable File

#!/bin/bash -ex
#
# Copyright 2005-2018 The Mumble Developers. All rights reserved.
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
MUMBLE_HOST_DEB=${MUMBLE_HOST/_/-}
if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
# Bump the apt http timeout to 120 seconds.
# Without this, we'd regularly get timeout errors
# from our MXE mirror on dl.mumble.info.
#
# See mumble-voip/mumble#3312 for more information.
echo 'Acquire::http::Timeout "120";' | sudo tee /etc/apt/apt.conf.d/99zzztimeout
if [ "${MUMBLE_QT}" == "qt4" ] && [ "${MUMBLE_HOST}" == "x86_64-linux-gnu" ]; then
sudo apt-get -qq update
sudo apt-get build-dep -qq mumble
elif [ "${MUMBLE_QT}" == "qt5" ] && [ "${MUMBLE_HOST}" == "x86_64-linux-gnu" ]; then
sudo apt-get -qq update
sudo apt-get build-dep -qq mumble
sudo apt-get install qt5-default qttools5-dev qttools5-dev-tools qtbase5-dev qtbase5-dev-tools qttranslations5-l10n libqt5svg5-dev
elif [ "${MUMBLE_QT}" == "qt5" ] && [ "${MUMBLE_HOST}" == "i686-w64-mingw32" ]; then
sudo dpkg --add-architecture i386
sudo apt-get -qq update
echo "deb https://dl.mumble.info/mirror/pkg.mxe.cc/repos/apt/debian jessie main" | sudo tee /etc/apt/sources.list.d/mxeapt.list
sudo apt-key adv --keyserver x-hkp://keys.gnupg.net --recv-keys D43A795B73B16ABE9643FE1AFD8FFF16DB45C6AB
sudo apt-get -qq update
sudo apt-get install \
wine \
mxe-${MUMBLE_HOST_DEB}.static-qtbase \
mxe-${MUMBLE_HOST_DEB}.static-qtsvg \
mxe-${MUMBLE_HOST_DEB}.static-qttools \
mxe-${MUMBLE_HOST_DEB}.static-qttranslations \
mxe-${MUMBLE_HOST_DEB}.static-boost \
mxe-${MUMBLE_HOST_DEB}.static-protobuf \
mxe-${MUMBLE_HOST_DEB}.static-sqlite \
mxe-${MUMBLE_HOST_DEB}.static-flac \
mxe-${MUMBLE_HOST_DEB}.static-ogg \
mxe-${MUMBLE_HOST_DEB}.static-vorbis \
mxe-${MUMBLE_HOST_DEB}.static-libsndfile
elif [ "${MUMBLE_QT}" == "qt5" ] && [ "${MUMBLE_HOST}" == "x86_64-w64-mingw32" ]; then
sudo dpkg --add-architecture i386
sudo apt-get -qq update
echo "deb https://dl.mumble.info/mirror/pkg.mxe.cc/repos/apt/debian jessie main" | sudo tee /etc/apt/sources.list.d/mxeapt.list
sudo apt-key adv --keyserver x-hkp://keys.gnupg.net --recv-keys D43A795B73B16ABE9643FE1AFD8FFF16DB45C6AB
sudo apt-get -qq update
sudo apt-get install \
wine \
mxe-${MUMBLE_HOST_DEB}.static-qtbase \
mxe-${MUMBLE_HOST_DEB}.static-qtsvg \
mxe-${MUMBLE_HOST_DEB}.static-qttools \
mxe-${MUMBLE_HOST_DEB}.static-qttranslations \
mxe-${MUMBLE_HOST_DEB}.static-boost \
mxe-${MUMBLE_HOST_DEB}.static-protobuf \
mxe-${MUMBLE_HOST_DEB}.static-sqlite \
mxe-${MUMBLE_HOST_DEB}.static-flac \
mxe-${MUMBLE_HOST_DEB}.static-ogg \
mxe-${MUMBLE_HOST_DEB}.static-vorbis \
mxe-${MUMBLE_HOST_DEB}.static-libsndfile
else
exit 1
fi
elif [ "${TRAVIS_OS_NAME}" == "osx" ]; then
brew update && brew install qt5 libogg libvorbis flac libsndfile protobuf openssl ice
else
exit 1
fi