Permalink
Browse files

Fix Travis CI build (#955)

* Fix Travis CI build

Add missing dependencies - why doesn't aptitude just download them??

* Try apt packages using apt add-on in Travis

* Remove some packages and fix host env variable

* Add libglib2.0-dev dependency for i686

* Maybe Release and Debug flavours?

* Split Debug and Release travis builds

* Add macOS build

* Brew install for OSX build

And reorder the builds

* Try using install script again

* Fix typo when running install script

* Fix install script for macOS

* Whitespace fixes

* Add missing space
  • Loading branch information...
xycaleth committed Jan 28, 2018
1 parent 32dcb33 commit 1d5c39ee88ad5f79c6634fc4853988db364dc70f
Showing with 70 additions and 44 deletions.
  1. +33 −16 .travis.yml
  2. +37 −28 scripts/travis/install.sh
@@ -2,22 +2,39 @@ language: cpp
sudo: required
dist: trusty
install:
- ./scripts/travis/install.sh "${host:-native}" "${flavour:-Release}" $opts
install: ./scripts/travis/install.sh "${host:-native}" $opts
script: ./scripts/travis/build.sh "${host:-native}" "${flavour:-Release}" $opts
script:
- ./scripts/travis/build.sh "${host:-native}" "${flavour:-Release}" $opts
compiler: gcc
env:
- ""
- flavour=Debug
- host=i686-linux-gnu
- host=i686-w64-mingw32
- host=x86_64-w64-mingw32
# One extra build with clang, its warnings are often better
matrix:
include:
- compiler: clang
env: ""
# Linux x64 Release
- os: linux
compiler: gcc
# macOS
- os: osx
compiler: clang
# Linux x64 Debug
- os: linux
compiler: gcc
env: flavour=Debug
# Linux i686 gcc
- os: linux
compiler: gcc
env: host=i686-linux-gnu
# Linux x64 mingw32
- os: linux
compiler: gcc
env: host=x86_64-w64-mingw32
# Linux i686 mingw32
- os: linux
compiler: gcc
env: host=i686-w64-mingw32
# Linux clang
- os: linux
compiler: clang
@@ -4,49 +4,58 @@ set -e
set -x
host="$1"
flavour="$2"
shift 2
shift 1
# travis-ci's Ubuntu 14.04 image provides an apt source for Chrome,
# which breaks i386 multiarch. Disable it: we don't need it for any of
# these builds anyway.
: | sudo tee /etc/apt/sources.list.d/google-chrome.list
# macOS is special
if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
brew install libpng sdl2 --universal
exit 0
fi
# do this before apt-get update
case "${host}" in
(i?86-linux-gnu)
sudo dpkg --add-architecture i386
;;
esac
sudo apt-get update -yq
# This is what Travis does using the apt-addon. Didn't want to duplicate a load
# of packages in the .travis.yml file though so we have this script instead.
APT_INSTALL='sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install'
sudo apt-get update -qq
sudo apt-get -q -y install cmake dpkg
${APT_INSTALL} cmake
case "${host}" in
(native)
# upgrade some relevant libraries to vaguely modern versions
sudo apt-get -q -y install libsdl2-dev libjpeg-turbo8-dev zlib1g-dev libpng12-dev
${APT_INSTALL} \
libsdl2-dev \
libjpeg-turbo8-dev \
zlib1g-dev \
libpng12-dev
;;
(i686-w64-mingw32)
sudo apt-get -q -y install g++-mingw-w64-i686
${APT_INSTALL} g++-mingw-w64-i686
;;
(x86_64-w64-mingw32)
sudo apt-get -q -y install g++-mingw-w64-x86-64
${APT_INSTALL} g++-mingw-w64-x86-64
;;
(i?86-linux-gnu)
# Install x86 libraries; remove anything that gets in the
# way, and also Java because that would be upgraded and is
# quite large.
sudo apt-get -q -y install \
oracle-java7-installer- oracle-java8-installer- \
libglib2.0-dev- libglu1-mesa-dev- \
libgl1-mesa-dev:i386 libpulse-dev:i386 libglu1-mesa-dev:i386 \
libsdl2-dev:i386 libjpeg-turbo8-dev:i386 zlib1g-dev:i386 libc6-dev:i386 \
${APT_INSTALL} \
libglib2.0-dev:i386 \
libgl1-mesa-dev:i386 \
libpulse-dev:i386 \
libglu1-mesa-dev:i386 \
libsdl2-dev:i386 \
libjpeg-turbo8-dev:i386 \
zlib1g-dev:i386 \
libc6-dev:i386 \
libpng12-dev:i386 \
g++-multilib g++-4.8-multilib gcc-4.8-multilib \
g++ g++-4.8 gcc gcc-4.8 cpp cpp-4.8
g++-multilib \
g++-4.8-multilib \
gcc-4.8-multilib \
g++ \
g++-4.8 \
gcc \
gcc-4.8 \
cpp \
cpp-4.8
;;
esac

0 comments on commit 1d5c39e

Please sign in to comment.