forked from Bionus/imgbrd-grabber
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
executable file
·103 lines (95 loc) · 3.31 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
language: cpp
compiler: gcc
# OS X build
matrix:
include:
- os: linux
dist: trusty
sudo: required
- os: osx
cache:
directories:
- release/sites/node_modules
# Qt packages for Linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- sqlite3
- libqt5sql5-sqlite
- qtbase5-dev
- qtdeclarative5-dev
- qtmultimedia5-dev
- qttools5-dev
- qttools5-dev-tools
- sshpass
- lcov
# Install coveralls sender
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
pip install --user cpp-coveralls
; fi
# Qt packages for OS X
install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update &&
brew install https://raw.githubusercontent.com/hudochenkov/homebrew-sshpass/master/sshpass.rb &&
brew install qt5 &&
QT_PATH=$(find /usr/local/Cellar/qt/* -maxdepth 0 -type d | head -1)
PATH=$QT_PATH/bin:$PATH &&
export PATH
; fi
before_script:
# Start X before running tests on Linux
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
export DISPLAY=:99.0 &&
sh -e /etc/init.d/xvfb start &&
sleep 3
; fi
# Set the OpenSSL path on OSX
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
export OPENSSL_ROOT_DIR=/usr/local/opt/openssl/
; fi
# Build Grabber
script:
- mkdir build && cd build
- cmake ..
- make -j8
- cd ..
- ./build/tests/tests
after_success:
# Upload code coverage (codecov)
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
lcov --directory . --capture --output-file coverage.info &&
lcov --remove coverage.info '/usr/*' --output-file coverage.info &&
lcov --list coverage.info &&
bash <(curl -s https://codecov.io/bash)
; fi
# Upload code coverage (coveralls)
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
coveralls --exclude build --exclude e2e --exclude tests --exclude CrashReporter --gcov-options '\-lp'
; fi
# Generate release name
- if [[ "$TRAVIS_TAG" == "" ]]; then
export BUILD_LABEL=$TRAVIS_BRANCH
; else
export BUILD_LABEL=$TRAVIS_TAG
; fi
# Build and upload release
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
cp "build/gui/Grabber" "release/Grabber" &&
touch "release/settings.ini" &&
rm "release/CDR.exe" &&
cd release && zip -r ../Grabber.zip . -x "sites/node_modules/*" && cd - &&
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
cp "build/gui/Grabber" "release/Grabber" &&
touch "release/settings.ini" &&
rm "release/CDR.exe" &&
cd release && zip -r ../Grabber.zip . -x "sites/node_modules/*" && cd - &&
export OUTPUT_FILE="Grabber_${BUILD_LABEL}_mac.app.zip" &&
sshpass -p "$SSH_PASS" scp -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no Grabber.zip $SSH_USER@$SSH_HOST:$OUTPUT_FILE
; fi