libverto/Add-Travis-support.patch
2017-08-03 17:59:55 +00:00

68 lines
1.5 KiB
Diff

From 695322c08c4031d873cd04a4bc7d7589b83368ac Mon Sep 17 00:00:00 2001
From: Robbie Harwood <rharwood@redhat.com>
Date: Wed, 2 Aug 2017 16:58:44 -0400
Subject: [PATCH] Add Travis support
(cherry picked from commit caf08f984596eeb77fdcb80009951f201e03b370)
---
.travis.sh | 23 +++++++++++++++++++++++
.travis.yml | 19 +++++++++++++++++++
2 files changed, 42 insertions(+)
create mode 100755 .travis.sh
create mode 100644 .travis.yml
diff --git a/.travis.sh b/.travis.sh
new file mode 100755
index 0000000..e404e9a
--- /dev/null
+++ b/.travis.sh
@@ -0,0 +1,23 @@
+#!/bin/bash -ex
+
+if [ -f /etc/debian_version ]; then
+ apt-get update
+ apt-get -y install autoconf build-essential libtool \
+ lib{ev,event,glib2.0}-dev
+elif [ -f /etc/fedora-release ]; then
+ # dnf has no update-only verb
+ dnf -y install autoconf automake libtool make \
+ {glib2,libevent,libev}-devel
+elif [ -f /etc/redhat-release ]; then
+ # rhel/centos
+ yum -y install autoconf automake libtool make \
+ {glib2,libevent}-devel
+else
+ echo "Distro not found!"
+ false
+fi
+
+autoreconf -fiv
+./configure
+make
+make check
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..4c63f28
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,19 @@
+sudo: required
+
+# not necessary, but less confusing if defined
+language: C
+
+services:
+ - docker
+
+env:
+ - DISTRO=debian:sid
+ - DISTRO=fedora:rawhide
+ - DISTRO=centos:7
+
+script:
+ - >
+ docker run
+ -v `pwd`:/tmp/build
+ -w /tmp/build
+ $DISTRO /bin/bash -ex .travis.sh