diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-04-03 15:16:49 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-04-07 18:01:02 -0700 |
commit | f964e40e7e9220d08751d8607af61ac5a7c0794c (patch) | |
tree | d34ca5407188fe3d71396faa8a8acceb52d9bd4b /platform/linux/scripts | |
parent | f5d66f362272db034a311d2077dbdb2937c9bbdf (diff) | |
download | qtlocation-mapboxgl-f964e40e7e9220d08751d8607af61ac5a7c0794c.tar.gz |
[build] Refactor and simplify build system
* Main gyp files are now standardized as platform/<platform>/platform.gyp.
* Each platform gyp file defines appropriate loop_lib and headless_lib variables.
* Each platform gyp file includes mbgl.gypi, which defines base targets which may be useful to all platforms.
* CI targets are consistent across platforms: `make $(PLATFORM) && make test-$(PLATFORM)`.
* Renamed the "linux" test app to "glfw". It's now built in OS X CI.
* Android build flakiness is fixed.
* iOS CI builds the bench and iosapp targets.
* Mesa version is now in one place.
* CI scripts use bash "strict mode" and correct error handling.
* All build output goes to the build directory.
* Removed vestigial iOS/OS X/Android Travis scripts.
Diffstat (limited to 'platform/linux/scripts')
-rwxr-xr-x | platform/linux/scripts/after_script.sh | 10 | ||||
-rwxr-xr-x | platform/linux/scripts/coveralls.sh | 23 | ||||
-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 | 31 | ||||
-rwxr-xr-x | platform/linux/scripts/setup.sh | 28 | ||||
-rwxr-xr-x | platform/linux/scripts/tidy.sh | 17 |
7 files changed, 20 insertions, 105 deletions
diff --git a/platform/linux/scripts/after_script.sh b/platform/linux/scripts/after_script.sh index b5397f1df2..4989f0c444 100755 --- a/platform/linux/scripts/after_script.sh +++ b/platform/linux/scripts/after_script.sh @@ -3,13 +3,9 @@ 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) +JOB=$1 +if [ ! -z "${AWS_ACCESS_KEY_ID}" ] && [ ! -z "${AWS_SECRET_ACCESS_KEY}" ] ; then aws s3 cp --recursive --acl public-read --exclude "*" --include "*/actual.png" test/fixtures \ - s3://mapbox/$REPO_NAME/render-tests/$TRAVIS_JOB_NUMBER + s3://mapbox/mapbox-gl-native/render-tests/$JOB fi diff --git a/platform/linux/scripts/coveralls.sh b/platform/linux/scripts/coveralls.sh index 468fa4774b..1d8d9f060a 100755 --- a/platform/linux/scripts/coveralls.sh +++ b/platform/linux/scripts/coveralls.sh @@ -3,11 +3,22 @@ set -e set -o pipefail -source ./platform/linux/scripts/setup.sh +mapbox_time "install_lcov" \ +mason install lcov 1.12 -################################################################################ -# Coveralls -################################################################################ +# Collect coverage data and save it into coverage.info +mapbox_time "lcov_capture" \ +`mason prefix lcov 1.12`/usr/bin/lcov \ + --quiet \ + --capture \ + --no-external \ + --gcov-tool "gcov-4.9" \ + --directory "src/mbgl" \ + --directory "platform" \ + --directory "include/mbgl" \ + --directory "build/linux-x86_64/${BUILDTYPE}" \ + --base-directory "build/linux-x86_64/${BUILDTYPE}" \ + --output-file "build/linux-x86_64/${BUILDTYPE}/coverage.info" -mapbox_time "make_coveralls" \ -make coveralls -j${JOBS} +mapbox_time "coveralls_upload" \ +coveralls-lcov "build/linux-x86_64/${BUILDTYPE}/coverage.info" diff --git a/platform/linux/scripts/defaults.mk b/platform/linux/scripts/defaults.mk deleted file mode 100644 index 80f1346533..0000000000 --- a/platform/linux/scripts/defaults.mk +++ /dev/null @@ -1,5 +0,0 @@ -HEADLESS ?= glx -PLATFORM ?= linux -ASSET ?= fs -HTTP ?= curl -LOOP ?= uv diff --git a/platform/linux/scripts/install.sh b/platform/linux/scripts/install.sh deleted file mode 100755 index a254d312ec..0000000000 --- a/platform/linux/scripts/install.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/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 deleted file mode 100755 index 1c0c13968a..0000000000 --- a/platform/linux/scripts/run.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/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_offline_binary" \ -make offline -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 deleted file mode 100755 index af0eafb5cf..0000000000 --- a/platform/linux/scripts/setup.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/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 deleted file mode 100755 index 424c82c3cd..0000000000 --- a/platform/linux/scripts/tidy.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/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 |