Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cache:
directories:
- apt_mingw_cache
- $HOME/.ccache
- $HOME/pbuilder-bases
matrix:
include:
- env: TARGET_OS=win32
Expand All @@ -19,21 +20,20 @@ matrix:
- os: osx
osx_image: xcode8.2
env: QT5=True
- env: TARGET_OS=debian-sid
before_install:
- . ${TRAVIS_BUILD_DIR}/.travis/${TRAVIS_OS_NAME}.${TARGET_OS}.before_install.sh
install:
- . ${TRAVIS_BUILD_DIR}/.travis/${TRAVIS_OS_NAME}.${TARGET_OS}.install.sh
before_script:
- mkdir build && cd build
- export CMAKE_FLAGS="-DWANT_QT5=$QT5 -DUSE_WERROR=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo"
- if [ -z "$TRAVIS_TAG" ]; then export CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_CCACHE=ON"; fi
script:
- . ${TRAVIS_BUILD_DIR}/.travis/${TRAVIS_OS_NAME}.${TARGET_OS}.script.sh
- make -j4
- if [[ $TARGET_OS != win* ]]; then make tests && ./tests/tests; fi;
after_script:
- ccache -s
before_deploy: make package
before_deploy:
- if [ "$TRAVIS_OS" != debian-sid ]; then make package; fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jasp00 Isn't this supposed to be $TARGET_OS, or I'm missing something?

deploy:
provider: releases
api_key:
Expand Down
2 changes: 2 additions & 0 deletions .travis/debian_pkgs.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
314ef4af137903dfb13e8c3ef1e6ea56cfdb23808d52ec4f5f50e288c73610c5 pbuilder_0.229.1_all.deb
fa82aa8ed3055c6f6330104deedf080b26778295e589426d4c4dd0f2c2a5defa debootstrap_1.0.95_all.deb
7 changes: 7 additions & 0 deletions .travis/linux..script.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#!/usr/bin/env bash
mkdir build
cd build

if [ $QT5 ]; then
unset QTDIR QT_PLUGIN_PATH LD_LIBRARY_PATH
source /opt/qt59/bin/qt59-env.sh
fi

cmake -DUSE_WERROR=ON $CMAKE_FLAGS ..

make -j4
make tests
./tests/tests
2 changes: 2 additions & 0 deletions .travis/linux.debian-sid.before_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
sudo apt-get update -qq
16 changes: 16 additions & 0 deletions .travis/linux.debian-sid.install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh
set -e

sudo apt-get install -y \
debian-archive-keyring \
dpkg \
pbuilder

# work around a pbuilder bug which breaks ccache
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666525
cd /tmp
wget http://archive.ubuntu.com/ubuntu/pool/main/p/pbuilder/pbuilder_0.229.1_all.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.95_all.deb
sha256sum -c "$TRAVIS_BUILD_DIR/.travis/debian_pkgs.sha256"
sudo dpkg -i pbuilder_0.229.1_all.deb debootstrap_1.0.95_all.deb
cd "$OLDPWD"
30 changes: 30 additions & 0 deletions .travis/linux.debian-sid.script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh
set -e

BASETGZ="$HOME/pbuilder-bases/debian-sid-amd64.tgz"
MIRROR=http://cdn-fastly.deb.debian.org/debian
KEYRING=/usr/share/keyrings/debian-archive-keyring.gpg

if [ -z "$TRAVIS_TAG" ]
then
sudo \
sh -c "echo CCACHEDIR=$HOME/.ccache >> /etc/pbuilderrc"
fi

if [ ! -e "$BASETGZ.stamp" ]
then
mkdir -p "$HOME/pbuilder-bases"
sudo pbuilder --create --basetgz "$BASETGZ" --mirror $MIRROR \
--distribution sid --architecture amd64 \
--debootstrapopts --variant=buildd \
--debootstrapopts --keyring=$KEYRING \
--debootstrapopts --include=perl
touch "$BASETGZ.stamp"
else
sudo pbuilder --update --basetgz "$BASETGZ"
fi

DIR="$PWD"
cd ..
dpkg-source -b "$DIR"
env -i sudo pbuilder --build --debbuildopts "--jobs=auto" --basetgz "$BASETGZ" ./*.dsc
4 changes: 4 additions & 0 deletions .travis/linux.win32.script.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/usr/bin/env bash
mkdir build
cd build

export CMAKE_OPTS="$CMAKE_FLAGS -DUSE_WERROR=ON"
../cmake/build_mingw32.sh

make -j4
4 changes: 4 additions & 0 deletions .travis/linux.win64.script.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/usr/bin/env bash
mkdir build
cd build

export CMAKE_OPTS="$CMAKE_FLAGS -DUSE_WERROR=ON"
../cmake/build_mingw64.sh

make -j4
6 changes: 6 additions & 0 deletions .travis/osx..script.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
#!/usr/bin/env bash
mkdir build
cd build

if [ $QT5 ]; then
# Workaround; No FindQt5.cmake module exists
export CMAKE_PREFIX_PATH="$(brew --prefix qt5)"
fi

cmake $CMAKE_FLAGS -DUSE_WERROR=OFF ..

make -j4
make tests
./tests/tests
3 changes: 2 additions & 1 deletion cmake/modules/BashCompletion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,10 @@ ELSE()
FILE(WRITE ${BASHCOMP_SCRIPT} "\
#!${BASH}\n\
set -e\n\
BASHCOMP_PKG_PATH=\"${BASHCOMP_USER_PATH}\"\n\
if [ -w \"${BASHCOMP_PKG_PATH}\" ]; then\n\
BASHCOMP_PKG_PATH=\"${BASHCOMP_PKG_PATH}\"\n\
else \n\
BASHCOMP_PKG_PATH=\"\$DESTDIR${BASHCOMP_USER_PATH}\"\n\
fi\n\
echo -e \"\\nInstalling bash completion...\\n\"\n\
mkdir -p \"\$BASHCOMP_PKG_PATH\"\n\
Expand Down
Loading