forked from albar965/littlenavconnect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
65 lines (53 loc) · 2.49 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
language: cpp
os: linux
compiler: gcc
dist: xenial
addons:
apt:
# Get new gcc
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-7
- g++-7
before_install:
# Add repository for Qt
- sudo apt-add-repository --yes ppa:beineri/opt-qt-5.12.2-xenial
- sudo apt-get -qq update
# Decrypt auth token for deployment
- '[ "$TRAVIS_SECURE_ENV_VARS" == "false" ] || openssl aes-256-cbc -K $encrypted_c40414cc1989_key -iv $encrypted_c40414cc1989_iv -in deployment/.dropbox_uploader.enc -out ~/.dropbox_uploader -d'
install:
# Install needed Qt modules and libraries for qt
- sudo apt-get --yes install libgl1-mesa-dev qt512base qt512svg qt512script
# Set Qt variables
- QTDIR="/opt/qt512"
- PATH="$QTDIR/bin:$PATH"
- source /opt/qt512/bin/qt512-env.sh
# Set used gcc version
- sudo ln -s /usr/bin/gcc-7 /usr/local/bin/gcc
- sudo ln -s /usr/bin/g++-7 /usr/local/bin/g++
- export CC=gcc-7
- export CXX=g++-7
before_script:
# Clone atools VERSION_NUMBER - atools
- git clone --branch=master https://github.com/albar965/atools.git ../atools
# Get atools if auth token for dropbox is available
- '[ "$TRAVIS_SECURE_ENV_VARS" == "false" ] || ../littlenavconnect/deployment/dropbox_uploader.sh download linux/atools-release.tar.gz ../atools-release.tar.gz'
- '[ "$TRAVIS_SECURE_ENV_VARS" == "false" ] || tar -xvzf ../atools-release.tar.gz -C ../'
script:
# Build atools if auth token for dropbox is not available
- '[ "$TRAVIS_SECURE_ENV_VARS" == "true" ] || mkdir ../build-atools-release'
- '[ "$TRAVIS_SECURE_ENV_VARS" == "true" ] || cd ../build-atools-release'
- '[ "$TRAVIS_SECURE_ENV_VARS" == "true" ] || qmake ../atools/atools.pro CONFIG+=release'
- '[ "$TRAVIS_SECURE_ENV_VARS" == "true" ] || make -j2'
# Build littlenavconnect
- mkdir ../build-littlenavconnect-release
- cd ../build-littlenavconnect-release
- qmake ../littlenavconnect/littlenavconnect.pro CONFIG+=release
- make -j2
after_success:
# Deploy artefacts to dropbox
- tar -cvzf ../littlenavconnect-release.tar.gz ../build-littlenavconnect-release/
- '[ -f ~/.dropbox_uploader ] && ../littlenavconnect/deployment/dropbox_uploader.sh delete linux/littlenavconnect-release.tar.gz'
- '[ -f ~/.dropbox_uploader ] && ../littlenavconnect/deployment/dropbox_uploader.sh mkdir linux'
- '[ -f ~/.dropbox_uploader ] && ../littlenavconnect/deployment/dropbox_uploader.sh upload ../littlenavconnect-release.tar.gz linux'