refactor travis script, only call apt-get update once

This moves the gcc 4.8 upgrade step to the "install" phase after
we run apt-get update, so that we only do that once. It can take
15 sec or so apparently to execute that command.
This commit is contained in:
Chris Beck 2014-07-04 15:30:28 -04:00
parent 8bff0848a1
commit ebba6a3d11

View file

@ -23,12 +23,11 @@ before_install:
# - if [ "$CXX" = "g++" ]; then export CPP_TESTS=false; fi
- if [ "$CXX" = "g++" ]; then export CHECK_UTF8=false; fi
- if [ "$CXX" = "g++" ]; then time sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y; fi
- if [ "$CXX" = "g++" ]; then time sudo apt-get update -qq; fi
- if [ "$CXX" = "g++" ]; then time sudo apt-get install g++-4.8; fi
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8"; fi
install:
- time sudo apt-get update -qq
- time sudo apt-get install -qq libboost-iostreams-dev libboost-program-options-dev libboost-regex-dev libboost-system-dev libboost-test-dev libcairo2-dev libfribidi-dev libpango1.0-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev
- if [ "$CXX" = "g++" ]; then time sudo apt-get install g++-4.8; fi
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8"; fi
- if [ "$CHECK_UTF8" = true ]; then time sudo apt-get install -qq moreutils; fi
script:
- if [ "$CHECK_UTF8" = true ]; then time ./utils/travis/check_utf8.sh; fi