From 9a355507624e778b526bcb125ff062804c37302d Mon Sep 17 00:00:00 2001
From: Koichiro IWAO
Date: Tue, 21 Aug 2018 13:56:04 +0900
Subject: [PATCH 1/2] introduce travis build test
---
.travis.centos.sh | 21 +++++++++++++++++++++
.travis.ubuntu.sh | 22 ++++++++++++++++++++++
.travis.yml | 18 ++++++++++++++++++
3 files changed, 61 insertions(+)
create mode 100644 .travis.centos.sh
create mode 100644 .travis.ubuntu.sh
create mode 100644 .travis.yml
diff --git a/.travis.centos.sh b/.travis.centos.sh
new file mode 100644
index 0000000..66be77b
--- /dev/null
+++ b/.travis.centos.sh
@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+
+SRC_DIR=${PWD}
+
+cd /tmp
+yum install -y epel-release
+yum install -y xrdp xrdp-devel xrdp-selinux wget
+yum install -y pulseaudio pulseaudio-libs pulseaudio-libs-devel
+yum-builddep -y pulseaudio
+yum groupinstall -y "Development Tools"
+
+PULSE_VER=$(pkg-config --modversion libpulse)
+
+# not to make traffic on upstream server
+wget http://distcache.freebsd.org/ports-distfiles/pulseaudio-${PULSE_VER}.tar.xz
+tar xf pulseaudio-${PULSE_VER}.tar.xz
+cd pulseaudio-${PULSE_VER}
+./configure || exit 1
+
+cd ${SRC_DIR}
+./bootstrap && ./configure PULSE_DIR=/tmp/pulseaudio-${PULSE_VER} && make
diff --git a/.travis.ubuntu.sh b/.travis.ubuntu.sh
new file mode 100644
index 0000000..2921f1e
--- /dev/null
+++ b/.travis.ubuntu.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+
+SRC_DIR=${PWD}
+
+cd /tmp
+sed -i.bak -e 's|^# deb-src|deb-src|' /etc/apt/sources.list
+
+apt update
+apt install -y build-essential dpkg-dev libpulse-dev pulseaudio pkg-config xrdp
+apt install -y g++ clang
+
+apt install -y pulseaudio
+apt build-dep -y pulseaudio
+apt source pulseaudio
+
+PULSE_VER=$(pkg-config --modversion libpulse)
+
+cd pulseaudio-${PULSE_VER}
+./configure || exit 1
+
+cd ${SRC_DIR}
+./bootstrap && ./configure PULSE_DIR=/tmp/pulseaudio-${PULSE_VER} && make
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..a4bc89a
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,18 @@
+# vim:ts=2:sw=2:sts=0:number:expandtab
+language: c
+
+env:
+ matrix:
+ - OS_TYPE=ubuntu OS_VERSION=18.04 BRANCH=devel
+ - OS_TYPE=ubuntu OS_VERSION=18.04 BRANCH=master
+ - OS_TYPE=centos OS_VERSION=7 BRANCH=devel
+ - OS_TYPE=centos OS_VERSION=7 BRANCH=master
+
+services:
+ - docker
+
+before_install:
+ - docker pull ${OS_TYPE}:${OS_VERSION}
+
+script:
+ - docker run --rm --interactive --tty --volume=${PWD}:${PWD} ${OS_TYPE}:${OS_VERSION} bash -c "cd ${PWD} && bash .travis.${OS_TYPE}.sh"
From 08b8d6b136bb5a0cc975dd555ae435663c58c7b3 Mon Sep 17 00:00:00 2001
From: Koichiro IWAO
Date: Tue, 21 Aug 2018 17:38:53 +0900
Subject: [PATCH 2/2] Show build status badge on readme
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index 34a994f..b743201 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,5 @@
+[![Build Status](https://travis-ci.org/neutrinolabs/pulseaudio-module-xrdp.svg?branch=travis)](https://travis-ci.org/neutrinolabs/pulseaudio-module-xrdp)
+
The latest version of this document can be found at wiki.
* https://github.com/neutrinolabs/pulseaudio-module-xrdp/wiki/README