.travis.yml
author sheepluva
Fri, 29 Apr 2016 23:42:37 +0200
changeset 11777 77afc967f38e
parent 11749 5d66eace5b81
child 11801 ae58d7ad0d97
permissions -rw-r--r--
fix memory corruptions caused by outofbounds-writes in uTouch
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9915
67c9bd84f941 Added simple travis file
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents:
diff changeset
     1
language: c
11748
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
     2
sudo: false
11410
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
     3
os:
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
     4
  - linux
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
     5
  - osx
11748
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
     6
9915
67c9bd84f941 Added simple travis file
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents:
diff changeset
     7
branches:
11410
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
     8
  only:
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
     9
    master
11748
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    10
9915
67c9bd84f941 Added simple travis file
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents:
diff changeset
    11
compiler:
67c9bd84f941 Added simple travis file
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents:
diff changeset
    12
  - gcc
67c9bd84f941 Added simple travis file
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents:
diff changeset
    13
  - clang
11748
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    14
9915
67c9bd84f941 Added simple travis file
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents:
diff changeset
    15
env:
9935
491f661a4e57 add more travis tests
koda
parents: 9915
diff changeset
    16
  - BUILD_ARGS="-DCMAKE_BUILD_TYPE=Release"
9915
67c9bd84f941 Added simple travis file
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents:
diff changeset
    17
  - BUILD_ARGS="-DCMAKE_BUILD_TYPE=Debug"
11343
0bff27d8d18f travis: Trim down the number of tests
Vittorio Giovara <vittorio.giovara@gmail.com>
parents: 10664
diff changeset
    18
  - BUILD_ARGS="-DNOSERVER=1 -DNOVIDEOREC=1 -DNOPNG=1"
0bff27d8d18f travis: Trim down the number of tests
Vittorio Giovara <vittorio.giovara@gmail.com>
parents: 10664
diff changeset
    19
  - BUILD_ARGS="-DNOSERVER=1 -DLUA_SYSTEM=0 -DPHYSFS_SYSTEM=0"
11748
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    20
11587
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11504
diff changeset
    21
matrix:
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11504
diff changeset
    22
  include:
11749
5d66eace5b81 Only build engine to c with clang on travis
koda
parents: 11748
diff changeset
    23
  - language: c
5d66eace5b81 Only build engine to c with clang on travis
koda
parents: 11748
diff changeset
    24
    os: linux
5d66eace5b81 Only build engine to c with clang on travis
koda
parents: 11748
diff changeset
    25
    compiler: clang
5d66eace5b81 Only build engine to c with clang on travis
koda
parents: 11748
diff changeset
    26
    env: BUILD_ARGS="-DNOSERVER=1 -DBUILD_ENGINE_C=1"
5d66eace5b81 Only build engine to c with clang on travis
koda
parents: 11748
diff changeset
    27
  - language: c
5d66eace5b81 Only build engine to c with clang on travis
koda
parents: 11748
diff changeset
    28
    os: osx
5d66eace5b81 Only build engine to c with clang on travis
koda
parents: 11748
diff changeset
    29
    compiler: clang
5d66eace5b81 Only build engine to c with clang on travis
koda
parents: 11748
diff changeset
    30
    env: BUILD_ARGS="-DNOSERVER=1 -DBUILD_ENGINE_C=1"
11587
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11504
diff changeset
    31
  - language: objective-c
11748
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    32
    sudo: required
11587
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11504
diff changeset
    33
    os: osx
11748
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    34
    compiler: clang
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    35
    env: TRAVIS_OS_NAME="ios" SDL_LIB_PATH="$TRAVIS_BUILD_DIR/../Library"
11587
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11504
diff changeset
    36
    osx_image: xcode7.2
11748
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    37
11410
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
    38
before_install: |
11748
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    39
  if [ "$TRAVIS_OS_NAME" == "linux" ]; then
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    40
    sudo add-apt-repository -y ppa:zoogie/sdl2-snapshots
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    41
    sudo apt-get update -qq
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    42
  elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    43
    brew update --all
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    44
  elif [ "$TRAVIS_OS_NAME" == "ios" ]; then
11587
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11504
diff changeset
    45
    hg clone http://hg.libsdl.org/SDL $SDL_LIB_PATH/SDL/
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11504
diff changeset
    46
    hg clone http://hg.libsdl.org/SDL_image $SDL_LIB_PATH/SDL_image/
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11504
diff changeset
    47
    hg clone http://hg.libsdl.org/SDL_net $SDL_LIB_PATH/SDL_net/
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11504
diff changeset
    48
    hg clone http://hg.libsdl.org/SDL_ttf $SDL_LIB_PATH/SDL_ttf/
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11504
diff changeset
    49
    hg clone http://hg.libsdl.org/SDL_mixer $SDL_LIB_PATH/SDL_mixer/
11410
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
    50
  fi
11748
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    51
11410
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
    52
install: |
11748
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    53
  if [ "$TRAVIS_OS_NAME" == "linux" ]; then
11410
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
    54
    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
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
    55
  elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
11662
97a4188fc99e travis: Use correct vorbis flag in sdl2_mixer install
koda
parents: 11653
diff changeset
    56
    brew install fpc glew qt physfs lua51 sdl2 sdl2_image sdl2_net sdl2_ttf ffmpeg ghc cabal-install
97a4188fc99e travis: Use correct vorbis flag in sdl2_mixer install
koda
parents: 11653
diff changeset
    57
    brew install sdl2_mixer --with-libvorbis
11410
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
    58
    # use cabal install haskell deps, pas2c ones are covered by server
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
    59
    if [[ "$BUILD_ARGS" != *"NOSERVER"* ]]; then
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
    60
      cabal update
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
    61
      cabal install --only-dependencies gameServer/hedgewars-server.cabal
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
    62
    fi
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
    63
    if [[ "$BUILD_ARGS" == *"BUILD_ENGINE_C"* ]]; then
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
    64
      cabal update
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
    65
      cabal install --only-dependencies tools/pas2c/pas2c.cabal
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
    66
    fi
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
    67
    # avoid installing Sparkle, add default unit path
11748
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    68
    export BUILD_ARGS="$BUILD_ARGS -DNOAUTOUPDATE=1"
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    69
  elif [ "$TRAVIS_OS_NAME" == "ios" ]; then
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    70
    # FPC 3.0.0 required for using FPC 3.0.1 which contains rtl for ios
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    71
    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
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    72
    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
11410
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
    73
  fi
11748
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    74
11587
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11504
diff changeset
    75
before_script: |
11748
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    76
  if [ "$TRAVIS_OS_NAME" == "ios" ]; then
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    77
    # More or less stable hw iOS version can be compiled with FPC 3.1.1,
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    78
    # but there are no (easy?) way to build it from sources,
11587
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11504
diff changeset
    79
    # so we just temporary switch Xcode project to use FPC 3.0.1
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11504
diff changeset
    80
    git apply tools/fix_fpc_ios_build_patch.diff
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11504
diff changeset
    81
    xctool -project ./project_files/HedgewarsMobile/Hedgewars.xcodeproj -scheme UpdateDataFolder build
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11504
diff changeset
    82
  else
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11504
diff changeset
    83
    mkdir build && cd build && cmake $BUILD_ARGS ..
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11504
diff changeset
    84
  fi
11748
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    85
11587
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11504
diff changeset
    86
script: |
11748
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    87
  if [ "$TRAVIS_OS_NAME" == "ios" ]; then
11587
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11504
diff changeset
    88
    xctool -project ./project_files/HedgewarsMobile/Hedgewars.xcodeproj -scheme Hedgewars -configuration Release build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11504
diff changeset
    89
  else
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11504
diff changeset
    90
    make VERBOSE=1
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11504
diff changeset
    91
  fi
11748
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    92
11410
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
    93
after_success: |
11748
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    94
  if [ "$TRAVIS_OS_NAME" == "linux" ]; then
11410
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
    95
    make test_verbose
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
    96
  elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
    97
    make install
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11393
diff changeset
    98
  fi
11748
4a68030ee852 Minor changes to the travis file
koda
parents: 11662
diff changeset
    99
9915
67c9bd84f941 Added simple travis file
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents:
diff changeset
   100
notifications:
10664
20ec6af4fb87 Use notice and skip join on irc
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents: 10559
diff changeset
   101
  email: false
9915
67c9bd84f941 Added simple travis file
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents:
diff changeset
   102
  irc:
67c9bd84f941 Added simple travis file
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents:
diff changeset
   103
    channels:
9936
a9fe8db625d0 enable travis bot
koda
parents: 9935
diff changeset
   104
      - "chat.freenode.net#hedgewars"
9939
462b644f415c less spam
koda
parents: 9936
diff changeset
   105
    template:
462b644f415c less spam
koda
parents: 9936
diff changeset
   106
      - "hw-build #%{build_number} (%{commit} by %{author}): %{message}"
462b644f415c less spam
koda
parents: 9936
diff changeset
   107
      - "See details at %{build_url}"
10664
20ec6af4fb87 Use notice and skip join on irc
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents: 10559
diff changeset
   108
    on_success: change
20ec6af4fb87 Use notice and skip join on irc
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents: 10559
diff changeset
   109
    on_failure: always
11504
df336149cc2b travis: don't skip joins because that would require #hedgewars to allow messages from outside the channel
sheepluva
parents: 11410
diff changeset
   110
    skip_join: false