diff --git a/.travis.yml b/.travis.yml new file mode 100644 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,62 @@ +sudo: true +language: c++ +cache: ccache +addons: + apt: + sources: + - ubuntu-toolchain-r-test + - ubuntu-sdk-team + - sourceline: "ppa:beineri/opt-qt594-trusty" + - sourceline: "ppa:xapian-backports/ppa" + packages: + - g++-6 + - cmake + - ninja-build + - qt59-meta-minimal + - qt59tools + - qt59script + - qt59webengine + - liblmdb-dev + - gperf + - libxapian-dev + - gnupg2 + - gpgsm + - libassuan-dev + - libgpg-error-dev +git: + depth: 1 +branches: + except: + - gh-pages + +before_install: + - source /opt/qt59/bin/qt59-env.sh + +install: + - ./.travis/install-kde.sh extra-cmake-modules v5.43.0 + - ./.travis/install-kde.sh kcoreaddons v5.43.0 + - ./.travis/install-kde.sh kcodecs v5.43.0 + - ./.travis/install-kde.sh ki18n v5.43.0 + - ./.travis/install-kde.sh kconfig v5.43.0 + + - ./.travis/install-kde.sh kmime v17.12.2 + - ./.travis/install-kde.sh kasync v0.2.0 + - ./.travis/install-kde.sh kcontacts v17.12.2 + + - ./.travis/install-flatbuffers.sh + + - ./.travis/install-kde.sh kdav2 v0.1.0 + - ./.travis/install-kde.sh kimap2 v0.2.1 + + - ./.travis/install-kde.sh sink develop + + - ./.travis/install-gpg.sh libgpg-error 1.27 --enable-threads --enable-nls + - ./.travis/install-gpg.sh libassuan 2.5.1 + - ./.travis/install-gpg.sh gpgme 1.10.0 --enable-languages="cpp qt" + +script: + - mkdir build + - cd build + - cmake .. -G Ninja + - ninja + #- ninja test diff --git a/.travis/install-flatbuffers.sh b/.travis/install-flatbuffers.sh new file mode 100755 --- /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 --- /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 --- /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"