add more instrumentation and code folding to travis builds
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user