Move platform scripts into platforms

This commit is contained in:
John Firebaugh
2015-12-16 14:05:23 -08:00
parent a903d2eef0
commit 7a4e7376e1
46 changed files with 40 additions and 40 deletions

View File

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

View File

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

View File

@@ -0,0 +1,5 @@
HEADLESS ?= glx
PLATFORM ?= linux
ASSET ?= fs
HTTP ?= curl
CACHE ?= sqlite

View File

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

28
platform/linux/scripts/run.sh Executable file
View File

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

28
platform/linux/scripts/setup.sh Executable file
View File

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

17
platform/linux/scripts/tidy.sh Executable file
View File

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