build on trusty

This commit is contained in:
Konstantin Käfer
2015-04-16 16:46:12 +02:00
parent 2831073f85
commit decc493ec8
38 changed files with 389 additions and 458 deletions

22
scripts/linux/install.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -e
set -o pipefail
source ./scripts/travis_helper.sh
mapbox_time "update_apt" \
sudo apt-get -y update
mapbox_time "install_apt" \
sudo apt-get -y install mesa-utils llvm-3.4 pkg-config libcurl4-openssl-dev \
libboost-dev libboost-program-options-dev libxi-dev x11proto-randr-dev \
x11proto-xext-dev libxrandr-dev x11proto-xf86vidmode-dev libxxf86vm-dev \
libxcursor-dev libxinerama-dev
mapbox_time "checkout_mason" \
git submodule update --init .mason
export PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason"
mapbox_time "install_mesa" \
mason install mesa 10.4.3

75
scripts/linux/run.sh Executable file
View File

@@ -0,0 +1,75 @@
#!/usr/bin/env bash
set -e
set -o pipefail
BUILDTYPE=${BUILDTYPE:-Release}
source ./scripts/travis_helper.sh
# Add Mason to PATH
export PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason"
# Set the core file limit to unlimited so a core file is generated upon crash
ulimit -c unlimited -S
################################################################################
# X Server setup
################################################################################
# Start the mock X server
if [ -f /etc/init.d/xvfb ] ; then
mapbox_time "start_xvfb" \
sh -e /etc/init.d/xvfb start
sleep 2 # sometimes, xvfb takes some time to start up
fi
# Make sure we're connecting to xvfb
export DISPLAY=:99.0
# Make sure we're loading the 10.4.3 libs we installed manually
export LD_LIBRARY_PATH="`mason prefix mesa 10.4.3`/lib:${LD_LIBRARY_PATH:-}"
mapbox_time "glxinfo" \
glxinfo
################################################################################
# Build
################################################################################
mapbox_time "checkout_styles" \
git submodule update --init styles
mapbox_time "compile_program" \
make linux -j${JOBS} BUILDTYPE=${BUILDTYPE}
mapbox_time "compile_tests" \
make test -j${JOBS} BUILDTYPE=${BUILDTYPE}
################################################################################
# Test
################################################################################
mapbox_time "checkout_test_suite" \
git submodule update --init test/suite
mapbox_time "run_tests" \
make test-* BUILDTYPE=${BUILDTYPE}
mapbox_time "compare_results" \
./scripts/compare_images.sh
################################################################################
# Deploy
################################################################################
if [ ! -z "${AWS_ACCESS_KEY_ID}" ] && [ ! -z "${AWS_SECRET_ACCESS_KEY}" ] ; then
# Install and add awscli to PATH for uploading the results
mapbox_time "install_awscli" \
pip install --user awscli
export PATH="`python -m site --user-base`/bin:${PATH}"
mapbox_time_start "deploy_results"
(cd ./test/suite/ && ./bin/deploy_results.sh)
mapbox_time_finish
fi