]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Add docker target for running test with Docker
authorAnders F Björklund <anders.f.bjorklund@gmail.com>
Fri, 24 Mar 2017 17:44:38 +0000 (18:44 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 25 Mar 2017 19:45:52 +0000 (20:45 +0100)
Add standard container definition for running the tests,
to make things easier for developers on other platforms.

.dockerignore [new file with mode: 0644]
Dockerfile [new file with mode: 0644]
dev.mk.in

diff --git a/.dockerignore b/.dockerignore
new file mode 100644 (file)
index 0000000..13937aa
--- /dev/null
@@ -0,0 +1,2 @@
+.git
+**/.vagrant
diff --git a/Dockerfile b/Dockerfile
new file mode 100644 (file)
index 0000000..47f1ce1
--- /dev/null
@@ -0,0 +1,18 @@
+FROM ubuntu:16.04
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+                gcc \
+                make \
+                autoconf \
+                gperf \
+                zlib1g-dev \
+        && rm -rf /var/lib/apt/lists/*
+
+WORKDIR /tmp/build
+
+COPY . .
+
+RUN ./autogen.sh \
+        && ./configure \
+        && make \
+        && make test
index 06deaaaa081a267edfdbe6af8feec8ffea567bcc..9b681beac2ab860ee970416c58c9f41b67203954 100644 (file)
--- a/dev.mk.in
+++ b/dev.mk.in
@@ -7,6 +7,7 @@ ASCIIDOC = asciidoc
 CPPCHECK = cppcheck
 CPPCHECK_SUPPRESSIONS = cppcheck-suppressions.txt
 SCAN_BUILD = scan-build
+DOCKER = docker
 GPERF = gperf
 XSLTPROC = xsltproc
 MANPAGE_XSL = $(shell if [ -e /usr/local/etc/asciidoc/docbook-xsl/manpage.xsl ]; \
@@ -167,4 +168,8 @@ analyze:
        $(SCAN_BUILD) --use-cc=$(CC) ./configure
        $(SCAN_BUILD) --use-cc=$(CC) --status-bugs $(MAKE) -B
 
+.PHONY: docker
+docker: Dockerfile
+       $(DOCKER) build $(srcdir)
+
 -include .deps/*.d