forked from quassel/quassel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
90 lines (83 loc) · 2.77 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
sudo: required
services:
- docker
# Define build matrix for Linux
os: linux
language: generic # No host compilation
env:
- DIST=xenial CXX=g++ CMAKE_OPTIONS="-DWITH_KDE=OFF -DWITH_WEBKIT=OFF"
- DIST=xenial CXX=clang++ CMAKE_OPTIONS="-DWITH_KDE=OFF -DWITH_WEBKIT=OFF"
- DIST=xenial CXX=g++ CMAKE_OPTIONS="-DWITH_KDE=ON -DWITH_WEBKIT=ON"
- DIST=xenial CXX=clang++ CMAKE_OPTIONS="-DWITH_KDE=ON -DWITH_WEBKIT=ON"
- DIST=bionic CXX=g++ CMAKE_OPTIONS="-DWITH_KDE=ON -DWITH_WEBKIT=ON"
- DIST=bionic CXX=clang++ CMAKE_OPTIONS="-DWITH_KDE=ON -DWITH_WEBENGINE=ON"
- DIST=cosmic CXX=g++ CMAKE_OPTIONS="-DWITH_KDE=ON -DWITH_WEBENGINE=ON"
- DIST=cosmic CXX=clang++ CMAKE_OPTIONS="-DWITH_KDE=ON -DWITH_WEBENGINE=ON"
# Set up cache
cache:
directories:
- $TRAVIS_BUILD_DIR/ccache
# Prepare
before_install:
- docker pull quassel/quassel-build-env:$DIST
- docker images
- mkdir build
# Build inside the docker image
# Source, build and ccache directories are bind-mounted into the container
script:
- |
docker run -t -w /build --rm \
-v "$(readlink -f .):/src" \
-v "$(readlink -f build):/build" \
-v "$(readlink -f ccache):/ccache" \
-e CCACHE_DIR=/ccache \
-e CCACHE_MAXSIZE=1G \
-e CXX=$CXX \
quassel/quassel-build-env:$DIST \
sh -c "cmake /src $CMAKE_OPTIONS \
-GNinja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBUILD_TESTING=ON \
-DFATAL_WARNINGS=ON \
&& ninja install \
&& ccache -s \
&& ctest -VV \
"
# Define a separate job for OSX
jobs:
include:
- os: osx
language: cpp
compiler: clang
env:
cache:
directories:
- $HOME/.ccache
- $HOME/Library/Caches/Homebrew
before_install:
- brew update && brew install ccache ninja qca qt5
script:
- export CCACHE_MAXSIZE=1G
- mkdir build && cd build
- |
PATH=$PATH:/usr/local/opt/qt5/bin
DEPLOY=OFF
if [[ "$TRAVIS_TAG" != "" && "$GH_TOKEN" != "" ]]; then
DEPLOY=ON
fi
cmake -GNinja .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DDEPLOY=$DEPLOY
ninja install
- ccache -s
- ctest -VV
deploy:
provider: releases
api_key: "${GH_TOKEN}"
file_glob: true
file:
- "QuasselClient_MacOSX-x86_64_*.dmg"
- "QuasselCore_MacOSX-x86_64_*.dmg"
- "QuasselMono_MacOSX-x86_64_*.dmg"
skip_cleanup: true
on:
tags: true
condition: "$GH_TOKEN != ''"