ci: Add Docker image files

There's no real benefit in hosting the Dockerfile in an external
repository.
macos/v1.5.9
Emmanuele Bassi 7 years ago
parent fe62e02231
commit a57fb0b171
  1. 6
      .travis.yml
  2. 31
      .travis/Dockerfile
  3. 20
      .travis/epoxy-run-tests.sh
  4. 12
      .travis/run-docker.sh

@ -27,6 +27,6 @@ before_script:
- docker build -t withgit . - docker build -t withgit .
script: script:
- docker run withgit /bin/sh -c "cd /root && CC=$CC ./epoxy-run-tests.sh" - docker run withgit /bin/sh -c "CC=$CC ./epoxy-run-tests.sh"
- docker run withgit /bin/sh -c "cd /root && CC=$CC ./epoxy-run-tests.sh -Denable-glx=no" - docker run withgit /bin/sh -c "CC=$CC ./epoxy-run-tests.sh -Denable-glx=no"
- docker run withgit /bin/sh -c "cd /root && CC=$CC ./epoxy-run-tests.sh -Denable-egl=no" - docker run withgit /bin/sh -c "CC=$CC ./epoxy-run-tests.sh -Denable-egl=no"

@ -0,0 +1,31 @@
FROM debian:stretch-slim
MAINTAINER Emmanuele Bassi <ebassi@gmail.com>
RUN apt-get update -qq && \
apt-get install --no-install-recommends -qq -y \
ca-certificates \
clang \
gcc \
libgl1-mesa-dev \
libegl1-mesa-dev \
libgles1-mesa-dev \
libgles2-mesa-dev \
libgl1-mesa-dri \
locales \
ninja-build \
pkg-config \
python3 \
python3-pip \
python3-setuptools \
python3-wheel \
xvfb && \
rm -rf /usr/share/doc/* /usr/share/man/*
RUN locale-gen C.UTF-8 && /usr/sbin/update-locale LANG=C.UTF-8
ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8
RUN pip3 install meson
WORKDIR /root
COPY epoxy-run-tests.sh .

@ -0,0 +1,20 @@
#!/bin/bash
# Start Xvfb
XVFB_WHD=${XVFB_WHD:-1280x720x16}
Xvfb :99 -ac -screen 0 $XVFB_WHD -nolisten tcp &
xvfb=$!
export DISPLAY=:99
mkdir _build
meson --prefix /usr "$@" _build . || exit $?
ninja -C _build || exit $?
meson test -C _build || exit $?
rm -rf _build
# Stop Xvfb
kill -9 ${xvfb}

@ -0,0 +1,12 @@
#!/bin/bash
set -xe
srcdir="$(pwd)/.."
sudo docker build \
--tag "epoxyci" \
--file "Dockerfile" .
sudo docker run --rm \
--volume "${srcdir}:/root/epoxy" \
--tty --interactive "epoxyci" bash
Loading…
Cancel
Save