aboutsummaryrefslogtreecommitdiff
path: root/.travis.yml
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2017-02-09 13:51:30 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2017-02-09 14:20:51 +0000
commit4b7b5422dbb705ec0dab00cc18a8e915f8b334c0 (patch)
tree8674297b421e2dee813b76f6ae96d75618a226ef /.travis.yml
parent9b56140962ee6358184fb7c4ff2d5e3fac7dd7a9 (diff)
downloadlibepoxy-4b7b5422dbb705ec0dab00cc18a8e915f8b334c0.tar.gz
Update the TravisCI environment to use Docker
The Travis environment is terribly outdated, and they are not really subtly pushing people to use Docker to set up their own containerised CI environments instead of pulling from Ubuntu 12.04 or 14.04. Let's try using this approach: - create a Docker image that pulls from Debian Stretch - set up a build and test environment - push the image to the Docker Hub - create a derived Docker image that copies the Epoxy repo when running under Travis - run the build and test script inside the derived image This is similar to what Meson does for its CI.
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml34
1 files changed, 14 insertions, 20 deletions
diff --git a/.travis.yml b/.travis.yml
index c5958dc..5ed10ea 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,28 +1,22 @@
-language: c
+sudo: false
+
+os:
+ - linux
+
compiler:
- gcc
- - clang
-
-sudo: false
-addons:
- apt:
- packages:
- - xutils-dev
- - libgl1-mesa-dev
- - libegl1-mesa-dev
- - libgles1-mesa-dev
- - libgles2-mesa-dev
- - libgl1-mesa-dri
+language:
+ - c
-env:
- global:
- - DISPLAY=:99.0
+services:
+ - docker
before_install:
- - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x24"
+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull ebassi/epoxyci ; fi
script:
- - NOCONFIGURE=1 ./autogen.sh
- - mkdir _build && cd _build
- - ../configure && make V=1 && make V=1 check
+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM ebassi/epoxyci > Dockerfile ; fi
+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo ADD . /root >> Dockerfile ; fi
+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -t withgit . ; fi
+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run withgit /bin/sh -c "cd /root && TRAVIS=true CC=$CC CXX=$CXX ./epoxy-run-tests.sh" ; fi