summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml4
-rw-r--r--Dockerfile25
2 files changed, 29 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000000000000..f81563eaa5d9
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,4 @@
+services:
+- docker
+script:
+- docker build --pull .
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 000000000000..eb2e4373baf2
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,25 @@
+FROM archlinux
+
+# base-devel is required for building.
+#
+# gtk3 is an optional dependency, but to that all linked libraries are satisfied,
+# we also install it.
+RUN pacman -Syy --noconfirm base-devel gtk3
+
+RUN useradd build
+
+RUN bash -c "echo 'build ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/build"
+
+COPY . /home/build/src/droidcam
+
+WORKDIR /home/build/src/droidcam
+
+RUN chown build: -R /home/build/src
+
+RUN sudo -u build makepkg -scir --noconfirm
+
+# List all linked dependencies.
+RUN bash -c 'ldd $(which droidcam) $(which droidcam-cli)'
+
+# If some linked libraries are not found, fail.
+RUN bash -c '(ldd $(which droidcam) $(which droidcam-cli) | grep "not found" && exit 1) || exit 0'