-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
75 lines (66 loc) · 1.71 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
sudo: false
language: cpp
matrix:
include:
- os: linux
dist: xenial
sudo: require
addons:
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages:
- g++-7
- git
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
- os: osx
osx_image: xcode9.2
compiler: clang
env:
- MATRIX_EVAL="COMPILER=clang++"
before_install:
- eval "${MATRIX_EVAL}"
install:
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
export QTV=qt511;
sudo apt-add-repository --yes ppa:beineri/opt-qt-5.11.1-xenial;
sudo apt update -qq;
sudo apt search ${QTV};
sudo apt install build-essential ${QTV}base
${QTV}quickcontrols ${QTV}quickcontrols2
${QTV}graphicaleffects ${QTV}svg ${QTV}scxml libgl1-mesa-dev;
export ARTIFACT="$BIN*.AppImage";
fi
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
brew update > /dev/null;
brew install qt5;
chmod -R 755 /usr/local/opt/qt5/*;
export QTDIR="/usr/local/opt/qt5";
export PATH="$QTDIR/bin:$PATH";
export ARTIFACT="$BIN*.dmg";
fi
before_install:
- eval "${MATRIX_EVAL}"
script:
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
source /opt/qt*/bin/qt*-env.sh;
mkdir build;
cd build;
cmake ../src;
make;
fi
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
mkdir build;
cd build;
cmake ../src;
make;
fi
after_success:
- export GITHUB_TOKEN=$github_token
- wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
bash ./upload.sh $ARTIFACT;
fi
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then bash ./upload.sh $ARTIFACT;
fi