forked from QupZilla/qupzilla
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
95 lines (87 loc) · 3.7 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
91
92
93
94
95
sudo: required
dist: trusty
language: cpp
cache: ccache
matrix:
include:
- os: osx
osx_image: xcode8.3
env:
- QT=qt58
before_install:
- export QZ_VER=2.1.99
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
export DISPLAY=:99.0;
sh -e /etc/init.d/xvfb start;
fi
install:
- export QZ_DIR=$PWD
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo apt-get -qq update;
sudo apt-get -qq install libssl-dev pkg-config libxcb-util0-dev;
if [[ "$QT" == "qt58" ]]; then
sudo apt-add-repository -y ppa:beineri/opt-qt58-trusty;
sudo apt-get update -qq;
sudo apt-get install -qq qt58tools qt58script qt58webengine qt58webchannel qt58declarative qt58x11extras;
fi
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
echo "Calling brew update...";
brew update;
brew outdated openssl || brew upgrade openssl;
brew install ccache;
PATH="/usr/local/opt/ccache/libexec:$PATH";
if [[ "$QT" == "qt58" ]]; then
QT_VER=5.8;
if [ -z "$TRAVIS_TAG" ]; then
echo "Using Homebrew Qt...";
brew install qt5;
export QTDIR=/usr/local/opt/qt5;
else
echo "Using official Qt installer...";
QT_INSTALLER_FILE_NAME=qt-opensource-mac-x64-clang-$QT_VER.0;
wget "http://download.qt.io/official_releases/qt/$QT_VER/$QT_VER.0/$QT_INSTALLER_FILE_NAME.dmg";
hdiutil attach -noverify $QT_INSTALLER_FILE_NAME.dmg;
QT_INSTALLER=/Volumes/$QT_INSTALLER_FILE_NAME/$QT_INSTALLER_FILE_NAME.app/Contents/MacOS/$QT_INSTALLER_FILE_NAME;
echo "Silently installing Qt...";
travis_wait $QT_INSTALLER --script $QZ_DIR/mac/qt-mac-silent-install.qs;
export QTDIR="$HOME/Qt/$QT_VER/clang_64";
fi
fi
fi
script:
- QMAKE="qmake"
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
CXXFLAGS="-Wextra -Werror";
if [[ "$QT" == "qt58" ]]; then QMAKE="/opt/qt58/bin/qmake"; fi
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
MACDEPLOYQT="macdeployqt";
CXXFLAGS="-Wextra -Werror -Wno-inconsistent-missing-override -Wno-deprecated-declarations";
if [[ "$QT" == "qt58" ]]; then
MACDEPLOYQT=$QTDIR/bin/macdeployqt;
QMAKE=$QTDIR/bin/qmake;
fi
fi
- $QMAKE QMAKE_CXXFLAGS+="$CXXFLAGS"
- make -j2 CC=$CC CXX=$CXX || exit 1
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
cp -v bin/libQupZilla*.dylib tests/autotests;
fi
- cd scripts && ./run_tests.sh $QMAKE
- ccache --show-stats
before_deploy:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
cd $QZ_DIR;
make bundle;
mv bin/QupZilla.dmg bin/QupZilla-${QZ_VER}.dmg;
fi
deploy:
provider: releases
api_key:
secure: "bGGHyeMXF3nrFIaJCzA5zicH3TfdcMNY6+DT+84veBoCAsBMIjp+1t//mkEBnyAYZHKV/6XDhgztwinX1yEylvOeXxQXG5J0fYj96UzZmjBY+QmgDc31XgVeKKIbEi0Ab2bkgW3qHyQJ5ao/lZwSPCt1stOnjz0WuGgrjGWoAgEoHBXzRlsGzU2LrF/bXnmjyPL/qe7AaV0neE9mD+FmeQwiBPoP+/cQCyz5veOdjuzCy4I57HLCvNH4y28z1p6qotS+V1jGRj8PgMWWQP/VXVp9glTV0+gGkOLKL91SPKvLkS76f5bgn6K3+vdDASf+ZCNajIsh1YpwiabX4tQKwnCd80Ps9PR5dXcQVPMBRy1lFr6u2ps0ZTTfiBpI6vqyvLtyv2QbrfGZfT5bWtwdqpSRPJhp6b/ieHHduuRkZ0aU3JuTpLeoob+rLlkvYQmpvmDgyTx44/q+UOOetkoSCD276sMxYxsd3DJKyeG320UcQvwU+dR8uv9NDdv9wpUi13mfGqaRdcSXXgUQWpZlzCGvQYwLozcNnFfbtyrY9BlJsH7Sf97b3313qHO1lrz92z4IhagY1eQqyTwUrtdH8VeeWNx3INdnd7/u1bSdTSLerzMOG/xds96XW/kVbB1SO8bG9IEel7kC5oTiEQfWXAvFw54P6F3eRjDCZvXGaZA="
file: $QZ_DIR/bin/QupZilla-$QZ_VER.dmg
skip_cleanup: true
on:
tags: true
condition: "$TRAVIS_OS_NAME = osx"