summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml18
-rw-r--r--Dockerfile10
2 files changed, 24 insertions, 4 deletions
diff --git a/.travis.yml b/.travis.yml
index 2d9194c28..c53bcf620 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,15 @@
language: cpp
-before_install:
- - sudo apt-get update -q
- - sudo apt-get install -q --no-install-recommends dpkg-dev debhelper libdb-dev gettext libcurl4-gnutls-dev zlib1g-dev libbz2-dev xsltproc docbook-xsl docbook-xml po4a autotools-dev autoconf automake doxygen debiandoc-sgml stunnel4
-script: make && make test && test/integration/run-tests
+sudo: required
+services:
+ - docker
+env:
+ - USER=travis
+ - USER=root
+install:
+ - sed -i -e "s#1000#$(id -u)#g" Dockerfile
+ - docker build --tag=apt-ci .
+before_script:
+ - docker run --rm -w $PWD -v $HOME/.ccache:$HOME/.ccache -v $PWD:$PWD --user=travis apt-ci make
+script:
+ - docker run --rm -w $PWD -v $PWD:$PWD --user=travis apt-ci env make test
+ - docker run --rm -w $PWD -v $PWD:$PWD --user=$USER --tmpfs /tmp:suid,exec apt-ci unbuffer ./test/integration/run-tests
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 000000000..516a17af8
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,10 @@
+FROM ubuntu:trusty
+COPY . /tmp
+WORKDIR /tmp
+RUN sed -i s#://deb.debian.org#://cdn-fastly.deb.debian.org# /etc/apt/sources.list \
+ && apt-get update \
+ && adduser --home /home/travis travis --quiet --disabled-login --gecos "" --uid 1000 \
+ && env DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends build-essential ccache expect-dev fakeroot libfile-fcntllock-perl wget curl git dpkg-dev debhelper libdb-dev gettext libcurl4-gnutls-dev zlib1g-dev libbz2-dev xsltproc docbook-xsl docbook-xml po4a autotools-dev autoconf automake doxygen debiandoc-sgml stunnel4 -q -y \
+ && dpkg-reconfigure ccache \
+ && rm -r /tmp/* \
+ && apt-get clean