-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
116 lines (108 loc) · 3.14 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
language: cpp
os:
- linux
branches:
only:
- develop
- master
- testing
- feature/*
sudo:
required
install:
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
lsb_release -a
&& sudo apt-add-repository -y ppa:ubuntu-toolchain-r/test
&& sudo apt-add-repository -y ppa:beineri/opt-qt542
&& sudo apt-get -qq update
&& sudo apt-get -qq install g++-4.8 libc6-i386 qt54tools qt54svg qt54webkit qt54script
&& export CXX="g++-4.8"
&& export CC="gcc-4.8"
;
else
brew update > /dev/null
&& brew install qt5
&& chmod -R 755 /usr/local/opt/qt5/*
;
fi
script:
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
QTDIR="/opt/qt54"
&& PATH="$QTDIR/bin:$PATH"
&& qt54-env.sh
;
else
QTDIR="/usr/local/opt/qt5"
&& PATH="$QTDIR/bin:$PATH"
&& LDFLAGS=-L$QTDIR/lib
&& CPPFLAGS=-I$QTDIR/include
;
fi
- mkdir -p build/Test
- cd build/Test
- qmake ../../project/qccex.pro CONFIG+=test && make -s -j 2
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
if [ "${TRAVIS_BRANCH}" != "master" ]; then
qccex-test -platform minimal -txt
;
fi
;
else
./../bin/tests/tests.app/Contents/MacOS/tests -platform minimal -txt
;
fi
- cd ../..
- mkdir -p build/Release
- cd build/Release
- echo "#define BUILD ""$TRAVIS_BUILD_NUMBER" > build_number.h
- echo "#define RELEASE \"Travis CI\"" > release.h
- qmake ../../project/qccex.pro CONFIG+=$CONFIG
- make
before_deploy:
- export VERSION_NUMBER=`1.0.6`
# create debian package for linux and a disk image for OSX
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
cd ../travis
&& dpkg-deb -x qccex.deb build
&& mv ../src/qccex build/opt/qccex/
&& mv ../src/languages/*.qm build/opt/qccex/
&& sed -i 's/VERSION_NUMBER/'"$VERSION_NUMBER"'/g' build/DEBIAN/control
&& dpkg -b build qccex-$VERSION_NUMBER.deb
;
else
../travis/create-dmg.sh
;
fi
#
# add a tag
#
- TIME_STRING=`date +%H%M%S`
- git config --global user.email "[email protected]"
- git config --global user.name "Travis CI"
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
export GIT_TAG=linux-b$TRAVIS_BUILD_NUMBER-$TIME_STRING
;
else
export GIT_TAG=macosx-b$TRAVIS_BUILD_NUMBER-$TIME_STRING
;
fi
- git tag $GIT_TAG -a -m "Generated tag from TravisCI for build $TRAVIS_BUILD_NUMBER"
- git push -q https://[email protected]/ValeriusGC/qccex --tags
deploy:
- provider: releases
# api_key: e73e5f0077b05e58074ebf45614146e61c5dc73c
api_key:
secure: EyOMTm+fzo7rWhRMfROH8/jeJnSFmLFz4pfD/HuFJI2ohayHJOIfASMdg0d7N2cGFS9G7iuPUmQ1S56YC8BSnEefc3lASB1i5hiSOMWJV+lO3N1JBFCWxCBzHc9Hs+XKwHwyhZ5iIYncx+JHPYRNWtUD+A6SZHiZ+sVI48gYMyA=
file: qccex-$VERSION_NUMBER.deb
skip_cleanup: true
on:
repo: ValeriusGC/qccex
branch: master
tags: false
condition: $CONFIG = release && ${TRAVIS_OS_NAME} = linux
notifications:
recipients:
email:
on_success: change
on_failure: change