-
Notifications
You must be signed in to change notification settings - Fork 105
/
.travis.yml
126 lines (115 loc) · 4.36 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
125
126
sudo: required
dist: xenial
language: c
sudo: true
os:
- linux
- osx
branches:
only:
master
compiler:
- gcc
- clang
matrix:
exclude:
- os: osx
compiler: gcc
env:
- BUILD_ARGS="-DCMAKE_BUILD_TYPE=Release"
- BUILD_ARGS="-DCMAKE_BUILD_TYPE=Debug"
- BUILD_ARGS="-DNOSERVER=1 -DGL2=1 -DNOPNG=1"
- BUILD_ARGS="-DNOSERVER=1 -DLUA_SYSTEM=0"
matrix:
include:
- language: c
os: linux
compiler: clang
env: BUILD_ARGS="-DNOSERVER=1 -DBUILD_ENGINE_C=1"
- language: c
os: osx
compiler: clang
env: BUILD_ARGS="-DNOSERVER=1 -DBUILD_ENGINE_C=1"
- language: c
os: linux
compiler: clang
env: BUILD_ARGS="-DNOSERVER=1 -DBUILD_ENGINE_C=1 -DGL2=1"
- language: c
os: osx
compiler: clang
env: BUILD_ARGS="-DNOSERVER=1 -DBUILD_ENGINE_C=1 -DGL2=1"
- language: objective-c
sudo: required
os: osx
compiler: clang
env: TRAVIS_OS_NAME="ios" SDL_LIB_PATH="$TRAVIS_BUILD_DIR/../Library"
osx_image: xcode7.2
before_install: |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
sudo add-apt-repository ppa:costamagnagianfranco/hedgewars-nightly -y
sudo apt-get update -qq
elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew update
elif [ "$TRAVIS_OS_NAME" == "ios" ]; then
hg clone http://hg.libsdl.org/SDL $SDL_LIB_PATH/SDL/
hg clone http://hg.libsdl.org/SDL_image $SDL_LIB_PATH/SDL_image/
hg clone http://hg.libsdl.org/SDL_net $SDL_LIB_PATH/SDL_net/
hg clone http://hg.libsdl.org/SDL_ttf $SDL_LIB_PATH/SDL_ttf/
hg clone http://hg.libsdl.org/SDL_mixer $SDL_LIB_PATH/SDL_mixer/
fi
install: |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
sudo apt-get install -y cmake debhelper dpkg-dev fp-compiler fp-units-gfx fp-units-misc ghc libavcodec-dev libavformat-dev libghc-aeson-dev libghc-entropy-dev libghc-hslogger-dev libghc-mtl-dev libghc-network-dev libghc-parsec3-dev libghc-random-dev libghc-regex-tdfa-dev libghc-sandi-dev libghc-sha-dev libghc-text-dev libghc-utf8-string-dev libghc-vector-dev libghc-yaml-dev libghc-zlib-dev liblua5.1-dev libphysfs-dev libpng-dev libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev qtbase5-dev qtbase5-private-dev qttools5-dev qttools5-dev-tools
elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew install qt5
brew install fpc glew physfs lua51 sdl2 sdl2_image sdl2_net sdl2_ttf ffmpeg ghc cabal-install
brew install sdl2_mixer
# use cabal install haskell deps, pas2c ones are covered by server
if [[ "$BUILD_ARGS" != *"NOSERVER"* ]]; then
cabal update
cabal install --only-dependencies --cabal-file=gameServer/hedgewars-server.cabal
fi
if [[ "$BUILD_ARGS" == *"BUILD_ENGINE_C"* ]]; then
cabal update
cabal install --only-dependencies --cabal-file=tools/pas2c/pas2c.cabal
fi
# avoid installing Sparkle, add default unit path
export BUILD_ARGS="$BUILD_ARGS -DNOAUTOUPDATE=1"
elif [ "$TRAVIS_OS_NAME" == "ios" ]; then
# FPC 3.0.0 required for using FPC 3.0.1 which contains rtl for ios
sudo bash tools/dmg_pkg_install.sh ftp://freepascal.stack.nl/pub/mirrors/fpc/dist/3.0.0/i386-macosx/fpc-3.0.0.intel-macosx.dmg
sudo bash tools/dmg_pkg_install.sh ftp://freepascal.stack.nl/pub/mirrors/fpc/dist/3.0.0/i386-macosx/fpc-3.0.1.intel-macosx.cross.ios.dmg
fi
before_script: |
if [ "$TRAVIS_OS_NAME" == "ios" ]; then
# More or less stable hw iOS version can be compiled with FPC 3.1.1,
# but there are no (easy?) way to build it from sources,
# so we just temporary switch Xcode project to use FPC 3.0.1
git apply tools/fix_fpc_ios_build_patch.diff
xctool -project ./project_files/HedgewarsMobile/Hedgewars.xcodeproj -scheme UpdateDataFolder build
else
mkdir build && cd build && cmake $BUILD_ARGS ..
fi
script: |
if [ "$TRAVIS_OS_NAME" == "ios" ]; then
xctool -project ./project_files/HedgewarsMobile/Hedgewars.xcodeproj -scheme Hedgewars -configuration Release build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
else
make VERBOSE=1
fi
after_success: |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
make test_verbose
elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
make install
fi
notifications:
email: false
irc:
channels:
- "chat.freenode.net#hedgewars"
template:
- "hw-build #%{build_number} (%{commit} by %{author}): %{message}"
- "See details at %{build_url}"
on_success: change
on_failure: always
skip_join: false