Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/Remmina/Remmina.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml39
-rwxr-xr-xscripts/travis-build.sh93
2 files changed, 115 insertions, 17 deletions
diff --git a/.travis.yml b/.travis.yml
index 047cad37c..94235b53d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,5 @@
# Remmina - The GTK+ Remote Desktop Client
-# Copyright (C) 2014-2016 Antenore Gatta, Giovanni Panozzo
+# Copyright (C) 2014-2017 Antenore Gatta, Giovanni Panozzo
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -31,26 +31,31 @@
#
#
-language: c
-
sudo: required
-dist: trusty
+language: generic
+
+services:
+- docker
+
+env:
+ global:
+ - DOCKER_IMAGE=ubuntu:xenial
+ - DEB_PPA='ppa:remmina-ppa-team/remmina-next'
+ - SNAP_UNSTABLE_CHANNEL=edge
+ - SNAP_RELEASE_CHANNEL=stable
+ matrix:
+ - BUILD_TYPE=deb
+ - BUILD_TYPE=snap
+ - BUILD_TYPE=snap ARCH=i386
-compiler:
- - gcc
- # - clang
before_install:
- - sudo apt-add-repository ppa:remmina-ppa-team/remmina-next -y
- - sudo apt-get update -qq
- - sudo apt-get install freerdp-x11 libfreerdp-dev libfreerdp-plugins-standard libfreerdp1 -y
- - sudo aptitude install build-essential git-core cmake libssl-dev libx11-dev libxext-dev libxinerama-dev libxcursor-dev libxdamage-dev libxv-dev libxkbfile-dev libasound2-dev libcups2-dev libxml2 libxml2-dev libxrandr-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libxi-dev libavutil-dev libavcodec-dev libxtst-dev libgtk-3-dev libgcrypt11-dev libssh-dev libpulse-dev libvte-2.90-dev libxkbfile-dev libfreerdp-dev libtelepathy-glib-dev libjpeg-dev libgnutls-dev libgnome-keyring-dev libavahi-ui-gtk3-dev libvncserver-dev libappindicator3-dev intltool libsecret-1-dev libwebkit2gtk-3.0-dev libspice-protocol-dev libspice-client-gtk-3.0-dev -y
+ - sudo scripts/travis-build.sh before_install
+
+install:
+ - sudo scripts/travis-build.sh install
script:
- - git clean -f
- - mkdir build
- - cd build
- - cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_SSE2=ON -DWITH_APPINDICATOR=OFF --build=build ..
- - make VERBOSE=1
-
+ - sudo scripts/travis-build.sh script
+
# EOF #
diff --git a/scripts/travis-build.sh b/scripts/travis-build.sh
new file mode 100755
index 000000000..ba9da4f83
--- /dev/null
+++ b/scripts/travis-build.sh
@@ -0,0 +1,93 @@
+#!/bin/bash
+# Remmina - The GTK+ Remote Desktop Client
+# Copyright (C) 2014-2017 Marco Trevisan
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+#
+# In addition, as a special exception, the copyright holders give
+# permission to link the code of portions of this program with the
+# OpenSSL library under certain conditions as described in each
+# individual source file, and distribute linked combinations
+# including the two.
+# You must obey the GNU General Public License in all respects
+# for all of the code used other than OpenSSL.# If you modify
+# file(s) with this exception, you may extend this exception to your
+# version of the file(s), but you are not obligated to do so.# If you
+# do not wish to do so, delete this exception statement from your
+# version.# If you delete this exception statement from all source
+# files in the program, then also delete it here.
+#
+#
+set -xe
+
+TRAVIS_BUILD_STEP="$1"
+DOCKER_BUILDER_NAME='builder'
+
+if [ -z "$TRAVIS_BUILD_STEP" ]; then
+ echo "No travis build step defined"
+ exit 0
+fi
+
+function docker_exec() {
+ docker exec -i $DOCKER_BUILDER_NAME $*
+}
+
+function docker_bash() {
+ docker_exec bash -c "$*"
+}
+
+if [ "$BUILD_TYPE" == "deb" ]; then
+ if [ "$TRAVIS_BUILD_STEP" == "before_install" ]; then
+ apt-add-repository $DEB_PPA -y
+ apt-get update -q
+ apt-get install -y devscripts equivs
+ elif [ "$TRAVIS_BUILD_STEP" == "install" ]; then
+ mk-build-deps -ir remmina
+ apt-get install -y libspice-protocol-dev libspice-client-gtk-3.0-dev
+ elif [ "$TRAVIS_BUILD_STEP" == "script" ]; then
+ git clean -f
+ mkdir build
+ cd build
+ cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_SSE2=ON -DWITH_APPINDICATOR=OFF --build=build ..
+ make VERBOSE=1
+ fi
+elif [ "$BUILD_TYPE" == "snap" ]; then
+ if [ "$TRAVIS_BUILD_STEP" == "before_install" ]; then
+ if [ -n "$ARCH" ]; then DOCKER_IMAGE="$ARCH/$DOCKER_IMAGE"; fi
+ docker run --name $DOCKER_BUILDER_NAME -v $PWD:$PWD -w $PWD -td $DOCKER_IMAGE
+ elif [ "$TRAVIS_BUILD_STEP" == "install" ]; then
+ docker_exec apt-get update -q
+ docker_exec apt-get install cmake git-core snapcraft -y
+ elif [ "$TRAVIS_BUILD_STEP" == "script" ]; then
+ git clean -f
+ mkdir build
+ docker_exec cmake -Bbuild -H. -DSNAP_BUILD_ONLY=ON
+
+ # Sometimes the arch isn't properly recognized by snapcraft
+ if [ -n "$ARCH" ]; then
+ echo -e "architectures:\n - $ARCH" >> build/snap/snapcraft.yaml
+ fi
+
+ if [ -n "$TRAVIS_TAG" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
+ docker_exec make snap -C build
+ else
+ docker exec -i $DOCKER_BUILDER_NAME bash -c 'cd build/snap && snapcraft prime'
+ fi
+ fi
+else
+ echo 'No $BUILD_TYPE defined'
+ exit 1
+fi