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.
macos/v1.5.9
Emmanuele Bassi 8 years ago
parent 9b56140962
commit 4b7b5422db
  1. 34
      .travis.yml

@ -1,28 +1,22 @@
language: c sudo: false
os:
- linux
compiler: compiler:
- gcc - gcc
- clang
sudo: false
addons: language:
apt: - c
packages:
- xutils-dev
- libgl1-mesa-dev
- libegl1-mesa-dev
- libgles1-mesa-dev
- libgles2-mesa-dev
- libgl1-mesa-dri
env: services:
global: - docker
- DISPLAY=:99.0
before_install: 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: script:
- NOCONFIGURE=1 ./autogen.sh - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM ebassi/epoxyci > Dockerfile ; fi
- mkdir _build && cd _build - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo ADD . /root >> Dockerfile ; fi
- ../configure && make V=1 && make V=1 check - 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

Loading…
Cancel
Save