forked from OpenBoardView/OpenBoardView
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
84 lines (84 loc) · 2.75 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
git:
depth: 9999999
os:
- linux
compiler:
- clang
matrix:
include:
- os: linux
compiler: gcc
env: DEPLOY=yes DEPLOY_DEB=yes
- os: linux
compiler: gcc
env: DEPLOY=yes DEPLOY_RPM=yes
- os: osx
compiler: clang
env: DEPLOY=yes
- os: linux
compiler: gcc
env: CROSS=mingw64 DEPLOY=yes
dist: trusty
sudo: required
language: cpp
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-6
- g++-6
install: |-
if [ "$TRAVIS_OS_NAME" == "linux" ]
then
if [ "$CROSS" == "mingw64" ] # Cross compiling for Windows
then
sudo add-apt-repository "deb http://fr.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse" # We need an up-to-date MinGW
sudo apt-get update
sudo apt-get install -t xenial gcc-mingw-w64-i686 g++-mingw-w64-i686 mingw32-runtime
wget https://www.libsdl.org/release/SDL2-devel-2.0.4-mingw.tar.gz # Manually install the SDL2 mingw dev files
tar -xf SDL2-devel-2.0.4-mingw.tar.gz
pushd SDL2-2.0.4
sudo make cross CROSS_PATH=/usr
popd
else
sudo apt-get -qy install libsdl2-dev libgtk-3-dev rpm libegl1-mesa-dev libgles2-mesa-dev # Manual installation of the last 2 shouldn't be required, but it is now…
fi
elif [ "$TRAVIS_OS_NAME" == "osx" ]
then
brew update
brew install sdl2
fi
script: |-
if [ "$CXX" = "g++" ]; then export CXX="g++-6" CC="gcc-6"; fi
./build.sh || exit 1
if [ "$DEPLOY_DEB" == "yes" ] || [ "$DEPLOY_RPM" == "yes" ]
then
pushd release_build
make package
popd
fi
before_deploy: |-
if [ "$TRAVIS_OS_NAME" == "osx" ]
then
export DEPLOY_FILES=$(ls OpenBoardView-*.dmg)
elif [ "$CROSS" == "mingw64" ]
then
export DEPLOY_FILES=bin/openboardview.exe
elif [ "$DEPLOY_DEB" == "yes" ]
then
export DEPLOY_FILES=$(ls OpenBoardView-*.deb)
elif [ "$DEPLOY_RPM" == "yes" ]
then
export DEPLOY_FILES=$(ls OpenBoardView-*.rpm)
fi
deploy:
provider: releases
api_key:
secure: zd3KAuKbBjxqWd9l5hxTmyWtJaeEc6QZkJa6QQsBDV+QilAN4KNXIKp/mM5YrvxnLswW7KetQDMQp3HVZBymgDhhLelx37DDjGmY2lq7/3/3SkyhG/S0JH6oFv/6KnuDwG3MsC5Ti4QNMuwUvcNRcHIZJRCy5kIH1NBkDLLhrkXvY6S0YWqTuiiVZjQTXhYJ+Gv586fSNkKjfYvkwrei5M3Rw4zGoiILgSt/g1JvyLGUZfWTFTEQPO8qxnmap/YZGwnucbb3cW9pt7vU9Z+VHs11Y7Hi4Oti6Cfkl7hX3pFowWR5h6YP35/OVggftXaVWXBrdLBV+rJ89MSlGDq87ca4QIdoilKfGLOtIvc9B0NMrG2iFU+TLew5qZbftFg44tXEUztAXMV3sgE+K5rdQwNz0VvFf6DZFSPSnvDGGJfj5pl8t1QNaxP4D8dbjOF1v+sSLVrfcgoZKM0+CBf34YBLxTyBlQTgt3DSh2ntJcRKNdbjmVIri9Goxxdbc3bhMXOqzjbZxB+sZGz9n9J0c6At+0QQ9Mdd7c653x4hDJef2cUykpfCKJQ9yMZpNLvZbUU0jI0xsqxrujCjaThVt1fVqMJK5GkwqMrXzIe2Rz8uuE6uvQgaBc//C4eZXaFmV9gj26hzJafajIBUc28gNQBTBdXEZYOpIy0+T8cme7U=
file_glob: true
file: "${DEPLOY_FILES}"
skip_cleanup: true
on:
tags: true
condition: "$DEPLOY == yes"