summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-11-09 16:54:31 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-11-17 01:01:15 +0100
commit0ef52d7f7ceee670e8961e811364d215fde7e980 (patch)
tree8da11b6a56a1b21dc4c0a5a7119ad4c052648488
parent32b6f2fa0383f04855a181f6db61df84968ec97c (diff)
downloadqtlocation-mapboxgl-0ef52d7f7ceee670e8961e811364d215fde7e980.tar.gz
[build] Added EGL & GLX CI builds
-rw-r--r--.travis.yml124
-rw-r--r--platform/linux/config.cmake3
-rwxr-xr-xscripts/travis_setup.sh20
3 files changed, 103 insertions, 44 deletions
diff --git a/.travis.yml b/.travis.yml
index 1a39e20761..d36352c570 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,27 +2,48 @@ git:
submodules: false
# Save common build configurations as shortcuts, so we can reference them later.
+addons:
+ apt:
+ sources:
+ - &common_sources [ 'ubuntu-toolchain-r-test', 'george-edison55-precise-backports' ]
+ packages:
+ - &common_packages [ 'libllvm3.8v4', 'cmake', 'cmake-data' ]
+ - &clang38_packages [ 'clang-3.8', 'libstdc++-5-dev', 'libstdc++6' ]
+ - &gcc5_packages [ 'gcc-5', 'g++-5' ]
+ - &egl_packages [ 'libgles2-mesa-dev', 'libgbm-dev' ]
+ - &glfw_packages [ 'libxrandr-dev', 'libxcursor-dev', 'libxinerama-dev' ]
+
addons_shortcuts:
addons_clang38: &clang38
apt:
- sources: [ 'ubuntu-toolchain-r-test', 'george-edison55-precise-backports' ]
- packages: [ 'clang-3.8', 'libstdc++-5-dev', 'libstdc++6', 'libllvm3.8v4', 'cmake', 'cmake-data',
- 'libxrandr-dev', 'libxcursor-dev', 'libxinerama-dev' ]
+ sources: *common_sources
+ packages:
+ - *common_packages
+ - *clang38_packages
+ - *egl_packages
+ - *glfw_packages
addons_gcc5: &gcc5
apt:
- sources: [ 'ubuntu-toolchain-r-test', 'george-edison55-precise-backports' ]
- packages: [ 'g++-5', 'gcc-5', 'libllvm3.8v4', 'cmake', 'cmake-data',
- 'libxrandr-dev', 'libxcursor-dev', 'libxinerama-dev' ]
+ sources: *common_sources
+ packages:
+ - *common_packages
+ - *gcc5_packages
+ - *egl_packages
+ - *glfw_packages
addons_qt4: &qt4
apt:
- sources: [ 'ubuntu-toolchain-r-test', 'george-edison55-precise-backports' ]
- packages: [ 'g++-5', 'gcc-5', 'libllvm3.8v4', 'libjemalloc-dev', 'cmake', 'cmake-data',
- 'mesa-utils', 'qt4-default' ]
+ sources: *common_sources
+ packages:
+ - *common_packages
+ - *gcc5_packages
+ - [ 'libjemalloc-dev', 'mesa-utils', 'qt4-default' ]
addons_qt5: &qt5
apt:
- sources: [ 'ubuntu-toolchain-r-test', 'george-edison55-precise-backports' ]
- packages: [ 'g++-5', 'gcc-5', 'libllvm3.8v4', 'cmake', 'cmake-data',
- 'mesa-utils', 'libc6-dbg', 'qt5-default', 'libqt5opengl5-dev', 'qtdeclarative5-dev', 'qtpositioning5-dev', 'qtlocation5-dev' ]
+ sources: *common_sources
+ packages:
+ - *common_packages
+ - *gcc5_packages
+ - [ 'mesa-utils', 'libc6-dbg', 'qt5-default', 'libqt5opengl5-dev', 'qtdeclarative5-dev', 'qtpositioning5-dev', 'qtlocation5-dev' ]
env:
global:
@@ -38,9 +59,7 @@ env:
install:
- source ./scripts/travis_helper.sh
- source ./scripts/travis_setup.sh
-before_script:
- ccache --zero-stats
- - cmake --version
script:
- make linux
- make benchmark
@@ -54,6 +73,17 @@ after_success:
matrix:
include:
+ # LLVM 3.8.0 - clang-{format,tidy}
+ - os: linux
+ sudo: false
+ dist: trusty
+ language: cpp
+ env: _CXX=c++ _CC=cc
+ compiler: "check"
+ script:
+ - git fetch origin master:refs/remotes/origin/master
+ - make check
+
# OSMesa - Node - Clang 3.8 - Debug
- os: linux
sudo: required
@@ -71,98 +101,114 @@ matrix:
- ccache --show-stats
- ./platform/node/scripts/after_script.sh ${TRAVIS_JOB_NUMBER}
+ # EGL - Node - Clang 3.8 - Debug
+ - os: linux
+ sudo: required
+ dist: trusty
+ language: node
+ compiler: "egl-node4-clang38-debug"
+ env: BUILDTYPE=Debug _CXX=clang++-3.8 _CC=clang-3.8 WITH_EGL=1
+ addons: *clang38
+ before_script:
+ - mapbox_start_xvfb
+ script:
+ - nvm install 4
+ - nvm use 4
+ - make node
+ - make test-node
+ after_script:
+ - ccache --show-stats
+ - ./platform/node/scripts/after_script.sh ${TRAVIS_JOB_NUMBER}
+
# GLX - Node - Clang 3.8 - Release
- os: linux
sudo: required
dist: trusty
language: node
compiler: "glx-node4-clang38-release"
- env: BUILDTYPE=Release _CXX=clang++-3.8 _CC=clang-3.8 RUN_XVFB=1
+ env: BUILDTYPE=Release _CXX=clang++-3.8 _CC=clang-3.8
addons: *clang38
before_script:
- export PACKAGE_JSON_VERSION=$(node -e "console.log(require('./package.json').version)")
- export PUBLISH=$([[ "${TRAVIS_TAG:-}" == "node-v${PACKAGE_JSON_VERSION}" ]] && echo true)
+ - mapbox_start_xvfb
script:
- nvm install 4
- nvm use 4
- make node
+ - make test-node
after_script:
- ccache --show-stats
+ - ./platform/node/scripts/after_script.sh ${TRAVIS_JOB_NUMBER}
after_success:
- ./platform/node/scripts/after_success.sh
- # GCC 5 - Debug - Coverage
+ # OSMesa - GCC 5 - Debug (Coverage)
# FIXME: https://github.com/mapbox/mapbox-gl-native/issues/6918
- os: linux
sudo: required
dist: trusty
language: cpp
- compiler: "glfw-gcc5-debug"
+ compiler: "osmesa-gcc5-debug"
env: BUILDTYPE=Debug _CXX=g++-5 _CC=gcc-5 WITH_COVERAGE=1 WITH_OSMESA=1
addons: *gcc5
after_script:
- ccache --show-stats
- ./platform/linux/scripts/coveralls.sh
- # GCC 5 - Release
+ # OSMesa - GCC 5 - Release
- os: linux
sudo: required
dist: trusty
language: cpp
- compiler: "glfw-gcc5-release"
+ compiler: "osmesa-gcc5-release"
env: BUILDTYPE=Release _CXX=g++-5 _CC=gcc-5 WITH_OSMESA=1
addons: *gcc5
- # Clang 3.8 - Debug
+ # OSMesa - Clang 3.8 - Debug
- os: linux
sudo: required
dist: trusty
language: cpp
- compiler: "glfw-clang38-debug"
+ compiler: "osmesa-clang38-debug"
env: BUILDTYPE=Debug _CXX=clang++-3.8 _CC=clang-3.8 WITH_OSMESA=1
addons: *clang38
- # Clang 3.8 - Release
- - os: linux
- sudo: required
- dist: trusty
- language: cpp
- compiler: "glfw-clang38-release"
- env: BUILDTYPE=Release _CXX=clang++-3.8 _CC=clang-3.8 WITH_OSMESA=1
- addons: *clang38
-
- # Clang 3.8 - check
+ # OSMesa - Clang 3.8 - Release
- os: linux
sudo: required
dist: trusty
language: cpp
- compiler: "check-clang38-release"
+ compiler: "osmesa-clang38-release"
env: BUILDTYPE=Release _CXX=clang++-3.8 _CC=clang-3.8 WITH_OSMESA=1
addons: *clang38
- script:
- - git fetch origin master:refs/remotes/origin/master
- - make check
- # Qt 4 - Release
+ # Qt 4 - GCC 5 - Release
- os: linux
sudo: required
dist: trusty
language: cpp
compiler: "qt4-gcc5-release"
- env: BUILDTYPE=Release _CXX=g++-5 _CC=gcc-5 RUN_XVFB=1 WITH_QT_4=1
+ env: BUILDTYPE=Release _CXX=g++-5 _CC=gcc-5 WITH_QT_4=1
addons: *qt4
+ before_script:
+ - mapbox_start_xvfb
+ - mapbox_export_mesa_library_path
script:
- make qt-app
- LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so make run-qt-test-Memory.*:*.Load
- # Qt 5 - Release
+ # Qt 5 - GCC 5 - Release
- os: linux
sudo: required
dist: trusty
language: cpp
compiler: "qt5-gcc5-release"
- env: BUILDTYPE=Release _CXX=g++-5 _CC=gcc-5 RUN_XVFB=1
+ env: BUILDTYPE=Release _CXX=g++-5 _CC=gcc-5
addons: *qt5
+ before_script:
+ - mapbox_start_xvfb
+ - mapbox_export_mesa_library_path
script:
- make qt-app
- make qt-qml-app
diff --git a/platform/linux/config.cmake b/platform/linux/config.cmake
index d2f3d3aa94..94830e6d26 100644
--- a/platform/linux/config.cmake
+++ b/platform/linux/config.cmake
@@ -1,5 +1,5 @@
mason_use(glfw VERSION 3.2.1)
-if(IS_CI_BUILD)
+if(IS_CI_BUILD AND NOT WITH_EGL)
mason_use(mesa VERSION 13.0.0${MASON_MESA_SUFFIX}${MASON_CXXABI_SUFFIX})
endif()
mason_use(boost_libprogram_options VERSION 1.60.0)
@@ -40,6 +40,7 @@ macro(mbgl_platform_core)
)
if (IS_CI_BUILD)
target_add_mason_package(mbgl-core PUBLIC mesa)
+ target_link_libraries(mbgl-core PUBLIC -lX11)
else()
target_link_libraries(mbgl-core
PUBLIC -lGL
diff --git a/scripts/travis_setup.sh b/scripts/travis_setup.sh
index 6c39b3f42c..8551e1cb97 100755
--- a/scripts/travis_setup.sh
+++ b/scripts/travis_setup.sh
@@ -25,7 +25,9 @@ fi
echo "export CXX=\"${CXX}\""
echo "export CC=\"${CC}\""
-${CXX} --version
+if [ -x $(which ${CXX}) ]; then
+ ${CXX} --version
+fi
# Ensure mason is on the PATH
export PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason"
@@ -37,15 +39,23 @@ git submodule update --init .mason
mapbox_time "touch_package_json" \
touch package.json
-# Start the mock X server
-if [ -f /etc/init.d/xvfb ] && [ ! -z "${RUN_XVFB}" ]; then
+function mapbox_start_xvfb {
+ if [ ! -f /etc/init.d/xvfb ]; then
+ echo "Error: Could not start Xvfb mock server."
+ exit 1
+ fi
+
mapbox_time "start_xvfb" \
sh -e /etc/init.d/xvfb start
sleep 2 # sometimes, xvfb takes some time to start up
# Make sure we're connecting to xvfb
export DISPLAY=:99.0
+}
+export -f mapbox_start_xvfb
+
+function mapbox_export_mesa_library_path {
CXX11ABI=""
if [ `scripts/check-cxx11abi.sh` = 'ON' ]; then
CXX11ABI="-cxx11abi"
@@ -54,7 +64,9 @@ if [ -f /etc/init.d/xvfb ] && [ ! -z "${RUN_XVFB}" ]; then
mapbox_time "install_mesa" \
mason install mesa 13.0.0-glx${CXX11ABI}
export LD_LIBRARY_PATH="`mason prefix mesa 13.0.0-glx${CXX11ABI}`/lib:${LD_LIBRARY_PATH:-}"
-fi
+}
+
+export -f mapbox_export_mesa_library_path
# Install and set up to load awscli
pip install --user awscli