-
Notifications
You must be signed in to change notification settings - Fork 32
/
.travis.yml
68 lines (56 loc) · 2.48 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
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_62f75b59cfc8_key -iv $encrypted_62f75b59cfc8_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 atoolstest - atoolstest VERSION_NUMBER_TODO
- git clone --branch=release/3.8 https://github.com/albar965/atoolstest.git ../atoolstest
# Download and extract needed files for the tests
- mkdir '../Global Land One-kilometer Base Elevation (GLOBE)'
- wget -q -P '../Global Land One-kilometer Base Elevation (GLOBE)/' "https://www.ngdc.noaa.gov/mgg/topo/DATATILES/elev/all10g.tgz"
- tar -xvzf '../Global Land One-kilometer Base Elevation (GLOBE)/all10g.tgz' -C '../Global Land One-kilometer Base Elevation (GLOBE)/'
script:
# 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 atoolstest
- mkdir ../build-atoolstest-release
- cd ../build-atoolstest-release
- qmake ../atoolstest/atoolstest.pro CONFIG+=release QMAKE_CXXFLAGS+=-Wno-deprecated-copy QMAKE_CXXFLAGS+=-Wno-deprecated-declarations
- make -j2
# Run tests
- './atoolstest --RunAll'
after_success:
# Deploy artefacts to dropbox
- tar -cvzf ../atools-release.tar.gz ../build-atools-release/
- '[ -f ~/.dropbox_uploader ] && ../atools/deployment/dropbox_uploader.sh delete linux/atools-release.tar.gz'
- '[ -f ~/.dropbox_uploader ] && ../atools/deployment/dropbox_uploader.sh mkdir linux'
- '[ -f ~/.dropbox_uploader ] && ../atools/deployment/dropbox_uploader.sh upload ../atools-release.tar.gz linux'