summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2019-09-18 01:07:10 +0300
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2019-09-18 01:53:29 +0300
commitaa5f35e5c3d653d631d02084b100d6e8e49b55ad (patch)
tree5c518e0d9bb785429941a7a19b6644d471b4b415
parentfc7d2938dd7352055ed0562db5235c97e5a01745 (diff)
downloadqtlocation-mapboxgl-upstream/tmpsantos-ci_sanity.tar.gz
-rw-r--r--scripts/ci_sanity/Dockerfile26
-rw-r--r--scripts/ci_sanity/build.sh1
-rw-r--r--scripts/ci_sanity/etc/apt/sources.list10
-rw-r--r--scripts/ci_sanity/format.sh1
-rw-r--r--scripts/ci_sanity/tidy.sh1
5 files changed, 39 insertions, 0 deletions
diff --git a/scripts/ci_sanity/Dockerfile b/scripts/ci_sanity/Dockerfile
new file mode 100644
index 0000000000..5b8769e57d
--- /dev/null
+++ b/scripts/ci_sanity/Dockerfile
@@ -0,0 +1,26 @@
+FROM ubuntu:disco-20190718
+
+ENV DEBIAN_FRONTEND="noninteractive"
+ENV ANDROID_HOME="/opt/android"
+
+WORKDIR /src
+
+# Use faster mirrors from Finland
+COPY etc/apt/sources.list /etc/apt
+
+RUN set -eu \
+ && apt-get update\
+ && apt-get dist-upgrade -y
+
+# Base dependencies
+RUN set -eu && apt-get install -y \
+ clang-format-8 \
+ clang-tidy-8 \
+ git \
+ npm \
+ python3-pip
+
+RUN pip3 install cmake_format
+
+# Cleanup
+RUN set -eu && apt-get clean
diff --git a/scripts/ci_sanity/build.sh b/scripts/ci_sanity/build.sh
new file mode 100644
index 0000000000..3b25e7f0ff
--- /dev/null
+++ b/scripts/ci_sanity/build.sh
@@ -0,0 +1 @@
+docker run --user 1000:1000 --rm -it -v $PWD:/src tmpsantos/mbgl_ci:1.5 /bin/bash
diff --git a/scripts/ci_sanity/etc/apt/sources.list b/scripts/ci_sanity/etc/apt/sources.list
new file mode 100644
index 0000000000..c5359e131a
--- /dev/null
+++ b/scripts/ci_sanity/etc/apt/sources.list
@@ -0,0 +1,10 @@
+deb http://fi.archive.ubuntu.com/ubuntu/ disco main restricted
+deb http://fi.archive.ubuntu.com/ubuntu/ disco-updates main restricted
+deb http://fi.archive.ubuntu.com/ubuntu/ disco universe
+deb http://fi.archive.ubuntu.com/ubuntu/ disco-updates universe
+deb http://fi.archive.ubuntu.com/ubuntu/ disco multiverse
+deb http://fi.archive.ubuntu.com/ubuntu/ disco-updates multiverse
+deb http://fi.archive.ubuntu.com/ubuntu/ disco-backports main restricted universe multiverse
+deb http://security.ubuntu.com/ubuntu/ disco-security main restricted
+deb http://security.ubuntu.com/ubuntu/ disco-security universe
+deb http://security.ubuntu.com/ubuntu/ disco-security multiverse
diff --git a/scripts/ci_sanity/format.sh b/scripts/ci_sanity/format.sh
new file mode 100644
index 0000000000..cb3507f462
--- /dev/null
+++ b/scripts/ci_sanity/format.sh
@@ -0,0 +1 @@
+docker run --rm -v $PWD:/src:ro tmpsantos/mbgl_ci:1.5 /bin/bash -c 'git diff -U0 --no-color origin/master... *.cpp *.hpp /src |clang-format-diff-8 -p1'
diff --git a/scripts/ci_sanity/tidy.sh b/scripts/ci_sanity/tidy.sh
new file mode 100644
index 0000000000..7f6d649246
--- /dev/null
+++ b/scripts/ci_sanity/tidy.sh
@@ -0,0 +1 @@
+docker run --rm -v $PWD:$PWD:ro tmpsantos/mbgl_ci:1.5 /bin/bash -c 'cd /home/tmpsantos/Projects/mapbox-gl-native && git diff -U0 --no-color origin/master... src include |clang-tidy-diff-8.py -clang-tidy-binary clang-tidy-8 -p1 -path build'