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
This commit is contained in:
Konstantin Käfer
2014-10-22 15:14:21 +02:00
32 changed files with 895 additions and 143 deletions

View File

@@ -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

View File

@@ -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

41
scripts/travis_helper.sh Executable file
View File

@@ -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

View File

@@ -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

View File

@@ -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