This is not the actual Travis docker container, but it
should be similar enough for doing local verification:
make travis
make travis CC=clang
make travis CC=clang CFLAGS="-fsanitize=address -g" ASAN_OPTIONS="detect_leaks=0"
make travis CC=i686-w64-mingw32-gcc HOST="--host=i686-w64-mingw32" TEST="unittest/run.exe"
--- /dev/null
+# NOTE: This is not the real Docker image used for the Travis builds.
+# See: https://docs.travis-ci.com/user/common-build-problems/
+
+FROM ubuntu:trusty
+
+# https://github.com/Yelp/dumb-init
+ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64.deb .
+RUN dpkg -i dumb-init_*.deb
+ENTRYPOINT ["/usr/bin/dumb-init", "--"]
+
+# generic tools
+RUN apt-get -qq update && apt-get install -y --no-install-recommends \
+ libc6-dev \
+ gcc \
+ clang \
+ gcc-mingw-w64 \
+ make \
+ autoconf \
+ && rm -rf /var/lib/apt/lists/*
+
+# ccache specific
+RUN apt-get -qq update && apt-get install -y --no-install-recommends \
+ gperf \
+ elfutils \
+ zlib1g-dev \
+ && rm -rf /var/lib/apt/lists/*
SCAN_BUILD = scan-build
DOCKER = docker
GPERF = gperf
+TEST = test
version := \
$(shell (git --git-dir=$(srcdir)/.git describe --dirty || git --git-dir=$(srcdir)/.git describe || echo vunknown) \
docker: misc/Dockerfile
$(DOCKER) build -f $< $(srcdir)
+.PHONY: travis
+travis: .travis/Dockerfile
+ $(DOCKER) inspect travis-build >/dev/null || $(DOCKER) build -t travis-build .travis
+ $(DOCKER) run --rm --volume $(PWD):/src --tmpfs /dst:rw,exec travis-build \
+ sh -c "cd /src && ./autogen.sh && cd /dst && CC=$(CC) CFLAGS='$(CFLAGS)' ASAN_OPTIONS='$(ASAN_OPTIONS)' /src/configure $(HOST) && make $(TEST)"
+
-include .deps/*.d