Travis: Update config to reduce timeout errors.

Leverage homebrew/apt addons to install packages since they are documented
to automatically perform retries on failure.

This updates to Ubuntu Xenial and macOS Sierra, which are supported
versions.  This isn't to increase minimum requirements necessarily, but to
make sure Travis keeps running smoothly.
This commit is contained in:
Unknown W. Brackets 2019-07-04 13:22:11 -07:00
parent b0c4323714
commit 62c6d069c9
2 changed files with 24 additions and 57 deletions

View File

@ -18,53 +18,19 @@ download_extract_zip() {
unzip $2 2>&1 | pv > /dev/null unzip $2 2>&1 | pv > /dev/null
} }
brew_install() {
brew install $1
brew outdated $1 || brew upgrade $1
}
travis_before_install() { travis_before_install() {
git submodule update --init --recursive git submodule update --init --recursive
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
sudo apt-get update -qq
sudo apt-get install software-properties-common aria2 pv build-essential libgl1-mesa-dev libglu1-mesa-dev -qq
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
brew update
brew_install ccache
fi
}
setup_ccache_script() {
if [ ! -e "$1" ]; then
mkdir "$1"
fi
echo "#!/bin/bash" > "$1/$3"
echo "ccache $2/$3 \$*" >> "$1/$3"
chmod +x "$1/$3"
} }
travis_install() { travis_install() {
# Ubuntu Linux + GCC 4.8 # Ubuntu Linux + GCC 4.8
if [ "$PPSSPP_BUILD_TYPE" = "Linux" ]; then if [ "$PPSSPP_BUILD_TYPE" = "Linux" ]; then
# For libsdl2-dev.
sudo add-apt-repository ppa:zoogie/sdl2-snapshots -y
if [ "$CXX" = "g++" ]; then if [ "$CXX" = "g++" ]; then
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y sudo apt-get install -qq g++-4.8
fi
if [ "$QT" = "TRUE" ]; then
sudo add-apt-repository --yes ppa:ubuntu-sdk-team/ppa
fi
sudo apt-get update
sudo apt-get install libsdl2-dev -qq
if [ "$CXX" = "g++" ]; then
sudo apt-get install g++-4.8 -qq
fi fi
if [ "$QT" = "TRUE" ]; then if [ "$QT" = "TRUE" ]; then
sudo apt-get install -qq qt5-qmake qtmultimedia5-dev qtsystems5-dev qtbase5-dev qtdeclarative5-dev qttools5-dev-tools libqt5webkit5-dev libsqlite3-dev qt5-default sudo apt-get install -qq qt5-qmake qtmultimedia5-dev qtsystems5-dev qtbase5-dev qtdeclarative5-dev qttools5-dev-tools libqt5webkit5-dev libqt5opengl5-dev libsqlite3-dev qt5-default
fi fi
download_extract "https://cmake.org/files/v3.6/cmake-3.6.2-Linux-x86_64.tar.gz" cmake-3.6.2-Linux-x86_64.tar.gz download_extract "https://cmake.org/files/v3.6/cmake-3.6.2-Linux-x86_64.tar.gz" cmake-3.6.2-Linux-x86_64.tar.gz
@ -72,18 +38,9 @@ travis_install() {
# Android NDK + GCC 4.8 # Android NDK + GCC 4.8
if [ "$PPSSPP_BUILD_TYPE" = "Android" ]; then if [ "$PPSSPP_BUILD_TYPE" = "Android" ]; then
free -m
sudo apt-get install ant -qq
download_extract_zip http://dl.google.com/android/repository/${NDK_VER}-linux-x86_64.zip ${NDK_VER}-linux-x86_64.zip download_extract_zip http://dl.google.com/android/repository/${NDK_VER}-linux-x86_64.zip ${NDK_VER}-linux-x86_64.zip
fi fi
if [ "$PPSSPP_BUILD_TYPE" = "macOS" ]; then
brew_install sdl2
brew upgrade python
elif [ "$PPSSPP_BUILD_TYPE" = "iOS" ]; then
brew upgrade python
fi
# Ensure we're using ccache # Ensure we're using ccache
if [[ "$CXX" = "clang" && "$CC" == "clang" ]]; then if [[ "$CXX" = "clang" && "$CC" == "clang" ]]; then
export CXX="ccache clang" CC="ccache clang" export CXX="ccache clang" CC="ccache clang"

View File

@ -4,21 +4,31 @@ sudo: required
language: cpp language: cpp
dist: trusty dist: xenial
addons: addons:
apt: apt:
update: true
packages: packages:
- ant
- aria2
- build-essential - build-essential
- cmake
- libgl1-mesa-dev - libgl1-mesa-dev
- libglu1-mesa-dev - libglu1-mesa-dev
- cmake - libsdl2-dev
- aria2 - pv
- ant - software-properties-common
- lib32stdc++6 sources:
- lib32z1 - sourceline: 'ppa:zoogie/sdl2-snapshots'
- lib32z1-dev - sourceline: 'ppa:ubuntu-toolchain-r/test'
- lib32bz2-1.0 - sourceline: 'ppa:ubuntu-sdk-team/ppa'
homebrew:
update: true
packages:
- ccache
- python
- sdl2
cache: cache:
apt: true apt: true
@ -75,19 +85,19 @@ matrix:
env: PPSSPP_BUILD_TYPE=Linux env: PPSSPP_BUILD_TYPE=Linux
LIBRETRO=TRUE LIBRETRO=TRUE
- os: osx - os: osx
osx_image: xcode8 osx_image: xcode8.3
compiler: "clang" compiler: "clang"
env: PPSSPP_BUILD_TYPE=macOS env: PPSSPP_BUILD_TYPE=macOS
- os: osx - os: osx
osx_image: xcode8 osx_image: xcode8.3
compiler: "clang" compiler: "clang"
env: PPSSPP_BUILD_TYPE=iOS env: PPSSPP_BUILD_TYPE=iOS
before_install: before_install:
- bash .travis.sh travis_before_install - travis_retry bash .travis.sh travis_before_install
install: install:
- bash .travis.sh travis_install - travis_retry bash .travis.sh travis_install
script: script:
- bash .travis.sh travis_script - bash .travis.sh travis_script