forked from SuperTux/supertux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
124 lines (114 loc) · 4.43 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
# Travis-CI configuration file for SuperTux
#
# Configuration manual:
# http://docs.travis-ci.com/user/build-configuration/
#
# Heavily borrowed from SuperTuxKart's travis.yml.
#
# SuperTuxKart's travis.yml file can be found here:
# https://github.com/supertuxkart/stk-code/blob/master/.travis.yml
# License: https://github.com/supertuxkart/stk-code/blob/master/COPYING
#
language: cpp
dist: trusty
sudo: required
compiler:
- gcc
- clang
matrix:
fast_finish: true
exclude:
- compiler: gcc
os: osx
include:
os:
- linux
- osx
env:
global:
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "cci9kVxJZ8DHgMCJjVIAYnXe3UWBoOZMH/kIyT4xiVXvMxFmP0qdKzaWb5RWz3r7cq2NDdvV981RNyvi+uhkpEOEp4oymBUUH7fn5vlLQjM53kH5o0I0ORM+0ECPOLDWdVQAuT12GlhL6DGekBWHF2SwQoLihR0PhH54i5Vhq7tszHY/Z/j3SQwSX5x5xkN7aJ9JW0eqYDyUVB5ZmYeQ+vdU36+I/3tc+DmiaVjrqlSNhTAdKv6W3UEPG8LQRKluHRb6fOqF/6C2OfsVHnwMDvoWhRRWzAxXVzRWblntTyPA1ZZf2lWMquDTIzbdgJQ2Bf2syBbU6C5VukPJN0YHKxtY/Q7TUvdKgv3w1xfxyYHzftD+Z8+G4pofldx5ZVuhT3xHoCSDTe7kJWITBkdJ9JvQ8+/Pekxa6Ybx+LBZDIz40pKTH1n8VTyb/yb3FiNc6+fsbhDCLnKebHKRsypErF+wEnpt2b7D7L14WLNh7azpsdXdrgBhM/4SE+7IMMYgRsKQS30RMI4Z69V/SZUkzk78lcnVqsjJ5rq6TrzTeYyej025dykjc9m5kuKq4vEE18sOIcxKXMK1G3DlKzh8blMyP7V51JWs8Wo0HO1dbfHC5PIQWj9hM+KHYMUPXC0xrQ54UqQwLxZsbVM72AdE/WkHvrcLkN/AWFaf7WuKmGA="
# BINTRAY_KEY env var
#- secure: "E++FmjzZZrvkJpUHZajLUaO1wd0QHcyVidVx8qVeGUJm/khCPBJuhkSe6R2BphcBeeAuhVlsXo26SWCAn89r2KT2OHB/lwtK2CWhO5vOl5bI5o4nFc+m55e2gDIebSBrXQPITEQJpQx1zBL4FVw/A2xQRl+IcjF/EiIzG8Znslc="
# DOWNLOAD_APIKEY env var
#- secure: "ZfRyz4HyLtCtHSrCzB+VwdRP3QLbhcXiqsUAhBYNBz6fU8B4l7UchcRrTVsSQJMJeQQ3V7baJsqi4vAcxtd2aV/UDb82aWy9+lwexecjS+fVNh6Ace8j69PVeywpVVonY2Mk/8LeEAvBkjB1OeRlE+gMC08QwOiHqkR2qVcwNYA="
- GLBINDING_VERSION=2.1.4
matrix:
- BUILD_TYPE="Debug"
- BUILD_TYPE="Release"
- USE_GLBINDING=ON
before_install:
# Possibly should not generate packages for all builds?
- export PACKAGE="ON";
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$CC" = "gcc" ] && [ "$BUILD_TYPE" = "Release" ]; then
export RELEASE="ON";
fi;
- if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$BUILD_TYPE" = "Release" ]; then
export RELEASE="ON";
fi;
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
brew update;
brew upgrade cmake;
brew install bash libogg libvorbis glew openal-soft sdl2 sdl2_image;
fi
# Try building with GLBinding
# Note: glbindings ./configure needs to be run twice in order to generate a makefile
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$USE_GLBINDING" = "ON" ]; then
wget https://github.com/cginternals/glbinding/archive/v$GLBINDING_VERSION.tar.gz -O - | tar xz;
cd glbinding-$GLBINDING_VERSION && ./configure --prefix=/usr && ./configure --prefix=/usr;
cd build && make -j3 && sudo make install;
cd ../..;
fi
- if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$USE_GLBINDING" = "ON" ]; then
brew install glbinding;
fi
# Fetch the entire git history
- git fetch --unshallow
script:
- mkdir "build-$BUILD_TYPE"
- cd "build-$BUILD_TYPE"
- cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DWARNINGS=ON -DWERROR=ON -DGLBINDING_ENABLED=$USE_GLBINDING -DBUILD_TESTS=ON -DCMAKE_INSTALL_MESSAGE=NEVER -DCMAKE_INSTALL_PREFIX=/usr -DINSTALL_SUBDIR_BIN=bin -DINSTALL_SUBDIR_SHARE=share/supertux2
- make -j3
- make install DESTDIR="/tmp/supertux-$BUILD_TYPE"
- ./test_supertux2
after_success:
- ../.travis/package.sh
#deploy:
# - provider: script
# script: ../.travis/deploy.sh
# skip_cleanup: true
# on:
# all_branches: true
# condition: $RELEASE = ON
# - provider: releases
# api_key:
# secure: oOoWGIvtMne9b413EGv3GSaV8PE/X1P3e85hIdTvRdxs5VTWHi9eeWpEknru8N8hQ+iIkvD2QpUvwL6Qgf7myP3OwXWEf7o6+Qxjfl49oJaROTeVUR7uzOYTmYYTCZG0b3jQKYu5JkVqJzwTNmT0GturHkW5pzsAy/rHUDuLfkI=
# file: "SuperTux*"
# file_glob: true
# skip_cleanup: true
# on:
# tags: true
# condition: $RELEASE = ON
addons:
apt:
packages:
- cmake
- build-essential
- libc++-dev
- libogg-dev
- libvorbis-dev
- libglew-dev
- libopenal-dev
- libboost-all-dev
- libsdl2-dev
- libsdl2-image-dev
- rpm
- sshpass
coverity_scan:
project:
name: "rajdakin/supertux"
description: "Build submitted via Travis CI"
build_command_prepend: "cmake . && make clean"
build_command: "make -j 3"
branch_pattern: coverity_scan