.travis.yml
branchqmlfrontend
changeset 11828 a69124eb7ce7
parent 11804 7a8b6694a519
child 11839 4f44013e33d4
equal deleted inserted replaced
11827:8c71c5a1172f 11828:a69124eb7ce7
     1 language: c
     1 language: c
       
     2 sudo: true
     2 os:
     3 os:
     3   - linux
     4   - linux
     4   - osx
     5   - osx
       
     6 
     5 branches:
     7 branches:
     6   only:
     8   only:
     7     master
     9     master
       
    10 
     8 compiler:
    11 compiler:
     9   - gcc
    12   - gcc
    10   - clang
    13   - clang
       
    14 
    11 env:
    15 env:
    12   - BUILD_ARGS="-DCMAKE_BUILD_TYPE=Release"
    16   - BUILD_ARGS="-DCMAKE_BUILD_TYPE=Release"
    13   - BUILD_ARGS="-DCMAKE_BUILD_TYPE=Debug"
    17   - BUILD_ARGS="-DCMAKE_BUILD_TYPE=Debug"
    14   - BUILD_ARGS="-DNOSERVER=1 -DBUILD_ENGINE_C=1"
    18   - BUILD_ARGS="-DNOSERVER=1 -DGL2=1 -DNOPNG=1"
    15   - BUILD_ARGS="-DNOSERVER=1 -DNOVIDEOREC=1 -DNOPNG=1"
       
    16   - BUILD_ARGS="-DNOSERVER=1 -DLUA_SYSTEM=0 -DPHYSFS_SYSTEM=0"
    19   - BUILD_ARGS="-DNOSERVER=1 -DLUA_SYSTEM=0 -DPHYSFS_SYSTEM=0"
       
    20 
    17 matrix:
    21 matrix:
    18   include:
    22   include:
       
    23   - language: c
       
    24     os: linux
       
    25     compiler: clang
       
    26     env: BUILD_ARGS="-DNOSERVER=1 -DBUILD_ENGINE_C=1"
       
    27   - language: c
       
    28     os: osx
       
    29     compiler: clang
       
    30     env: BUILD_ARGS="-DNOSERVER=1 -DBUILD_ENGINE_C=1"
       
    31   - language: c
       
    32     os: linux
       
    33     compiler: clang
       
    34     env: BUILD_ARGS="-DNOSERVER=1 -DBUILD_ENGINE_C=1 -DGL2=1"
       
    35   - language: c
       
    36     os: osx
       
    37     compiler: clang
       
    38     env: BUILD_ARGS="-DNOSERVER=1 -DBUILD_ENGINE_C=1 -DGL2=1"
    19   - language: objective-c
    39   - language: objective-c
       
    40     sudo: required
    20     os: osx
    41     os: osx
    21     compiler:
    42     compiler: clang
    22     env: BUILD_ARGS="IOS" SDL_LIB_PATH="$TRAVIS_BUILD_DIR/../Library"
    43     env: TRAVIS_OS_NAME="ios" SDL_LIB_PATH="$TRAVIS_BUILD_DIR/../Library"
    23     osx_image: xcode7.2
    44     osx_image: xcode7.2
    24     sudo: required
    45 
    25 before_install: |
    46 before_install: |
    26   if [ "$BUILD_ARGS" == "IOS" ]; then
    47   if [ "$TRAVIS_OS_NAME" == "linux" ]; then
       
    48     sudo add-apt-repository -y ppa:zoogie/sdl2-snapshots
       
    49     sudo apt-get update -qq
       
    50   elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
       
    51     brew update --all
       
    52   elif [ "$TRAVIS_OS_NAME" == "ios" ]; then
    27     hg clone http://hg.libsdl.org/SDL $SDL_LIB_PATH/SDL/
    53     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/
    54     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/
    55     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/
    56     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/
    57     hg clone http://hg.libsdl.org/SDL_mixer $SDL_LIB_PATH/SDL_mixer/
    32   elif [ "$TRAVIS_OS_NAME" == "linux" ]; then
       
    33     sudo add-apt-repository -y ppa:zoogie/sdl2-snapshots
       
    34     sudo apt-get update -qq
       
    35   elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
       
    36     brew update --all
       
    37   fi
    58   fi
       
    59 
    38 install: |
    60 install: |
    39   if [ "$BUILD_ARGS" == "IOS" ]; then
    61   if [ "$TRAVIS_OS_NAME" == "linux" ]; 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
       
    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
    62     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
    45   elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
    63   elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
    46     brew install fpc glew qt physfs lua51 sdl2 sdl2_image sdl2_net sdl2_ttf ffmpeg ghc cabal-install
    64     brew install fpc glew qt physfs lua51 sdl2 sdl2_image sdl2_net sdl2_ttf ffmpeg ghc cabal-install
    47     brew install sdl2_mixer --with-libvorbis
    65     brew install sdl2_mixer --with-libvorbis
    48     # use cabal install haskell deps, pas2c ones are covered by server
    66     # use cabal install haskell deps, pas2c ones are covered by server
    53     if [[ "$BUILD_ARGS" == *"BUILD_ENGINE_C"* ]]; then
    71     if [[ "$BUILD_ARGS" == *"BUILD_ENGINE_C"* ]]; then
    54       cabal update
    72       cabal update
    55       cabal install --only-dependencies tools/pas2c/pas2c.cabal
    73       cabal install --only-dependencies tools/pas2c/pas2c.cabal
    56     fi
    74     fi
    57     # avoid installing Sparkle, add default unit path
    75     # avoid installing Sparkle, add default unit path
    58     export BUILD_ARGS="$BUILD_ARGS -DNOAUTOUPDATE=1 -DCMAKE_Pascal_FLAGS=-Fu/usr/local/lib/fpc/$(fpc -iW)/units/x86_64-darwin/*/"
    76     export BUILD_ARGS="$BUILD_ARGS -DNOAUTOUPDATE=1"
       
    77   elif [ "$TRAVIS_OS_NAME" == "ios" ]; then
       
    78     # FPC 3.0.0 required for using FPC 3.0.1 which contains rtl for ios
       
    79     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
       
    80     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
    59   fi
    81   fi
       
    82 
    60 before_script: |
    83 before_script: |
    61   if [ "$BUILD_ARGS" == "IOS" ]; then
    84   if [ "$TRAVIS_OS_NAME" == "ios" ]; then
    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,
    85     # More or less stable hw iOS version can be compiled with FPC 3.1.1,
       
    86     # but there are no (easy?) way to build it from sources,
    63     # so we just temporary switch Xcode project to use FPC 3.0.1
    87     # so we just temporary switch Xcode project to use FPC 3.0.1
    64     git apply tools/fix_fpc_ios_build_patch.diff
    88     git apply tools/fix_fpc_ios_build_patch.diff
    65     xctool -project ./project_files/HedgewarsMobile/Hedgewars.xcodeproj -scheme UpdateDataFolder build
    89     xctool -project ./project_files/HedgewarsMobile/Hedgewars.xcodeproj -scheme UpdateDataFolder build
    66   else
    90   else
    67     mkdir build && cd build && cmake $BUILD_ARGS ..
    91     mkdir build && cd build && cmake $BUILD_ARGS ..
    68   fi
    92   fi
       
    93 
    69 script: |
    94 script: |
    70   if [ "$BUILD_ARGS" == "IOS" ]; then
    95   if [ "$TRAVIS_OS_NAME" == "ios" ]; then
    71     xctool -project ./project_files/HedgewarsMobile/Hedgewars.xcodeproj -scheme Hedgewars -configuration Release build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
    96     xctool -project ./project_files/HedgewarsMobile/Hedgewars.xcodeproj -scheme Hedgewars -configuration Release build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
    72   else
    97   else
    73     make VERBOSE=1
    98     make VERBOSE=1
    74   fi
    99   fi
       
   100 
    75 after_success: |
   101 after_success: |
    76   if [ "$BUILD_ARGS" == "IOS" ]; then
   102   if [ "$TRAVIS_OS_NAME" == "linux" ]; then
    77     :
       
    78   elif [ "$TRAVIS_OS_NAME" == "linux" ]; then
       
    79     make test_verbose
   103     make test_verbose
    80   elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
   104   elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
    81     make install
   105     make install
    82   fi
   106   fi
       
   107 
    83 notifications:
   108 notifications:
    84   email: false
   109   email: false
    85   irc:
   110   irc:
    86     channels:
   111     channels:
    87       - "chat.freenode.net#hedgewars"
   112       - "chat.freenode.net#hedgewars"