diff --git a/scripts/flags.sh b/scripts/flags.sh index 58aee18a0..21313b24c 100755 --- a/scripts/flags.sh +++ b/scripts/flags.sh @@ -1,7 +1,18 @@ #!/usr/bin/env bash +function mapbox_time { + local NAME=$1 ; shift + travis_fold start "${NAME}" + travis_time_start + "$@" + travis_time_finish + travis_fold end "${NAME}" +} + if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then export DISPLAY=:99.0 + + mapbox_time "start xvfb" \ sh -e /etc/init.d/xvfb start # use g++ that supports c++11 diff --git a/scripts/travis_before_install.sh b/scripts/travis_before_install.sh index e9b3384de..ab955f6aa 100755 --- a/scripts/travis_before_install.sh +++ b/scripts/travis_before_install.sh @@ -10,18 +10,31 @@ if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then if [[ `lsb_release -r` =~ "12.04" ]]; then sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test fi + + mapbox_time "apt update" \ sudo apt-get update -y + + mapbox_time "install gcc" \ sudo apt-get -y install gcc-4.8 g++-4.8 + + mapbox_time "install build tools" \ sudo apt-get -y install git build-essential zlib1g-dev automake \ libtool xutils-dev make cmake pkg-config python-pip + + mapbox_time "install opengl" \ sudo apt-get -y install libxi-dev libglu1-mesa-dev x11proto-randr-dev \ x11proto-xext-dev libxrandr-dev \ x11proto-xf86vidmode-dev libxxf86vm-dev libxcursor-dev + + mapbox_time "install awscli" \ sudo pip install awscli elif [[ ${TRAVIS_OS_NAME} == "osx" ]]; then # # install OS X dependencies # + mapbox_time "install build tools" \ brew install autoconf automake libtool makedepend cmake pkg-config node git + + mapbox_time "install awscli" \ sudo pip install awscli fi diff --git a/scripts/travis_install.sh b/scripts/travis_install.sh index eca24e719..d0539946b 100755 --- a/scripts/travis_install.sh +++ b/scripts/travis_install.sh @@ -4,5 +4,6 @@ if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then # # we'll need the test suite on Linux # + mapbox_time "install test suite" \ npm install git+https://github.com/mapbox/mapbox-gl-test-suite.git fi diff --git a/scripts/travis_script.sh b/scripts/travis_script.sh index f1cad6b9d..1c61dfa9d 100755 --- a/scripts/travis_script.sh +++ b/scripts/travis_script.sh @@ -7,12 +7,20 @@ if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then # # build & test Linux # + mapbox_time "compile program" \ make linux -j4 BUILDTYPE=${BUILDTYPE} + + mapbox_time "install tests" \ make test -j4 BUILDTYPE=${BUILDTYPE} + + mapbox_time "run tests" \ ./scripts/run_tests.sh + + mapbox_time "compare results" \ (cd ./node_modules/mapbox-gl-test-suite/ && (./bin/compare_images.js || true)) if [ ! -z "${AWS_ACCESS_KEY_ID}" ] && [ ! -z "${AWS_SECRET_ACCESS_KEY}" ] ; then + mapbox_time "deploy results" \ (cd ./node_modules/mapbox-gl-test-suite/ && ./bin/deploy_results.sh) fi @@ -20,13 +28,23 @@ elif [[ ${TRAVIS_OS_NAME} == "osx" ]]; then # # build OS X # + mapbox_time "create osx project" \ make xproj-cli + + mapbox_time "build osx" \ xcodebuild -project ./build/macosx/mapboxgl-app.xcodeproj -jobs 4 + # # build iOS # git submodule init + + mapbox_time "load submodules" \ git submodule update + + mapbox_time "create ios project" \ make iproj-cli + + mapbox_time "build ios" \ xcodebuild -project ./build/ios/mapbox-gl-cocoa/app/mapboxgl-app.xcodeproj -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO -jobs 4 fi