-
-
Notifications
You must be signed in to change notification settings - Fork 414
/
.travis.disabled.yml
217 lines (209 loc) · 7.38 KB
/
.travis.disabled.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
language: cpp
dist: trusty
osx_image: xcode10.2
cache: ccache
os:
- linux
- osx
branches:
only:
- main
- release
- testing
- /^feature.+$/
env:
global:
# $TAGPERM environment variable
# generate a token at https://github.com/settings/tokens and encrypt it
# with `travis encrypt TAGPERM=<yoursecrettoken> --add env.global`
# also see: https://docs.travis-ci.com/user/encryption-keys/#Usage
# and: https://docs.travis-ci.com/user/best-practices-security/
- secure: AERYyBcRb6amrkLUzmbUWMOv80evhJDQd9tFNyRIUztooDCLv1/ncllhoXYglBVQUqqk7seKHFS5LZ3mvi62NnEtLkc7140HRWXYKmVb65r1zyoleA6sBZYKwunQzT3sPL/HbUphrDVIsvn/xzBWNlMS6DHSefg0LnEW8J6ArKE=
# KEY_PASSWORD
- secure: "Mte2zY0rgIa4M4bIeSKijFAFOtFy+DahRYCUgOB60cuS4b/+HMHnfmVGMqnBKitC9KVzb5fctMt2pGPK2hdlirvfkOd9ctEaEd1qSzADJjfQUKqLReOfi1N6Ln2dYqlZoDjnYpGWwTUl/uX+KtWomYW2TCZZG/uJEeh3QYkxlJQ="
# DEVELOPER_NAME
- secure: "CrB159u8KEwtsiCxnwvnCumiRkGgL+9aFgI2dosUvj3PtfebcVdhzRKBt+17jLapLCQEYoml8RVszLNuYpZu8y/3DhCk4ftWMumnvKOp8CIFb/4BFKMZxyuw+HlMg5oKwY4GOopnHo4mTEM51pDHMP8rfIxCjLimVeDc0uZaaj8="
# CCACHE
- USE_CCACHE=1
- CCACHE_COMPRESS=1
- CCACHE_MAXSIZE=1G
- CCACHE_CPP2=1
matrix:
- CONFIG=release
#- CONFIG=debug
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-qt562-trusty
sudo apt-get -qq update
sudo apt-get -qq install g++-4.8 libc6-i386 qt56tools qt56svg qt56script qt56websockets qt56x11extras
export CXX="g++-4.8"
export CC="gcc-4.8"
fi
# OS X Qt http://braumeister.org/search/qt5
# we need to use macdeployqtfix after using macdeployqt to fix the library paths!
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]
then
brew update > /dev/null
brew install qt5 ccache
export PATH="/usr/local/opt/ccache/bin:$PATH"
export QTDIR="/usr/local/opt/qt5"
fi
script:
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]
then
QTDIR="/opt/qt56"
PATH="$QTDIR/bin:$PATH"
qt56-env.sh
fi
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]
then
PATH="$QTDIR/bin:$PATH"
LDFLAGS=-L$QTDIR/lib
CPPFLAGS=-I$QTDIR/include
fi
- cd ./tests
- qmake DEFINES+=INTEGRATION_TESTS CONFIG+=ccache && make -s -j 2
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
if [ "${TRAVIS_BRANCH}" != "release" ]; then
./../bin/tests/tests -platform minimal -txt
&& ../travis/linux/coveralls.sh
;
fi
;
else
./../bin/tests/tests.app/Contents/MacOS/tests -platform minimal -txt
;
fi
- cd ./../src
- echo "#define BUILD ""$TRAVIS_BUILD_NUMBER" > build_number.h
- echo "#define RELEASE \"Travis CI\"" > release.h
- qmake QOwnNotes.pro CONFIG+=$CONFIG CONFIG+=ccache
- lrelease QOwnNotes.pro
- make
before_deploy:
- export VERSION_NUMBER=`cat version.h | sed "s/[^0-9,.]//g"`
# create debian package for linux and a disk image for OSX
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]
then
cd ../travis
dpkg-deb -x QOwnNotes.deb build
install ../src/QOwnNotes build/opt/QOwnNotes
mkdir -p build/usr/bin
ln -s /opt/QOwnNotes/QOwnNotes build/usr/bin
mv ../src/languages/*.qm build/opt/QOwnNotes/
mv ../icons/* build/opt/QOwnNotes/
sed -i 's/VERSION_NUMBER/'"$VERSION_NUMBER"'/g' build/DEBIAN/control
dpkg -b build QOwnNotes-$VERSION_NUMBER.deb
cp QOwnNotes-$VERSION_NUMBER.deb QOwnNotesDev-$TRAVIS_COMMIT.deb
fi
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]
then
../travis/create-dmg.sh
cp QOwnNotes-$VERSION_NUMBER.dmg QOwnNotesDev-$TRAVIS_COMMIT.dmg
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
if [ "${TRAVIS_BRANCH}" == "release" ]; then
export GIT_TAG=linux-b$TRAVIS_BUILD_NUMBER-$TIME_STRING
;
else
export GIT_TAG=dev-linux-b$TRAVIS_BUILD_NUMBER-$TIME_STRING
;
fi
;
else
if [ "${TRAVIS_BRANCH}" == "release" ]; then
export GIT_TAG=macosx-b$TRAVIS_BUILD_NUMBER-$TIME_STRING
;
else
export GIT_TAG=dev-macosx-b$TRAVIS_BUILD_NUMBER-$TIME_STRING
;
fi
;
fi
- git tag $GIT_TAG -a -m "Generated tag from TravisCI for build $TRAVIS_BUILD_NUMBER"
- git push -q https://[email protected]/pbek/QOwnNotes --tags >/dev/null 2>&1
deploy:
# Linux release release
- provider: releases
api_key:
secure: DaUepv9X3aPy91r8FBCyA0yUEQ0CNYQyA5EzlXsvLWsTi7XjscWZXCkv2BoFxk+MXvsCweaS6/qRbIn8/cW1TFLo6ZAbHjucnmjtSZn9wr9j3SEV7fM6jpAc6XBMMHtgjCaKZMpvH1R2Ed6O3DNr7L0//zB/PDhQx+rDeDre1kA=
file: QOwnNotes-$VERSION_NUMBER.deb
skip_cleanup: true
on:
repo: pbek/QOwnNotes
branch: release
tags: false
condition: $CONFIG = release && ${TRAVIS_OS_NAME} = linux
# macOS release release
- provider: releases
api_key:
secure: DaUepv9X3aPy91r8FBCyA0yUEQ0CNYQyA5EzlXsvLWsTi7XjscWZXCkv2BoFxk+MXvsCweaS6/qRbIn8/cW1TFLo6ZAbHjucnmjtSZn9wr9j3SEV7fM6jpAc6XBMMHtgjCaKZMpvH1R2Ed6O3DNr7L0//zB/PDhQx+rDeDre1kA=
file: QOwnNotes-$VERSION_NUMBER.dmg
skip_cleanup: true
on:
repo: pbek/QOwnNotes
branch: release
tags: false
condition: $CONFIG = release && ${TRAVIS_OS_NAME} = osx
# Linux development release
# - provider: releases
# api_key:
# secure: DaUepv9X3aPy91r8FBCyA0yUEQ0CNYQyA5EzlXsvLWsTi7XjscWZXCkv2BoFxk+MXvsCweaS6/qRbIn8/cW1TFLo6ZAbHjucnmjtSZn9wr9j3SEV7fM6jpAc6XBMMHtgjCaKZMpvH1R2Ed6O3DNr7L0//zB/PDhQx+rDeDre1kA=
# file: QOwnNotesDev-$TRAVIS_COMMIT.deb
# skip_cleanup: true
# on:
# repo: pbek/QOwnNotes
# branch: main
# tags: false
# condition: ${TRAVIS_OS_NAME} = linux
# macOS development release
# - provider: releases
# prerelease: true
# api_key:
# secure: DaUepv9X3aPy91r8FBCyA0yUEQ0CNYQyA5EzlXsvLWsTi7XjscWZXCkv2BoFxk+MXvsCweaS6/qRbIn8/cW1TFLo6ZAbHjucnmjtSZn9wr9j3SEV7fM6jpAc6XBMMHtgjCaKZMpvH1R2Ed6O3DNr7L0//zB/PDhQx+rDeDre1kA=
# file: QOwnNotesDev-$TRAVIS_COMMIT.dmg
# skip_cleanup: true
# on:
# repo: pbek/QOwnNotes
# branch: main
# tags: false
# condition: ${TRAVIS_OS_NAME} = osx
notifications:
email:
recipients:
on_success: change
on_failure: change
# irc:
# # https://docs.travis-ci.com/user/notifications/#IRC-notification
# channels:
# - "chat.freenode.net#qownnotes"
# template:
# - "[%{commit}] %{repository} (%{branch}): %{message} | Commit message: %{commit_message} | Changes: %{compare_url} | Build details: %{build_url}"
# on_success: never
# on_failure: change
# use_notice: true
# skip_join: true
webhooks:
urls:
- https://webhooks.gitter.im/e/7c80d5baa6681f02dca5
#- https://fathomless-fjord-24024.herokuapp.com/notify
#- "https://scalar.vector.im/api/neb/services/hooks/dHJhdmlzLWNpLyU0MHBiZWslM0FtYXRyaXgub3JnLyUyMXJVenJSdnJuck9zTGFzRGRicCUzQW1hdHJpeC5vcmc"
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always