-
Notifications
You must be signed in to change notification settings - Fork 15
/
.travis.yml
65 lines (59 loc) · 1.86 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
language: cpp
os:
- linux
- osx
install:
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
lsb_release -a
&& sudo apt-add-repository -y ppa:ubuntu-toolchain-r/test
&& sudo apt-add-repository -y ppa:beineri/opt-qt-5.11.3-xenial
&& sudo apt-get -qq update
&& sudo apt-get -qq install -y --force-yes g++-4.9 libc6-i386 freeglut3-dev liblz4-dev qt511tools qt511base qt511translations qt511imageformats
&& export CXX="g++-4.9"
&& export CC="gcc-4.9"
;
else
export HOMEBREW_NO_AUTO_UPDATE=1
&& export HOMEBREW_NO_INSTALL_CLEANUP=1
&& brew install freeglut qt5 lz4
&& chmod -R 755 /usr/local/opt/qt5/*
;
fi
before_script:
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
QTDIR="/opt/qt511";
else
QTDIR="/usr/local/opt/qt5";
export LIBRARY_PATH="$(brew --prefix lz4)/lib";
export CPATH="$(brew --prefix lz4)/include";
fi
- export PATH="$QTDIR/bin:$PATH"
- mkdir -p build
- cd build
- qmake -config release ..
script:
- make -j2
before_deploy:
- DEPLOY_DIR="deling-$(git describe --tags)-${TRAVIS_OS_NAME}64"
- export DEPLOY_ARCHIVE="$DEPLOY_DIR.tar.gz"
- mkdir -p "$DEPLOY_DIR"
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
DEPLOY_BINARY="deling.app"
&& cp -r "$DEPLOY_BINARY" "$DEPLOY_DIR"
&& cp ../*.qm "$DEPLOY_DIR/$DEPLOY_BINARY/Contents/MacOS"
&& "$QTDIR/bin/macdeployqt" "$DEPLOY_DIR/$DEPLOY_BINARY"
;
else
cp deling "$DEPLOY_DIR"
&& cp ../*.qm "$DEPLOY_DIR"
;
fi
- tar -czf "$DEPLOY_ARCHIVE" "$DEPLOY_DIR"
deploy:
provider: releases
api_key:
secure: BfRrMQnsLEn66poeALh/SfDkJf792r7RQ/fy+Zcagl2IFpGd3fsdpPtHtyNUJk0dWmJHdgyexSTgSrlfSmRAHt5ZP7fPfqwwvqi7M89l+jz5UsbvXOQX9iKuKa3ksrMXw0hoDyfLrSkwMLaMfCSNZ3prJhnswZl1zL1BH/nK4O8=
file: "$DEPLOY_ARCHIVE"
skip_cleanup: true
on:
tags: true