summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Nicole <nicole@kolabsystems.com>2018-02-27 18:02:52 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-02-27 18:03:04 +0100
commit117654d14339f22b2cf8abab92575aeef0f4e558 (patch)
treef3ab12ad36cb887270e424305e0dc3f91892f008
parent8a8729a371373d5c841e058ab21f4fdd0169b40a (diff)
downloadkube-117654d14339f22b2cf8abab92575aeef0f4e558.tar.gz
kube-117654d14339f22b2cf8abab92575aeef0f4e558.zip
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
-rw-r--r--.travis.yml62
-rwxr-xr-x.travis/install-flatbuffers.sh14
-rwxr-xr-x.travis/install-gpg.sh20
-rwxr-xr-x.travis/install-kde.sh15
4 files changed, 111 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000..869136fc
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,62 @@
1sudo: true
2language: c++
3cache: ccache
4addons:
5 apt:
6 sources:
7 - ubuntu-toolchain-r-test
8 - ubuntu-sdk-team
9 - sourceline: "ppa:beineri/opt-qt594-trusty"
10 - sourceline: "ppa:xapian-backports/ppa"
11 packages:
12 - g++-6
13 - cmake
14 - ninja-build
15 - qt59-meta-minimal
16 - qt59tools
17 - qt59script
18 - qt59webengine
19 - liblmdb-dev
20 - gperf
21 - libxapian-dev
22 - gnupg2
23 - gpgsm
24 - libassuan-dev
25 - libgpg-error-dev
26git:
27 depth: 1
28branches:
29 except:
30 - gh-pages
31
32before_install:
33 - source /opt/qt59/bin/qt59-env.sh
34
35install:
36 - ./.travis/install-kde.sh extra-cmake-modules v5.43.0
37 - ./.travis/install-kde.sh kcoreaddons v5.43.0
38 - ./.travis/install-kde.sh kcodecs v5.43.0
39 - ./.travis/install-kde.sh ki18n v5.43.0
40 - ./.travis/install-kde.sh kconfig v5.43.0
41
42 - ./.travis/install-kde.sh kmime v17.12.2
43 - ./.travis/install-kde.sh kasync v0.2.0
44 - ./.travis/install-kde.sh kcontacts v17.12.2
45
46 - ./.travis/install-flatbuffers.sh
47
48 - ./.travis/install-kde.sh kdav2 v0.1.0
49 - ./.travis/install-kde.sh kimap2 v0.2.1
50
51 - ./.travis/install-kde.sh sink develop
52
53 - ./.travis/install-gpg.sh libgpg-error 1.27 --enable-threads --enable-nls
54 - ./.travis/install-gpg.sh libassuan 2.5.1
55 - ./.travis/install-gpg.sh gpgme 1.10.0 --enable-languages="cpp qt"
56
57script:
58 - mkdir build
59 - cd build
60 - cmake .. -G Ninja
61 - ninja
62 #- ninja test
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 @@
1#!/bin/bash
2set -xeuo pipefail
3wget "https://github.com/google/flatbuffers/archive/v1.8.0.tar.gz" -O /tmp/flatbuffers.tar.gz
4cd /tmp
5tar xvfa /tmp/flatbuffers.tar.gz
6cd flatbuffers-1.8.0
7mkdir build
8cd build
9cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DFLATBUFFERS_BUILD_SHAREDLIB=ON
10ninja
11sudo ninja install
12sudo cp flatc /usr/bin
13cd
14rm -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 @@
1#!/bin/bash
2set -xeuo pipefail
3
4package=$1
5version=$2
6shift
7shift
8configure_opts=( "$@" )
9
10wget "https://www.gnupg.org/ftp/gcrypt/$package/$package-$version.tar.bz2" -O "/tmp/$package.tar.bz2"
11cd /tmp
12tar xvfa "/tmp/$package.tar.bz2"
13cd "$package-$version"
14# Expand configure_opts only if configure_opts is not undefined
15# (in older versions of Bash, empty array is considered undefined)
16./configure "${configure_opts[@]+"${configure_opts[@]}"}"
17make
18sudo make install
19cd
20rm -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 @@
1#!/bin/bash
2set -xeuo pipefail
3IFS=$'\n\t'
4
5package=$1
6version=$2
7
8git clone --branch="$version" --depth=1 --recursive "https://anongit.kde.org/$package" "/tmp/$package"
9cd "/tmp/$package"
10mkdir build
11cd build
12cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX=/usr
13ninja && sudo ninja install
14cd
15rm -rf "/tmp/$package"