-
Notifications
You must be signed in to change notification settings - Fork 26
/
.travis.yml
70 lines (57 loc) · 2.79 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
language: cpp
os: linux
compiler: gcc
dist: focal
addons:
apt:
# Get new gcc
sources:
- ubuntu-toolchain-r-test
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_22bfc178e570_key -iv $encrypted_22bfc178e570_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" ] || ../littlexpconnect/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 ../'
# Get X-Plane SDK
- wget -q -P '../' "http://developer.x-plane.com/wp-content/plugins/code-sample-generation/sample_templates/XPSDK301.zip"
- unzip ../XPSDK301.zip -d '../XPSDK'
- mv '../XPSDK/SDK' '../X-Plane SDK'
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 littlexpconnect
- mkdir ../build-littlexpconnect-release
- cd ../build-littlexpconnect-release
- qmake ../littlexpconnect/littlexpconnect.pro CONFIG+=release QMAKE_CXXFLAGS+=-Wno-deprecated-copy QMAKE_CXXFLAGS+=-Wno-deprecated-declarations
- make -j2
after_success:
# Deploy artefacts to dropbox
- tar -cvzf ../littlexpconnect-release.tar.gz ../build-littlexpconnect-release/
- '[ -f ~/.dropbox_uploader ] && ../littlexpconnect/deployment/dropbox_uploader.sh delete linux/littlexpconnect-release.tar.gz'
- '[ -f ~/.dropbox_uploader ] && ../littlexpconnect/deployment/dropbox_uploader.sh mkdir linux'
- '[ -f ~/.dropbox_uploader ] && ../littlexpconnect/deployment/dropbox_uploader.sh upload ../littlexpconnect-release.tar.gz linux'