-
-
Notifications
You must be signed in to change notification settings - Fork 166
/
.travis.yml
124 lines (101 loc) · 6.3 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
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_98e6e310ff7a_key -iv $encrypted_98e6e310ff7a_iv -in deployment/.dropbox_uploader.enc -out ~/.dropbox_uploader -d'
install:
# Install needed Qt modules
- sudo apt-get --yes install libgl1-mesa-dev qt515base qt515svg qt515script qt515declarative
# 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
# Set environment variables for marble
- export MARBLE_BASE=/home/travis/Programs/Marble
- export MARBLE_INC_PATH=$MARBLE_BASE/include
- export MARBLE_LIB_PATH=$MARBLE_BASE/lib
# Get marble source files, which are needed for the install process
- git clone --branch=lnm/1.1 https://github.com/albar965/marble.git ../marble
# Build custom marble if auth token for dropbox is not available
- '[ "$TRAVIS_SECURE_ENV_VARS" == "true" ] || mkdir ../build-marble-release'
- '[ "$TRAVIS_SECURE_ENV_VARS" == "true" ] || cd ../build-marble-release'
- '[ "$TRAVIS_SECURE_ENV_VARS" == "true" ] || cmake -DCMAKE_BUILD_TYPE=Release -DSTATIC_BUILD=TRUE -DQTONLY=TRUE -DBUILD_MARBLE_EXAMPLES=NO -DBUILD_INHIBIT_SCREENSAVER_PLUGIN=NO -DBUILD_MARBLE_APPS=NO -DBUILD_MARBLE_EXAMPLES=NO -DBUILD_MARBLE_TESTS=NO -DBUILD_MARBLE_TOOLS=NO -DBUILD_TESTING=NO -DBUILD_WITH_DBUS=NO -DMARBLE_EMPTY_MAPTHEME=YES -DMOBILE=NO -DWITH_DESIGNER_PLUGIN=NO -DWITH_Phonon=NO -DWITH_Qt5Location=NO -DWITH_Qt5Positioning=NO -DWITH_Qt5SerialPort=NO -DWITH_ZLIB=NO -DWITH_libgps=NO -DWITH_libshp=NO -DWITH_libwlocate=NO -DCMAKE_INSTALL_PREFIX=$MARBLE_BASE -DEXEC_INSTALL_PREFIX=$MARBLE_BASE -DCMAKE_PREFIX_PATH=$QTDIR/ ../marble/'
- '[ "$TRAVIS_SECURE_ENV_VARS" == "true" ] || make -j2'
# Get marble if auth token for dropbox is available
- '[ "$TRAVIS_SECURE_ENV_VARS" == "false" ] || ../littlenavmap/deployment/dropbox_uploader.sh download linux/marble-release.tar.gz ../marble-release.tar.gz'
- '[ "$TRAVIS_SECURE_ENV_VARS" == "false" ] || tar -xvzf ../marble-release.tar.gz -C ../'
# Install marble
- cd ../build-marble-release
- sudo make install/fast
# Install patchelf (needed for 'make deploy')
- cd ../
- wget -q http://nixos.org/releases/patchelf/patchelf-0.10/patchelf-0.10.tar.bz2
- tar xf patchelf-0.10.tar.bz2
- cd patchelf-0.10/
- ./configure --prefix="$HOME/.local"
- sudo make install
before_script:
# Clone atools - atools VERSION_NUMBER_TODO
- git clone --branch=release/3.8 https://github.com/albar965/atools.git ../atools
# Clone littenavconnect (for deployment) - littenavconnect VERSION_NUMBER_TODO
- git clone --branch=release/2.8 https://github.com/albar965/littlenavconnect.git ../littlenavconnect
# Clone littexpconnect (for deployment) - littexpconnect VERSION_NUMBER_TODO
- git clone --branch=release/1.0 https://github.com/albar965/littlexpconnect.git ../littlexpconnect
# Get X-Plane SDK (for deployment)
- 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'
# Get atools if auth token for dropbox is available
#- '[ "$TRAVIS_SECURE_ENV_VARS" == "false" ] || ../littlenavmap/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 littlenavconnect and littlexpconnect for deployment
- '[ "$TRAVIS_SECURE_ENV_VARS" == "false" ] || ../littlenavmap/deployment/dropbox_uploader.sh download linux/littlenavconnect-release.tar.gz ../littlenavconnect-release.tar.gz'
- '[ "$TRAVIS_SECURE_ENV_VARS" == "false" ] || tar -xvzf ../littlenavconnect-release.tar.gz -C ../'
- '[ "$TRAVIS_SECURE_ENV_VARS" == "false" ] || ../littlenavmap/deployment/dropbox_uploader.sh download linux/littlexpconnect-release.tar.gz ../littlexpconnect-release.tar.gz'
- '[ "$TRAVIS_SECURE_ENV_VARS" == "false" ] || tar -xvzf ../littlexpconnect-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 QMAKE_CXXFLAGS+=-Wno-deprecated-copy QMAKE_CXXFLAGS+=-Wno-deprecated-declarations'
# - '[ "$TRAVIS_SECURE_ENV_VARS" == "true" ] || make -j2'
# Build atools
- mkdir ../build-atools-release
- cd ../build-atools-release
- qmake ../atools/atools.pro CONFIG+=release QMAKE_CXXFLAGS+=-Wno-deprecated-copy QMAKE_CXXFLAGS+=-Wno-deprecated-declarations
- make -j2
# Build littlenavmap
- mkdir ../build-littlenavmap-release
- cd ../build-littlenavmap-release
- qmake ../littlenavmap/littlenavmap.pro CONFIG+=release QMAKE_CXXFLAGS+=-Wno-deprecated-copy QMAKE_CXXFLAGS+=-Wno-deprecated-declarations
- make -j2
after_success:
# Call 'make deploy' for all necessary projects
- '[ -f ~/.dropbox_uploader ] && mkdir ../deploy'
- '[ -f ~/.dropbox_uploader ] && make deploy'
- '[ -f ~/.dropbox_uploader ] && cd ../build-littlenavconnect-release'
- '[ -f ~/.dropbox_uploader ] && make deploy'
- '[ -f ~/.dropbox_uploader ] && cd ../build-littlexpconnect-release'
- '[ -f ~/.dropbox_uploader ] && make deploy'
# Deploy artefacts to dropbox
- '[ -f ~/.dropbox_uploader ] && tar -cvzf ../littlenavmap-release-${TRAVIS_COMMIT}.tar.gz ../deploy/'
- '[ -f ~/.dropbox_uploader ] && ../littlenavmap/deployment/dropbox_uploader.sh mkdir linux'
- '[ -f ~/.dropbox_uploader ] && ../littlenavmap/deployment/dropbox_uploader.sh upload ../littlenavmap-release-${TRAVIS_COMMIT}.tar.gz linux'