12 - BUILD_ARGS="-DCMAKE_BUILD_TYPE=Release" |
12 - BUILD_ARGS="-DCMAKE_BUILD_TYPE=Release" |
13 - BUILD_ARGS="-DCMAKE_BUILD_TYPE=Debug" |
13 - BUILD_ARGS="-DCMAKE_BUILD_TYPE=Debug" |
14 - BUILD_ARGS="-DNOSERVER=1 -DBUILD_ENGINE_C=1" |
14 - BUILD_ARGS="-DNOSERVER=1 -DBUILD_ENGINE_C=1" |
15 - BUILD_ARGS="-DNOSERVER=1 -DNOVIDEOREC=1 -DNOPNG=1" |
15 - BUILD_ARGS="-DNOSERVER=1 -DNOVIDEOREC=1 -DNOPNG=1" |
16 - BUILD_ARGS="-DNOSERVER=1 -DLUA_SYSTEM=0 -DPHYSFS_SYSTEM=0" |
16 - BUILD_ARGS="-DNOSERVER=1 -DLUA_SYSTEM=0 -DPHYSFS_SYSTEM=0" |
|
17 matrix: |
|
18 include: |
|
19 - language: objective-c |
|
20 os: osx |
|
21 compiler: |
|
22 env: BUILD_ARGS="IOS" SDL_LIB_PATH="$TRAVIS_BUILD_DIR/../Library" |
|
23 osx_image: xcode7.2 |
|
24 sudo: required |
17 before_install: | |
25 before_install: | |
18 if [ "$TRAVIS_OS_NAME" == "linux" ]; then |
26 if [ "$BUILD_ARGS" == "IOS" ]; then |
|
27 hg clone http://hg.libsdl.org/SDL $SDL_LIB_PATH/SDL/ |
|
28 hg clone http://hg.libsdl.org/SDL_image $SDL_LIB_PATH/SDL_image/ |
|
29 hg clone http://hg.libsdl.org/SDL_net $SDL_LIB_PATH/SDL_net/ |
|
30 hg clone http://hg.libsdl.org/SDL_ttf $SDL_LIB_PATH/SDL_ttf/ |
|
31 hg clone http://hg.libsdl.org/SDL_mixer $SDL_LIB_PATH/SDL_mixer/ |
|
32 elif [ "$TRAVIS_OS_NAME" == "linux" ]; then |
19 sudo add-apt-repository -y ppa:zoogie/sdl2-snapshots |
33 sudo add-apt-repository -y ppa:zoogie/sdl2-snapshots |
20 sudo apt-get update -qq |
34 sudo apt-get update -qq |
21 elif [ "$TRAVIS_OS_NAME" == "osx" ]; then |
35 elif [ "$TRAVIS_OS_NAME" == "osx" ]; then |
22 brew update --all |
36 brew update --all |
23 fi |
37 fi |
24 install: | |
38 install: | |
25 if [ "$TRAVIS_OS_NAME" == "linux" ]; then |
39 if [ "$BUILD_ARGS" == "IOS" ]; then |
|
40 # FPC 3.0.0 required for using FPC 3.0.1 which contains rtl for ios |
|
41 sudo bash tools/dmg_pkg_install.sh ftp://freepascal.stack.nl/pub/fpc/dist/3.0.0/i386-macosx/fpc-3.0.0.intel-macosx.dmg |
|
42 sudo bash tools/dmg_pkg_install.sh ftp://freepascal.stack.nl/pub/fpc/dist/3.0.0/i386-macosx/fpc-3.0.1.intel-macosx.cross.ios.dmg |
|
43 elif [ "$TRAVIS_OS_NAME" == "linux" ]; then |
26 sudo apt-get install debhelper cmake dpkg-dev libqt4-dev qt4-qmake libphysfs-dev libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev libsdl2-net-dev bzip2 ghc libghc-mtl-dev libghc-parsec3-dev libghc-bytestring-show-dev libghc-vector-dev libghc-zlib-dev libghc-random-dev libghc-stm-dev libghc-network-dev libghc-dataenc-dev libghc-hslogger-dev libghc-utf8-string-dev libghc-sha-dev libghc-entropy-dev liblua5.1-0-dev imagemagick fpc fp-compiler fp-units-misc libpng-dev fp-units-gfx libavcodec-dev libavformat-dev libglew1.6-dev |
44 sudo apt-get install debhelper cmake dpkg-dev libqt4-dev qt4-qmake libphysfs-dev libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev libsdl2-net-dev bzip2 ghc libghc-mtl-dev libghc-parsec3-dev libghc-bytestring-show-dev libghc-vector-dev libghc-zlib-dev libghc-random-dev libghc-stm-dev libghc-network-dev libghc-dataenc-dev libghc-hslogger-dev libghc-utf8-string-dev libghc-sha-dev libghc-entropy-dev liblua5.1-0-dev imagemagick fpc fp-compiler fp-units-misc libpng-dev fp-units-gfx libavcodec-dev libavformat-dev libglew1.6-dev |
27 elif [ "$TRAVIS_OS_NAME" == "osx" ]; then |
45 elif [ "$TRAVIS_OS_NAME" == "osx" ]; then |
28 brew install fpc glew qt physfs lua51 sdl2 sdl2_image sdl2_net sdl2_ttf ffmpeg ghc cabal-install |
46 brew install fpc glew qt physfs lua51 sdl2 sdl2_image sdl2_net sdl2_ttf ffmpeg ghc cabal-install |
29 brew install sdl2_mixer --with-vorbis |
47 brew install sdl2_mixer --with-vorbis |
30 # use cabal install haskell deps, pas2c ones are covered by server |
48 # use cabal install haskell deps, pas2c ones are covered by server |
37 cabal install --only-dependencies tools/pas2c/pas2c.cabal |
55 cabal install --only-dependencies tools/pas2c/pas2c.cabal |
38 fi |
56 fi |
39 # avoid installing Sparkle, add default unit path |
57 # avoid installing Sparkle, add default unit path |
40 export BUILD_ARGS="$BUILD_ARGS -DNOAUTOUPDATE=1 -DCMAKE_Pascal_FLAGS=-Fu/usr/local/lib/fpc/$(fpc -iW)/units/x86_64-darwin/*/" |
58 export BUILD_ARGS="$BUILD_ARGS -DNOAUTOUPDATE=1 -DCMAKE_Pascal_FLAGS=-Fu/usr/local/lib/fpc/$(fpc -iW)/units/x86_64-darwin/*/" |
41 fi |
59 fi |
42 before_script: |
60 before_script: | |
43 - mkdir build && cd build && cmake $BUILD_ARGS .. |
61 if [ "$BUILD_ARGS" == "IOS" ]; then |
44 script: |
62 # More or less stable hw iOS version can be compiled with FPC 3.1.1, btw there are no (easy?) way to build it from sources, |
45 - make VERBOSE=1 |
63 # so we just temporary switch Xcode project to use FPC 3.0.1 |
|
64 git apply tools/fix_fpc_ios_build_patch.diff |
|
65 xctool -project ./project_files/HedgewarsMobile/Hedgewars.xcodeproj -scheme UpdateDataFolder build |
|
66 else |
|
67 mkdir build && cd build && cmake $BUILD_ARGS .. |
|
68 fi |
|
69 script: | |
|
70 if [ "$BUILD_ARGS" == "IOS" ]; then |
|
71 xctool -project ./project_files/HedgewarsMobile/Hedgewars.xcodeproj -scheme Hedgewars -configuration Release build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO |
|
72 else |
|
73 make VERBOSE=1 |
|
74 fi |
46 after_success: | |
75 after_success: | |
47 if [ "$TRAVIS_OS_NAME" == "linux" ]; then |
76 if [ "$BUILD_ARGS" == "IOS" ]; then |
|
77 : |
|
78 elif [ "$TRAVIS_OS_NAME" == "linux" ]; then |
48 make test_verbose |
79 make test_verbose |
49 elif [ "$TRAVIS_OS_NAME" == "osx" ]; then |
80 elif [ "$TRAVIS_OS_NAME" == "osx" ]; then |
50 make install |
81 make install |
51 fi |
82 fi |
52 notifications: |
83 notifications: |