Skip to content

Commit

Permalink
travis: use the new Ubuntu 14.04 environment
Browse files Browse the repository at this point in the history
Previously we were upgrading from 12.04 to a 12.04/14.04 hybrid,
which was time-consuming and a bit of a hack. travis-ci.org now
offers a pure 14.04 build environment, so use that instead.

Re-enable x86 Linux builds: these aren't too slow now that we're on
14.04.
  • Loading branch information
smcv committed Mar 12, 2016
1 parent ed95d18 commit 0991ef4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: cpp
sudo: true
sudo: required
dist: trusty

install:
- ./tools/travis-install.sh "${host:-native}" "${flavour:-Release}" $opts
Expand All @@ -11,7 +12,7 @@ compiler: gcc
env:
- ""
- flavour=Debug
#- host=i686-linux-gnu
- host=i686-linux-gnu
- host=i686-w64-mingw32
- host=x86_64-w64-mingw32

Expand Down
1 change: 0 additions & 1 deletion tools/travis-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ set -- -D CMAKE_BUILD_TYPE="$flavour" "$@"
-D BuildJK2SPGame=ON \
-D BuildJK2SPRdVanilla=ON \
-D CMAKE_INSTALL_PREFIX=/prefix \
-D CMAKE_VERBOSE_MAKEFILE=ON \
"$@" .. )
make -C build
make -C build install DESTDIR=$(pwd)/build/DESTDIR
Expand Down
20 changes: 14 additions & 6 deletions tools/travis-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@ host="$1"
flavour="$2"
shift 2

# We need cmake from Ubuntu 14.04 (trusty), the version in 12.04 is too old.
# We also need SDL2, which is broken in 14.04 but OK in trusty-updates;
# and dpkg from 14.04 fixes installation of libglib2.0-dev:i386.
echo "deb http://archive.ubuntu.com/ubuntu trusty main universe" | sudo tee -a /etc/apt/sources.list
echo "deb http://archive.ubuntu.com/ubuntu trusty-updates main universe" | sudo tee -a /etc/apt/sources.list
# 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

# do this before apt-get update
case "${host}" in
(i?86-linux-gnu)
sudo dpkg --add-architecture i386
;;
esac

sudo apt-get update -qq
sudo apt-get -q -y install cmake dpkg

Expand Down Expand Up @@ -39,6 +46,7 @@ case "${host}" in
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++ gcc cpp g++-4.8 gcc-4.8 g++-4.8-multilib
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 0991ef4

Please sign in to comment.