diff options
Diffstat (limited to 'platform/linux')
-rwxr-xr-x | platform/linux/scripts/after_script.sh | 15 | ||||
-rw-r--r-- | platform/linux/scripts/configure.sh | 22 | ||||
-rw-r--r-- | platform/linux/scripts/defaults.mk | 5 | ||||
-rwxr-xr-x | platform/linux/scripts/install.sh | 11 | ||||
-rwxr-xr-x | platform/linux/scripts/run.sh | 28 | ||||
-rwxr-xr-x | platform/linux/scripts/setup.sh | 28 | ||||
-rwxr-xr-x | platform/linux/scripts/tidy.sh | 17 |
7 files changed, 126 insertions, 0 deletions
diff --git a/platform/linux/scripts/after_script.sh b/platform/linux/scripts/after_script.sh new file mode 100755 index 0000000000..f8e4bc3486 --- /dev/null +++ b/platform/linux/scripts/after_script.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -e +set -o pipefail + +if [ ! -z "${AWS_ACCESS_KEY_ID}" ] && [ ! -z "${AWS_SECRET_ACCESS_KEY}" ] ; then + # Install and add awscli to PATH for uploading the results + pip install --user awscli + export PATH="`python -m site --user-base`/bin:${PATH}" + + REPO_NAME=$(basename $TRAVIS_REPO_SLUG) + + aws s3 cp --recursive --acl public-read test/fixtures/annotations \ + s3://mapbox/$REPO_NAME/render-tests/$TRAVIS_JOB_NUMBER/annotations +fi diff --git a/platform/linux/scripts/configure.sh b/platform/linux/scripts/configure.sh new file mode 100644 index 0000000000..1c2dff9d27 --- /dev/null +++ b/platform/linux/scripts/configure.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +BOOST_VERSION=1.59.0 +BOOST_LIBPROGRAM_OPTIONS_VERSION=1.59.0 +LIBCURL_VERSION=system +GLFW_VERSION=3.1.2 +LIBPNG_VERSION=1.6.18 +JPEG_VERSION=v9a +SQLITE_VERSION=3.9.1 +LIBUV_VERSION=1.7.5 +ZLIB_VERSION=system +NUNICODE_VERSION=1.6 +GEOJSONVT_VERSION=3.1.0 +VARIANT_VERSION=1.0 +RAPIDJSON_VERSION=1.0.2 +GTEST_VERSION=1.7.0 +PIXELMATCH_VERSION=0.9.0 + +function print_opengl_flags { + CONFIG+=" 'opengl_cflags%': $(quote_flags $(pkg-config gl x11 --cflags)),"$LN + CONFIG+=" 'opengl_ldflags%': $(quote_flags $(pkg-config gl x11 --libs)),"$LN +} diff --git a/platform/linux/scripts/defaults.mk b/platform/linux/scripts/defaults.mk new file mode 100644 index 0000000000..126c8f99a4 --- /dev/null +++ b/platform/linux/scripts/defaults.mk @@ -0,0 +1,5 @@ +HEADLESS ?= glx +PLATFORM ?= linux +ASSET ?= fs +HTTP ?= curl +CACHE ?= sqlite diff --git a/platform/linux/scripts/install.sh b/platform/linux/scripts/install.sh new file mode 100755 index 0000000000..a254d312ec --- /dev/null +++ b/platform/linux/scripts/install.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +set -e +set -o pipefail + +mapbox_time "checkout_mason" \ +git submodule update --init .mason + +PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason" \ +mapbox_time "install_mesa" \ +mason install mesa 10.4.3 diff --git a/platform/linux/scripts/run.sh b/platform/linux/scripts/run.sh new file mode 100755 index 0000000000..3e40881ec6 --- /dev/null +++ b/platform/linux/scripts/run.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +set -e +set -o pipefail + +source ./platform/linux/scripts/setup.sh + +BUILDTYPE=${BUILDTYPE:-Release} + +################################################################################ +# Build +################################################################################ + +mapbox_time "compile_program" \ +make linux -j${JOBS} BUILDTYPE=${BUILDTYPE} + +mapbox_time "compile_render_binary" \ +make render -j${JOBS} BUILDTYPE=${BUILDTYPE} + +mapbox_time "compile_tests" \ +make test -j${JOBS} BUILDTYPE=${BUILDTYPE} + +################################################################################ +# Test +################################################################################ + +mapbox_time "run_tests" \ +make test-* BUILDTYPE=${BUILDTYPE} diff --git a/platform/linux/scripts/setup.sh b/platform/linux/scripts/setup.sh new file mode 100755 index 0000000000..af0eafb5cf --- /dev/null +++ b/platform/linux/scripts/setup.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +# This script is sourced; do not set -e or -o pipefail here. + +# Ensure mason is on the 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 diff --git a/platform/linux/scripts/tidy.sh b/platform/linux/scripts/tidy.sh new file mode 100755 index 0000000000..424c82c3cd --- /dev/null +++ b/platform/linux/scripts/tidy.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -e +set -o pipefail + +# Ensure mason is on the PATH +export PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason" + +BUILDTYPE=${BUILDTYPE:-Release} + +export CLANG_TIDY=clang-tidy-3.8 + +mapbox_time "config" \ +make config + +mapbox_time "tidy" \ +make tidy |