-
Notifications
You must be signed in to change notification settings - Fork 13
/
.travis.yml
63 lines (51 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
language: cpp
os: linux
compiler: gcc
dist: focal
addons:
apt:
# Get new gcc
packages:
- gcc-9
- g++-9
before_install:
# Add repository for Qt
- sudo apt-add-repository --yes ppa:beineri/opt-qt-5.15.2-focal
- 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 qt515base qt515svg qt515script
# Set Qt variables
- QTDIR="/opt/qt515"
- PATH="$QTDIR/bin:$PATH"
- source /opt/qt515/bin/qt515-env.sh
# Set used gcc version
- sudo ln -s /usr/bin/gcc-9 /usr/local/bin/gcc
- sudo ln -s /usr/bin/g++-9 /usr/local/bin/g++
- export CC=gcc-9
- export CXX=g++-9
before_script:
# Clone atools - atools VERSION_NUMBER_TODO
- git clone --branch=release/3.8 https://github.com/albar965/atools.git ../atools
# Get atools if auth token for dropbox is available
- '[ "$TRAVIS_SECURE_ENV_VARS" == "false" ] || ../navdatareader/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 navdatareader
- mkdir ../build-navdatareader-release
- cd ../build-navdatareader-release
- qmake ../navdatareader/navdatareader.pro CONFIG+=release QMAKE_CXXFLAGS+=-Wno-deprecated-copy QMAKE_CXXFLAGS+=-Wno-deprecated-declarations
- make -j2
after_success:
# Deploy artefacts to dropbox
- tar -cvzf ../navdatareader-release.tar.gz ../build-navdatareader-release/
- '[ -f ~/.dropbox_uploader ] && ../navdatareader/deployment/dropbox_uploader.sh delete linux/navdatareader-release.tar.gz'
- '[ -f ~/.dropbox_uploader ] && ../navdatareader/deployment/dropbox_uploader.sh mkdir linux'
- '[ -f ~/.dropbox_uploader ] && ../navdatareader/deployment/dropbox_uploader.sh upload ../navdatareader-release.tar.gz linux'