summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-12-03 14:34:40 +0100
committerKonstantin Käfer <mail@kkaefer.com>2015-12-03 15:38:36 +0100
commit673e87f6516917d5c45a1c96c7a9c56ed6fef2cc (patch)
treeb98b8d3aa2a9fb849cd2ef08fcd58e1606fe0a96
parent0c8eeea665a783b8fe82c2b6d9f01cad6cb1054e (diff)
downloadqtlocation-mapboxgl-673e87f6516917d5c45a1c96c7a9c56ed6fef2cc.tar.gz
[build] refactor Docker scripts + add clang-tidy script
-rw-r--r--docker/Dockerfile16
-rwxr-xr-xdocker/build.sh8
-rw-r--r--docker/clang-tidy/Dockerfile9
-rwxr-xr-xdocker/clang-tidy/run.sh14
-rwxr-xr-xdocker/clang-tidy/tidy.sh19
-rw-r--r--docker/launchpad.gpg.key13
-rw-r--r--docker/linux/Dockerfile13
-rwxr-xr-xdocker/linux/run.sh (renamed from docker/linux/run-gcc.sh)2
-rw-r--r--docker/llvm-snapshot.gpg.key52
-rw-r--r--docker/llvm.list2
-rw-r--r--docker/ubuntu-toolchain-r.list2
11 files changed, 140 insertions, 10 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
new file mode 100644
index 0000000000..ef98a71430
--- /dev/null
+++ b/docker/Dockerfile
@@ -0,0 +1,16 @@
+FROM ubuntu:12.04
+
+ENV DEBIAN_FRONTEND noninteractive
+
+# Add other APT sources and keys
+ADD *.list /etc/apt/sources.list.d/
+ADD *.gpg.key /tmp/
+RUN find /tmp/*.gpg.key | xargs -n1 apt-key add
+
+# Recreate Travis CI environment
+RUN apt-get update -y
+RUN apt-get install -y git-core python-pip curl automake libtool make cmake pkg-config python-pip \
+ libc6 libstdc++6 zlib1g-dev libcurl4-openssl-dev libpng-dev libsqlite3-dev \
+ xvfb libglu1-mesa-dev libxrandr-dev libxinerama-dev libxi-dev libxcursor-dev xutils-dev \
+ mesa-utils libxxf86vm-dev x11proto-xf86vidmode-dev && \
+ pip install awscli
diff --git a/docker/build.sh b/docker/build.sh
new file mode 100755
index 0000000000..c6eb1b110d
--- /dev/null
+++ b/docker/build.sh
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+
+#!/usr/bin/env bash
+
+set -e
+set -o pipefail
+
+docker build -t mapbox/gl-native:travis docker
diff --git a/docker/clang-tidy/Dockerfile b/docker/clang-tidy/Dockerfile
new file mode 100644
index 0000000000..c880391592
--- /dev/null
+++ b/docker/clang-tidy/Dockerfile
@@ -0,0 +1,9 @@
+FROM mapbox/gl-native:travis
+
+# Install compiler
+RUN apt-get -y install clang-3.8 lldb-3.8 clang-tidy-3.8 clang-format-3.8
+
+RUN useradd -ms /bin/bash mapbox
+USER mapbox
+ENV HOME /home/mapbox
+WORKDIR /home/mapbox
diff --git a/docker/clang-tidy/run.sh b/docker/clang-tidy/run.sh
new file mode 100755
index 0000000000..421aca9700
--- /dev/null
+++ b/docker/clang-tidy/run.sh
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+
+set -e
+set -o pipefail
+
+./docker/build.sh
+
+docker build -t mapbox/gl-native:clang-tidy docker/clang-tidy
+
+docker run \
+ -i \
+ -v `pwd`:/home/mapbox/build \
+ -t mapbox/gl-native:clang-tidy \
+ build/docker/clang-tidy/tidy.sh
diff --git a/docker/clang-tidy/tidy.sh b/docker/clang-tidy/tidy.sh
new file mode 100755
index 0000000000..9c939d219b
--- /dev/null
+++ b/docker/clang-tidy/tidy.sh
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+# set -e
+# set -o pipefail
+
+export FLAVOR=linux
+export CXX=clang++-3.8
+export BUILDTYPE=Release
+
+cd build
+
+# before_install
+source ./scripts/travis_helper.sh
+
+# install
+./scripts/${FLAVOR}/install.sh
+
+export CLANG_TIDY=clang-tidy-3.8
+make tidy
diff --git a/docker/launchpad.gpg.key b/docker/launchpad.gpg.key
new file mode 100644
index 0000000000..ebe1b1ec33
--- /dev/null
+++ b/docker/launchpad.gpg.key
@@ -0,0 +1,13 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1
+
+mI0ESuBvRwEEAMi4cDba7xlKaaoXjO1n1HX8RKrkW+HEIl79nSOSJyvzysajs7zU
+ow/OzCQp9NswqrDmNuH1+lPTTRNAGtK8r2ouq2rnXT1mTl23dpgHZ9spseR73s4Z
+BGw/ag4bpU5dNUStvfmHhIjVCuiSpNn7cyy1JSSvSs3N2mxteKjXLBf7ABEBAAG0
+GkxhdW5jaHBhZCBUb29sY2hhaW4gYnVpbGRziLYEEwECACAFAkrgb0cCGwMGCwkI
+BwMCBBUCCAMEFgIDAQIeAQIXgAAKCRAek3eiup7yfzGKA/4xzUqNACSlB+k+DxFF
+HqkwKa/ziFiAlkLQyyhm+iqz80htRZr7Ls/ZRYZl0aSU56/hLe0V+TviJ1s8qdN2
+lamkKdXIAFfavA04nOnTzyIBJ82EAUT3Nh45skMxo4z4iZMNmsyaQpNl/m/lNtOL
+hR64v5ZybofB2EWkMxUzX8D/FQ==
+=LcUQ
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/docker/linux/Dockerfile b/docker/linux/Dockerfile
index 36eaeed695..4c97d946e3 100644
--- a/docker/linux/Dockerfile
+++ b/docker/linux/Dockerfile
@@ -1,14 +1,7 @@
-FROM ubuntu:12.04
+FROM mapbox/gl-native:travis
-# 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 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 && \
- apt-get update -y && \
- apt-get -y install gdb g++-4.9 gcc-4.9 libllvm3.4 xutils-dev libxxf86vm-dev x11proto-xf86vidmode-dev mesa-utils
+# Install compiler
+RUN apt-get -y install gdb g++-4.9 gcc-4.9 libllvm3.4
RUN useradd -ms /bin/bash mapbox
USER mapbox
diff --git a/docker/linux/run-gcc.sh b/docker/linux/run.sh
index 91bbee64ae..3d41843cf2 100755
--- a/docker/linux/run-gcc.sh
+++ b/docker/linux/run.sh
@@ -3,6 +3,8 @@
set -e
set -o pipefail
+./docker/build.sh
+
docker build -t mapbox/gl-native:linux docker/linux
docker run \
diff --git a/docker/llvm-snapshot.gpg.key b/docker/llvm-snapshot.gpg.key
new file mode 100644
index 0000000000..aa6b105aa3
--- /dev/null
+++ b/docker/llvm-snapshot.gpg.key
@@ -0,0 +1,52 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.12 (GNU/Linux)
+
+mQINBFE9lCwBEADi0WUAApM/mgHJRU8lVkkw0CHsZNpqaQDNaHefD6Rw3S4LxNmM
+EZaOTkhP200XZM8lVdbfUW9xSjA3oPldc1HG26NjbqqCmWpdo2fb+r7VmU2dq3NM
+R18ZlKixiLDE6OUfaXWKamZsXb6ITTYmgTO6orQWYrnW6ckYHSeaAkW0wkDAryl2
+B5v8aoFnQ1rFiVEMo4NGzw4UX+MelF7rxaaregmKVTPiqCOSPJ1McC1dHFN533FY
+Wh/RVLKWo6npu+owtwYFQW+zyQhKzSIMvNujFRzhIxzxR9Gn87MoLAyfgKEzrbbT
+DhqqNXTxS4UMUKCQaO93TzetX/EBrRpJj+vP640yio80h4Dr5pAd7+LnKwgpTDk1
+G88bBXJAcPZnTSKu9I2c6KY4iRNbvRz4i+ZdwwZtdW4nSdl2792L7Sl7Nc44uLL/
+ZqkKDXEBF6lsX5XpABwyK89S/SbHOytXv9o4puv+65Ac5/UShspQTMSKGZgvDauU
+cs8kE1U9dPOqVNCYq9Nfwinkf6RxV1k1+gwtclxQuY7UpKXP0hNAXjAiA5KS5Crq
+7aaJg9q2F4bub0mNU6n7UI6vXguF2n4SEtzPRk6RP+4TiT3bZUsmr+1ktogyOJCc
+Ha8G5VdL+NBIYQthOcieYCBnTeIH7D3Sp6FYQTYtVbK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9IljT9XU98PelSryUO/5UPw7leE0akXKB4DtekToO226px1VnGp3Bov
+1GBGvpHvL2WizEwdk+nfk8LtrLzej+9FtIcq3uIrYnsac47Pf7p0otcFeTJTjSq3
+krCaoG4Hx0zGQG2ZFpHrSrZTVy6lxvIdfi0beMgY6h78p6M9eYZHQHc02DjFkQXN
+bXb5c6gCHESH5PXwPU4jQEE7Ib9J6sbk7ZT2Mw==
+=j+4q
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/docker/llvm.list b/docker/llvm.list
new file mode 100644
index 0000000000..2ca079d9d6
--- /dev/null
+++ b/docker/llvm.list
@@ -0,0 +1,2 @@
+deb http://llvm.org/apt/precise/ llvm-toolchain-precise main
+deb-src http://llvm.org/apt/precise/ llvm-toolchain-precise main
diff --git a/docker/ubuntu-toolchain-r.list b/docker/ubuntu-toolchain-r.list
new file mode 100644
index 0000000000..2ff8535f95
--- /dev/null
+++ b/docker/ubuntu-toolchain-r.list
@@ -0,0 +1,2 @@
+deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu precise main
+deb-src http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu precise main