forked from pavanvo/megaglest-source
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
93 lines (86 loc) · 3.63 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
# https://docs.travis-ci.com/user/customizing-the-build/
language: cpp
sudo: required
matrix:
include:
- os: linux
compiler: gcc
addons:
apt:
packages:
- libsdl2-dev
env: Tr_Compiler_Version="7"
# https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
dist: trusty # broken compiler on 12.04
- os: linux
compiler: gcc
addons:
apt:
packages:
- libsdl2-dev
env: Tr_Compiler_Version="default"
dist: trusty
- os: linux
compiler: clang
addons:
apt:
packages:
- libsdl2-dev
env: Tr_Compiler_Version="5.0"
# http://apt.llvm.org/, compiler not newer than available on debian testing
# https://packages.debian.org/search?suite=testing&keywords=clang-
dist: trusty
- os: linux
compiler: clang
addons:
apt:
packages:
- libsdl2-dev
env: Tr_Compiler_Version="default"
dist: trusty # broken compiler on 12.04
- os: osx
#osx_image: xcode6.4 # seems broken and has lower priority in queue than default one
env: Tr_Xcode_Version="default"
#env: Tr_Xcode_Version="6.4"
# https://docs.travis-ci.com/user/osx-ci-environment/#OS-X-Version
# https://github.com/Homebrew/brew/blob/master/docs/Installation.md#requirements
fast_finish: true
allow_failures:
- os: osx
# it's not really acceptable to wait 40 minutes or sometimes up to even 3 hours
# for the result just because the queue for mac is always so long
git:
submodules: false
#branches:
# only:
# - master
before_install:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then ./.travis-before_install.sh "$CC" "$Tr_Compiler_Version"; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install sdl2 lua freetype ftgl libogg glew libvorbis cppunit glib fribidi miniupnpc wxmac; fi
# ^ not on travis also needed are: cmake + pkgconfig + xquartz (find by "search") + (maybe) git + (maybe) bash
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew outdated cmake || brew upgrade cmake; brew outdated pkgconfig || brew upgrade pkgconfig; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew link --force gettext; fi
# ^ odd linking problems related with brew which is not creating links
- if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$Tr_Xcode_Version" = "6.4" ]; then brew install Caskroom/cask/xquartz; fi
- if [ "$Tr_Compiler_Version" != "" ] && [ "$Tr_Compiler_Version" != "default" ] && [ "$CC" = "gcc" ]; then export CXX="g++-${Tr_Compiler_Version}" CC="gcc-${Tr_Compiler_Version}"; fi
- if [ "$Tr_Compiler_Version" != "" ] && [ "$Tr_Compiler_Version" != "default" ] && [ "$CC" == "clang" ]; then export CXX="clang++-${Tr_Compiler_Version}" CC="clang-${Tr_Compiler_Version}"; fi
- $CC --version
- $CXX --version
- cmake --version
script:
# ALL THE BUILD COMMANDS HERE
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$(echo "$CC" | grep 'clang')" = "" ]; then mk/linux/build-mg.sh -c 4; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$(echo "$CC" | grep 'clang')" != "" ]; then mk/linux/build-mg.sh -w -c 4; fi
# ^ -w may be removed on more modern dist: than trusty, problems related with 'new wx+clang+old gcc'
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then mk/macos/build-mg.sh -c 4; fi
# https://docs.travis-ci.com/user/notifications/#IRC-notification
notifications:
irc:
channels:
- "irc.libera.chat#megaglest"
skip_join: true
use_notice: true
on_success: change
template:
- "[%{repository_name}#%{branch}@%{commit}] %{author}: %{message} %{build_url}"