summaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-10-16 13:58:01 +0200
committerKonstantin Käfer <mail@kkaefer.com>2015-10-16 13:58:01 +0200
commitb3f31e9fa222f7e02c2130a748dd283a73b270f2 (patch)
treec420a74dd6c817c9d67b21eee0475987af73d2e5 /docker
parentceb67bbc77bf5f4bd58e40fa9579e21c26548ebd (diff)
downloadqtlocation-mapboxgl-b3f31e9fa222f7e02c2130a748dd283a73b270f2.tar.gz
[core] update docker script
[skip ci]
Diffstat (limited to 'docker')
-rw-r--r--docker/linux/Dockerfile18
-rw-r--r--docker/linux/run-clang.sh15
-rwxr-xr-xdocker/linux/run-gcc.sh5
-rwxr-xr-xdocker/linux/test.sh26
4 files changed, 37 insertions, 27 deletions
diff --git a/docker/linux/Dockerfile b/docker/linux/Dockerfile
index 0d23fe1e79..36eaeed695 100644
--- a/docker/linux/Dockerfile
+++ b/docker/linux/Dockerfile
@@ -1,19 +1,21 @@
FROM ubuntu:12.04
+# Recreate Travis CI environment
RUN apt-get update -y && \
- apt-get install -y build-essential git-core python-pip python-software-properties software-properties-common && \
- rm -rf /var/lib/apt/lists/*
+ apt-get install -y build-essential git-core python-pip python-software-properties software-properties-common curl zlib1g-dev automake libtool make cmake pkg-config python-pip libcurl4-openssl-dev libpng-dev libsqlite3-dev xvfb libglu1-mesa-dev libxrandr-dev libxinerama-dev libxi-dev libxcursor-dev imagemagick && \
+ pip install awscli
+# Install
RUN add-apt-repository --yes ppa:ubuntu-toolchain-r/test && \
- add-apt-repository --yes ppa:boost-latest/ppa && \
apt-get update -y && \
- apt-get -y install gcc-4.8 g++-4.8 curl zlib1g-dev automake gdb libtool xutils-dev make cmake pkg-config python-pip libboost1.55-dev libcurl4-openssl-dev libpng-dev libsqlite3-dev mesa-utils libxi-dev x11proto-randr-dev x11proto-xext-dev libxrandr-dev x11proto-xf86vidmode-dev libxxf86vm-dev libxcursor-dev libxinerama-dev xvfb llvm-3.4 && \
- pip install awscli
-
-RUN apt-get install -y imagemagick
+ apt-get -y install gdb g++-4.9 gcc-4.9 libllvm3.4 xutils-dev libxxf86vm-dev x11proto-xf86vidmode-dev mesa-utils
RUN useradd -ms /bin/bash mapbox
-
USER mapbox
ENV HOME /home/mapbox
WORKDIR /home/mapbox
+
+# Node
+RUN git clone https://github.com/creationix/nvm.git ~/.nvm && \
+ . ~/.nvm/nvm.sh && \
+ NVM_DIR=~/.nvm nvm install 0.10
diff --git a/docker/linux/run-clang.sh b/docker/linux/run-clang.sh
deleted file mode 100644
index cb9f6f417f..0000000000
--- a/docker/linux/run-clang.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-set -o pipefail
-
-docker build \
- -t mapbox/gl-native:linux \
- docker/linux
-
-docker run \
- -i \
- -e "CXX=clang++" \
- -v `pwd`:/home/mapbox/build \
- -t mapbox/gl-native:linux \
- build/docker/linux/test.sh
diff --git a/docker/linux/run-gcc.sh b/docker/linux/run-gcc.sh
index 093771f1a4..91bbee64ae 100755
--- a/docker/linux/run-gcc.sh
+++ b/docker/linux/run-gcc.sh
@@ -3,13 +3,10 @@
set -e
set -o pipefail
-docker build \
- -t mapbox/gl-native:linux \
- docker/linux
+docker build -t mapbox/gl-native:linux docker/linux
docker run \
-i \
- -e "CXX=g++" \
-v `pwd`:/home/mapbox/build \
-t mapbox/gl-native:linux \
build/docker/linux/test.sh
diff --git a/docker/linux/test.sh b/docker/linux/test.sh
new file mode 100755
index 0000000000..63057d9422
--- /dev/null
+++ b/docker/linux/test.sh
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+
+# set -e
+# set -o pipefail
+
+export FLAVOR=linux
+export CXX=g++-4.9
+export BUILDTYPE=Release
+
+# Node
+. ~/.nvm/nvm.sh
+nvm use 0.10
+
+# Xvfb
+start-stop-daemon --start --pidfile ~/xvfb.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1024x768x24 -ac +extension GLX +render -noreset
+
+cd build
+
+# before_install
+source ./scripts/travis_helper.sh
+
+# install
+./scripts/${FLAVOR}/install.sh
+
+# script
+./scripts/${FLAVOR}/run.sh