From 117654d14339f22b2cf8abab92575aeef0f4e558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Nicole?= Date: Tue, 27 Feb 2018 18:02:52 +0100 Subject: Add Travis-CI integration Summary: Some notes: - From what I've seen, the `.travis.yml` file (and by extension the `.travis` dir) needs to be on every branch we want Travis to build continuously + the main (master) branch for detection - Since every branch continuously tested must have the `.travis.yml` file, that allows for feature specific dependency version pinning - The Sink dependency follows the "develop" branch, but Travis will not detect new commits in Sink, so to update, either trigger a build manually on Travis-CI, or make a new commit in Kube - Unit Tests are disabled for now Reviewers: cmollekopf Tags: #kube Differential Revision: https://phabricator.kde.org/D10891 --- .travis/install-flatbuffers.sh | 14 ++++++++++++++ .travis/install-gpg.sh | 20 ++++++++++++++++++++ .travis/install-kde.sh | 15 +++++++++++++++ 3 files changed, 49 insertions(+) create mode 100755 .travis/install-flatbuffers.sh create mode 100755 .travis/install-gpg.sh create mode 100755 .travis/install-kde.sh (limited to '.travis') diff --git a/.travis/install-flatbuffers.sh b/.travis/install-flatbuffers.sh new file mode 100755 index 00000000..9a030084 --- /dev/null +++ b/.travis/install-flatbuffers.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -xeuo pipefail +wget "https://github.com/google/flatbuffers/archive/v1.8.0.tar.gz" -O /tmp/flatbuffers.tar.gz +cd /tmp +tar xvfa /tmp/flatbuffers.tar.gz +cd flatbuffers-1.8.0 +mkdir build +cd build +cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DFLATBUFFERS_BUILD_SHAREDLIB=ON +ninja +sudo ninja install +sudo cp flatc /usr/bin +cd +rm -rf /tmp/flatbuffers.tar.gz /tmp/flatbuffers-1.8.0 diff --git a/.travis/install-gpg.sh b/.travis/install-gpg.sh new file mode 100755 index 00000000..9cd6f3e4 --- /dev/null +++ b/.travis/install-gpg.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -xeuo pipefail + +package=$1 +version=$2 +shift +shift +configure_opts=( "$@" ) + +wget "https://www.gnupg.org/ftp/gcrypt/$package/$package-$version.tar.bz2" -O "/tmp/$package.tar.bz2" +cd /tmp +tar xvfa "/tmp/$package.tar.bz2" +cd "$package-$version" +# Expand configure_opts only if configure_opts is not undefined +# (in older versions of Bash, empty array is considered undefined) +./configure "${configure_opts[@]+"${configure_opts[@]}"}" +make +sudo make install +cd +rm -rf "/tmp/$package.tar.bz2" "/tmp/$package-$version" diff --git a/.travis/install-kde.sh b/.travis/install-kde.sh new file mode 100755 index 00000000..55cc0f83 --- /dev/null +++ b/.travis/install-kde.sh @@ -0,0 +1,15 @@ +#!/bin/bash +set -xeuo pipefail +IFS=$'\n\t' + +package=$1 +version=$2 + +git clone --branch="$version" --depth=1 --recursive "https://anongit.kde.org/$package" "/tmp/$package" +cd "/tmp/$package" +mkdir build +cd build +cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX=/usr +ninja && sudo ninja install +cd +rm -rf "/tmp/$package" -- cgit v1.2.3