-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
153 lines (153 loc) · 5.41 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
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
language: cpp
jobs:
include:
- stage: main test
os: linux
dist: xenial
compiler: clang
env:
- DEPLOY=false
- CCACHE_CPP2=yes
- RUN_TESTS=true
cache:
ccache: true
directories:
- "$HOME/.sonar/cache"
- os: linux
dist: bionic
compiler: clang
env:
- DEPLOY=false
- CCACHE_CPP2=yes
- RUN_TESTS=true
cache:
ccache: true
directories:
- "$HOME/.sonar/cache"
- os: osx
compiler: clang
env:
- DEPLOY=true
- LEGACY=false
osx_image: xcode11
- os: osx
compiler: clang
env:
- DEPLOY=true
- LEGACY=true
osx_image: xcode8
- stage: sonarcloud
os: linux
dist: bionic
compiler: clang
env:
- DEPLOY=false
- CCACHE_CPP2=yes
- RUN_TESTS=false
cache:
ccache: true
directories:
- "$HOME/.sonar/cache"
addons:
sonarcloud:
organization: "dismine"
token:
secure: L8uC9uH9d+coVwndZ+UzDpMFS+fxk8dCSEcoAIXC22xg4PhHACbZJqrSANRNy8UC7LZHdFlGDozeHLqw6FPanKIoNy6yX7ngGjuR2azLOdqNhBvlhH6Knc0ua7zSpQuHDkkv3vwdJHS4MNXvAwTr+ErLXmEBvuekiM2HEHGRA8MtdEo9naq+m65/ZTkn3iiA654HT2gh3afYDONyTbEa6WkGmoI1Z597PoIJ/0HaKf9TqO/FahXhLYmLL9UW7rPCwj8rUyLiJ39lRrmo2JAPdRT/QoxAA5l97OI+IMjv5ut5p1KZUozuAedxj8kx43QAw+YuRqBZAuZOy5meFSHV62WG5CbqCuZPE79+JyLTYSKxuuzK6v8F6jnQRXC79EdYEIRbXtC86ZftFDgHTt1LP4JaBoPV9ee3DiY7PHO65oSjey7831Ou18UcjmV0BqtQfVVAWsRKYTqjFCBKa9hNDbzIKHLbmj5/K5TitBMTBpjSYnLYJdkDWY3DPGpWDFyT2oo2bRrSl9/UsuT27hi5psMTQSlrYqIGezVz0KDf3TjWPS5RhHjMr+Lt4Ykh5YxKw9zmvH9gvPwOQbfTtPNZHGOMt1Q8aZhovruYDlBleBFuDaHnKV8U9lJr2BOb44nvx+BBURo/Xq1cNew9UNitjTvtEmPeocOLMb2lFMkXAbs=
before_install:
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo apt-get -qq update;
sudo apt-get install -y qtbase5-dev;
sudo apt-get install -y libqt5svg5-dev;
sudo apt-get install -y qt5-default;
sudo apt-get install -y qttools5-dev-tools;
sudo apt-get install -y libqt5xmlpatterns5-dev;
sudo apt-get install -y libqt5core5a;
sudo apt-get install -y libqt5gui5;
sudo apt-get install -y libqt5printsupport5;
sudo apt-get install -y libqt5svg5;
sudo apt-get install -y libqt5widgets5;
sudo apt-get install -y libqt5xml5;
sudo apt-get install -y libqt5xmlpatterns5;
sudo apt-get install -y xpdf;
sudo apt-get install -y xvfb;
wget https://launchpad.net/ubuntu/+archive/primary/+files/ccache_3.3.4-1_amd64.deb;
sudo dpkg -i ccache_3.3.4-1_amd64.deb;
else
brew update > /dev/null;
if [[ "$LEGACY" = false ]]; then
brew install qt5;
else
unset SSL_CERT_FILE;
brew install https://gist.githubusercontent.com/dismine/c3ac01de38e12edcf22d9e05791adf82/raw/20544ac8e68ef3523f92e15f432bbaf9a6aa2c22/qt5.rb;
fi
chmod -R 755 /usr/local/opt/qt5/*
fi
before_script:
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
uname -a;
which qmake;
else
QTDIR="/usr/local/opt/qt5";
PATH="$QTDIR/bin:$PATH";
LDFLAGS=-L$QTDIR/lib;
CPPFLAGS=-I$QTDIR/include;
PKG_CONFIG_PATH=/usr/local/opt/qt5/lib/pkgconfig;
fi
- mkdir build
- cd build
- pwd
- qmake --version
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
if [[ "$RUN_TESTS" == "true" ]]; then
qmake ../Valentina.pro -r -spec linux-clang CONFIG+=noDebugSymbols CONFIG+=checkWarnings;
else
qmake ../Valentina.pro -r -spec linux-clang CONFIG+=noDebugSymbols CONFIG+=checkWarnings CONFIG+=noTests;
fi
else
qmake ../Valentina.pro -r CONFIG+=noDebugSymbols CONFIG+=no_ccache CONFIG+=checkWarnings CONFIG+=noTests;
fi
script:
- "$CXX --version"
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
if [[ "$RUN_TESTS" == "true" ]]; then
make -j$(nproc);
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$TRAVIS_BUILD_DIR/build/src/libs/vpropertyexplorer/bin:$TRAVIS_BUILD_DIR/build/src/libs/qmuparser/bin";
xvfb-run -a make --silent check TESTARGS="-silent";
else
build-wrapper-linux-x86-64 --out-dir ../bw-outputs make -j$(nproc);
cd ..;
sonar-scanner;
fi
else
make -j1;
fi
notifications:
email:
recipients:
on_success: change
on_failure: always
before_deploy:
- |
if [[ "$DEPLOY" == "true" ]]; then
../scripts/macfixqtdylibrpath.py $TRAVIS_BUILD_DIR/build/src/app/valentina/bin/Valentina.app;
if [[ "$LEGACY" = false ]]; then
tar -C $TRAVIS_BUILD_DIR/build/src/app/valentina/bin --exclude "*.DS_Store" -cvzf valentina-osx-${TRAVIS_COMMIT}.tar.gz Valentina.app/;
else
tar -C $TRAVIS_BUILD_DIR/build/src/app/valentina/bin --exclude "*.DS_Store" -cvzf valentina-osx-${TRAVIS_COMMIT}-legacy.tar.gz Valentina.app/;
fi
fi
deploy:
provider: bintray
skip_cleanup: true
file: "../share/bintray.json"
user: dismine
key:
secure: q9rcswyUyOqHAnxL0FLEQ8tdFkE21kNlv/TUpZgk0MbcsWRhBWaKJVv5kz6ABkjeLMB7c7eS7KfYRui0RFBKHI7ZnpzHBZN4f1aGd/rf9m5qaZdKFFBlpz4tXPHvXOVyXRwOReqFj7brAz6NB+oqJN8HFA4Q1y039yZOaHt28JkwYSDqS5lRvbwegYS8kaJupGZcm8NaNeB8tuXuZ/8DIQpZdVKmBUwpgpPAewCEqYP4z9DUpsmMZ5h63g7mJKm9di91cQr65eS24io6m1ZfAx8M6kTaKwyR5nz8a8bnqR48AAnbNoM8Xj1sgJqnT40DZKPCNr7KL3JSNRglKNgHVMFBOj0v9F5YxsDs8twWuqFVbywB+lNSHDyvGVgmS2+EdwKLQT0YBxYfIL1nh34ed7GffZZmBcAJGfxo8ieAMRgyylSyQIHJ0ZBl6X6DzOvLpvFlcva9yhqZfkx3P/Dgarqklnj3DdvzTDW2vxCT4yVLpMySlBXW2I3s7m8xpOjZbM7eZfMZkwjd/e8IYp8jxdQnxlzNe15mzxSXnZjLz3Rwi1qzhJZyZf4OGVxuQuR9oW+c5q55OOY5hImtZELlJyu1K0zKTd85g0D+WwKj4J30J0QWl1pxZlln59Q5cMmpyQ7sc8zN1WPoWAEyavwPrf4028TpEJqaUw/0cQGg9I4=
on:
all_branches: true
condition: "$DEPLOY = true"