summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-10-22 15:14:21 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-10-22 15:14:21 +0200
commit905c4294be495d15591885a2438ca0b8abc8decf (patch)
tree851a94849eb7a1f3269b91de6054846cfbda722b /scripts
parentc6e4cf2f80216c7139b6587dcd6d919080aef20d (diff)
parent8954b3971f5cb90dc4b18e61b58ea6e41c54fffe (diff)
downloadqtlocation-mapboxgl-905c4294be495d15591885a2438ca0b8abc8decf.tar.gz
Merge branch 'libuv-0.10-headless-display' into mason
Conflicts: common/http_request_baton_curl.cpp include/mbgl/map/map.hpp include/mbgl/util/uv_detail.hpp scripts/travis_before_install.sh setup-libraries.sh src/map/map.cpp src/storage/file_request_baton.cpp src/storage/http_request.cpp src/util/uv-messenger.c
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/flags.sh1
-rwxr-xr-xscripts/travis_before_install.sh13
-rwxr-xr-xscripts/travis_helper.sh41
-rwxr-xr-xscripts/travis_install_test_suite.sh1
-rwxr-xr-xscripts/travis_script.sh20
5 files changed, 76 insertions, 0 deletions
diff --git a/scripts/flags.sh b/scripts/flags.sh
index b1de8f3c71..2b4624aa1c 100755
--- a/scripts/flags.sh
+++ b/scripts/flags.sh
@@ -2,6 +2,7 @@
if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
export DISPLAY=:99.0
+
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 59bd15d3ba..d445ae8174 100755
--- a/scripts/travis_before_install.sh
+++ b/scripts/travis_before_install.sh
@@ -11,21 +11,34 @@ if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
fi
sudo add-apt-repository --yes ppa:boost-latest/ppa
+
+ 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 \
libboost1.55-dev libboost-regex1.55-dev libcurl4-openssl-dev \
libpng-dev libsqlite3-dev
+
+ apbox_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 libxinerama-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 boost
+
+ mapbox_time "install_awscli" \
sudo pip install awscli
fi
diff --git a/scripts/travis_helper.sh b/scripts/travis_helper.sh
new file mode 100755
index 0000000000..040ef29443
--- /dev/null
+++ b/scripts/travis_helper.sh
@@ -0,0 +1,41 @@
+#!/usr/bin/env bash
+
+function mapbox_time_start {
+ local name=$1
+ mapbox_timer_name=$name
+
+ travis_fold start $name
+
+ mapbox_timer_id=$(printf %08x $(( RANDOM * RANDOM )))
+ eval "mapbox_start_time_$mapbox_timer_id=$(travis_nanoseconds)"
+ echo -en "travis_time:start:$mapbox_timer_id\n"
+}
+
+function mapbox_time_finish {
+ local name=${1:-$mapbox_timer_name}
+ local timer_id=${2:-$mapbox_timer_id}
+ local timer_start="mapbox_start_time_$timer_id"
+ eval local start_time=\${$timer_start}
+ local end_time=$(travis_nanoseconds)
+ local duration=$(($end_time-$start_time))
+ echo -en "travis_time:end:$timer_id:start=$start_time,finish=$end_time,duration=$duration\n"
+
+ travis_fold end $name
+}
+
+function mapbox_time {
+ local name=$1 ; shift
+ mapbox_time_start $name
+ local timer_id=$mapbox_timer_id
+ echo "\$ $@"
+ $@
+ mapbox_time_finish $name $timer_id
+}
+
+
+export ANSI_CLEAR
+export -f travis_fold
+export -f travis_nanoseconds
+export -f mapbox_time
+export -f mapbox_time_start
+export -f mapbox_time_finish
diff --git a/scripts/travis_install_test_suite.sh b/scripts/travis_install_test_suite.sh
index eca24e719c..cb2422d70c 100755
--- a/scripts/travis_install_test_suite.sh
+++ b/scripts/travis_install_test_suite.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 f1cad6b9d3..f306dbcb79 100755
--- a/scripts/travis_script.sh
+++ b/scripts/travis_script.sh
@@ -7,26 +7,46 @@ if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
#
# build & test Linux
#
+ mapbox_time "compile_program" \
make linux -j4 BUILDTYPE=${BUILDTYPE}
+
+ mapbox_time "compile_tests" \
make test -j4 BUILDTYPE=${BUILDTYPE}
+
+ mapbox_time "run_tests" \
./scripts/run_tests.sh
+
+ mapbox_time_start "compare_results"
(cd ./node_modules/mapbox-gl-test-suite/ && (./bin/compare_images.js || true))
+ mapbox_time_finish
if [ ! -z "${AWS_ACCESS_KEY_ID}" ] && [ ! -z "${AWS_SECRET_ACCESS_KEY}" ] ; then
+ mapbox_time_start "deploy_results"
(cd ./node_modules/mapbox-gl-test-suite/ && ./bin/deploy_results.sh)
+ mapbox_time_finish
fi
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