summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2017-06-07 18:32:04 +0100
committerRichard Hughes <richard@hughsie.com>2017-06-08 09:11:19 +0100
commit9407f7c7ba2223dc9c2504b2eb2556c9c39a8f5f (patch)
tree0f3925012a8244e47a845b8b606995e948c41034
parentb5b4a855acb5c0a5b64e12d3a280309117fb7864 (diff)
downloadappstream-glib-9407f7c7ba2223dc9c2504b2eb2556c9c39a8f5f.tar.gz
Enable Travis CI for Fedora 25 and Debian Stretch
-rw-r--r--.travis.yml15
-rw-r--r--contrib/ci/Dockerfile-debian-stretch9
-rw-r--r--contrib/ci/Dockerfile-fedora-2531
-rwxr-xr-xcontrib/ci/build_and_test.sh12
4 files changed, 67 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..af284c0
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,15 @@
+language: c
+sudo: required
+dist: trusty
+
+services:
+ - docker
+
+before_script:
+ - docker build -t appstream-glib-fedora-25 -f contrib/ci/Dockerfile-fedora-25 .
+ - docker build -t appstream-glib-debian-stretch -f contrib/ci/Dockerfile-debian-stretch .
+
+script:
+ - docker run -t -v `pwd`:/build appstream-glib-fedora-25 ./contrib/ci/build_and_test.sh -Denable-rpm=true -Denable-dep11=false
+ # ideally Denable-dep11=true but meson is too old
+ - docker run -t -v `pwd`:/build appstream-glib-debian-stretch ./contrib/ci/build_and_test.sh -Denable-rpm=false -Denable-dep11=false
diff --git a/contrib/ci/Dockerfile-debian-stretch b/contrib/ci/Dockerfile-debian-stretch
new file mode 100644
index 0000000..e7e59f9
--- /dev/null
+++ b/contrib/ci/Dockerfile-debian-stretch
@@ -0,0 +1,9 @@
+FROM debian:stretch
+
+RUN echo "deb-src http://deb.debian.org/debian/ stretch main" >> /etc/apt/sources.list
+RUN apt-get update -qq
+RUN apt-get install -yq --no-install-recommends meson gcab libstemmer-dev
+RUN apt-get build-dep -yq appstream-glib
+
+RUN mkdir /build
+WORKDIR /build
diff --git a/contrib/ci/Dockerfile-fedora-25 b/contrib/ci/Dockerfile-fedora-25
new file mode 100644
index 0000000..e42a0be
--- /dev/null
+++ b/contrib/ci/Dockerfile-fedora-25
@@ -0,0 +1,31 @@
+FROM fedora:25
+
+RUN dnf -y update
+RUN dnf -y install \
+ docbook-style-xsl \
+ docbook-utils \
+ fontconfig-devel \
+ freetype-devel \
+ gcab \
+ gdk-pixbuf2-devel \
+ gettext \
+ glib2-devel \
+ gobject-introspection-devel \
+ gperf \
+ gtk3-devel \
+ gtk-doc \
+ json-glib-devel \
+ libarchive-devel \
+ libgcab1-devel \
+ libsoup-devel \
+ libstemmer-devel \
+ libuuid-devel \
+ libxslt \
+ libyaml-devel \
+ meson \
+ pango-devel \
+ redhat-rpm-config \
+ rpm-devel \
+ sqlite-devel
+RUN mkdir /build
+WORKDIR /build
diff --git a/contrib/ci/build_and_test.sh b/contrib/ci/build_and_test.sh
new file mode 100755
index 0000000..6200f62
--- /dev/null
+++ b/contrib/ci/build_and_test.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -e
+
+mkdir -p build && cd build
+rm * -rf
+meson .. \
+ -Denable-gtk-doc=true \
+ -Denable-stemmer=true $@
+ninja -v
+ninja test -v
+DESTDIR=/tmp/install-ninja ninja install
+cd ..