forked from Bionus/imgbrd-grabber
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
executable file
·78 lines (71 loc) · 2.28 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
language: cpp
compiler: gcc
# Linux build
sudo: required
dist: trusty
# OS X build
matrix:
include:
- os: osx
# Qt packages for Linux
addons:
apt:
sources:
- sourceline: 'ppa:ubuntu-sdk-team/ppa'
packages:
- qt5-qmake
- qtbase5-dev
- qtdeclarative5-dev
- qtscript5-dev
- qtmultimedia5-dev
- libpulse-dev
- qt5-default
- qttools5-dev-tools
- sshpass
# Qt packages for OS X
install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update &&
brew install http://git.io/sshpass.rb &&
brew install qt5 &&
QT_PATH=$(find /usr/local/Cellar/qt5/* -maxdepth 0 -type d | head -1)
PATH=$QT_PATH/bin:$PATH &&
export PATH
; fi
# Start X before running tests on Linux
before_script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
export DISPLAY=:99.0 &&
sh -e /etc/init.d/xvfb start &&
sleep 3
; fi
# Build Grabber
script:
- qmake Grabber.pro
- make
- ./tests/build/release/tests
# Upload code coverage
after_success:
- bash <(curl -s https://codecov.io/bash)
- if [[ "$TRAVIS_TAG" == "" ]]; then
export BUILD_LABEL=$TRAVIS_BRANCH
; else
export BUILD_LABEL=$TRAVIS_TAG
; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
cp "gui/build/release/Grabber" release &&
touch "release/settings.ini" &&
rm "release/CDR.exe" &&
zip -r Grabber.zip release &&
export OUTPUT_FILE="Grabber_${BUILD_LABEL}_linux.zip" &&
sshpass -p "$SSH_PASS" scp -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no Grabber.zip $SSH_USER@$SSH_HOST:$OUTPUT_FILE
; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
touch "release/settings.ini" &&
rm "release/CDR.exe" &&
mv release/* gui/build/release/Grabber.app/Contents/MacOS/ &&
mv gui/build/release/Grabber.app release &&
cd release && zip -r ../Grabber.app.zip Grabber.app && cd - &&
export OUTPUT_FILE="Grabber_${BUILD_LABEL}_mac.app.zip" &&
sshpass -p "$SSH_PASS" scp -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no Grabber.app.zip $SSH_USER@$SSH_HOST:$OUTPUT_FILE
; fi