.travis.yml
author nemo
Fri, 12 Apr 2019 11:47:35 -0400
changeset 14798 9de13d9a6312
parent 14243 91a3aad23297
child 14929 58070c3dd043
permissions -rw-r--r--
I was out of date again...
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12441
1ae6b6f10677 travis: move to trusty environment
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents: 12290
diff changeset
     1
sudo: required
14243
91a3aad23297 Update Travis to use Ubuntu bionic (18.04 LTS)
Wuzzy <Wuzzy2@mail.ru>
parents: 13719
diff changeset
     2
dist: bionic
9915
67c9bd84f941 Added simple travis file
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents:
diff changeset
     3
language: c
11809
7a8b6694a519 linux on travis needs sudo to install dependencies
koda
parents: 11806
diff changeset
     4
sudo: true
11415
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11398
diff changeset
     5
os:
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11398
diff changeset
     6
  - linux
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11398
diff changeset
     7
  - osx
11753
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
     8
9915
67c9bd84f941 Added simple travis file
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents:
diff changeset
     9
branches:
11415
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11398
diff changeset
    10
  only:
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11398
diff changeset
    11
    master
11753
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
    12
9915
67c9bd84f941 Added simple travis file
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents:
diff changeset
    13
compiler:
67c9bd84f941 Added simple travis file
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents:
diff changeset
    14
  - gcc
67c9bd84f941 Added simple travis file
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents:
diff changeset
    15
  - clang
11753
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
    16
12290
3cdd664f6d0c travis: Exclude gcc for the macOS target
koda
parents: 11866
diff changeset
    17
matrix:
3cdd664f6d0c travis: Exclude gcc for the macOS target
koda
parents: 11866
diff changeset
    18
  exclude:
3cdd664f6d0c travis: Exclude gcc for the macOS target
koda
parents: 11866
diff changeset
    19
    - os: osx
3cdd664f6d0c travis: Exclude gcc for the macOS target
koda
parents: 11866
diff changeset
    20
      compiler: gcc
3cdd664f6d0c travis: Exclude gcc for the macOS target
koda
parents: 11866
diff changeset
    21
9915
67c9bd84f941 Added simple travis file
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents:
diff changeset
    22
env:
9935
491f661a4e57 add more travis tests
koda
parents: 9915
diff changeset
    23
  - BUILD_ARGS="-DCMAKE_BUILD_TYPE=Release"
9915
67c9bd84f941 Added simple travis file
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents:
diff changeset
    24
  - BUILD_ARGS="-DCMAKE_BUILD_TYPE=Debug"
11806
ae58d7ad0d97 Enable GL2 travis builds
koda
parents: 11754
diff changeset
    25
  - BUILD_ARGS="-DNOSERVER=1 -DGL2=1 -DNOPNG=1"
11339
0bff27d8d18f travis: Trim down the number of tests
Vittorio Giovara <vittorio.giovara@gmail.com>
parents: 10664
diff changeset
    26
  - BUILD_ARGS="-DNOSERVER=1 -DLUA_SYSTEM=0 -DPHYSFS_SYSTEM=0"
11753
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
    27
11592
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11509
diff changeset
    28
matrix:
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11509
diff changeset
    29
  include:
11754
5d66eace5b81 Only build engine to c with clang on travis
koda
parents: 11753
diff changeset
    30
  - language: c
5d66eace5b81 Only build engine to c with clang on travis
koda
parents: 11753
diff changeset
    31
    os: linux
5d66eace5b81 Only build engine to c with clang on travis
koda
parents: 11753
diff changeset
    32
    compiler: clang
5d66eace5b81 Only build engine to c with clang on travis
koda
parents: 11753
diff changeset
    33
    env: BUILD_ARGS="-DNOSERVER=1 -DBUILD_ENGINE_C=1"
5d66eace5b81 Only build engine to c with clang on travis
koda
parents: 11753
diff changeset
    34
  - language: c
5d66eace5b81 Only build engine to c with clang on travis
koda
parents: 11753
diff changeset
    35
    os: osx
5d66eace5b81 Only build engine to c with clang on travis
koda
parents: 11753
diff changeset
    36
    compiler: clang
5d66eace5b81 Only build engine to c with clang on travis
koda
parents: 11753
diff changeset
    37
    env: BUILD_ARGS="-DNOSERVER=1 -DBUILD_ENGINE_C=1"
11806
ae58d7ad0d97 Enable GL2 travis builds
koda
parents: 11754
diff changeset
    38
  - language: c
ae58d7ad0d97 Enable GL2 travis builds
koda
parents: 11754
diff changeset
    39
    os: linux
ae58d7ad0d97 Enable GL2 travis builds
koda
parents: 11754
diff changeset
    40
    compiler: clang
ae58d7ad0d97 Enable GL2 travis builds
koda
parents: 11754
diff changeset
    41
    env: BUILD_ARGS="-DNOSERVER=1 -DBUILD_ENGINE_C=1 -DGL2=1"
ae58d7ad0d97 Enable GL2 travis builds
koda
parents: 11754
diff changeset
    42
  - language: c
ae58d7ad0d97 Enable GL2 travis builds
koda
parents: 11754
diff changeset
    43
    os: osx
ae58d7ad0d97 Enable GL2 travis builds
koda
parents: 11754
diff changeset
    44
    compiler: clang
ae58d7ad0d97 Enable GL2 travis builds
koda
parents: 11754
diff changeset
    45
    env: BUILD_ARGS="-DNOSERVER=1 -DBUILD_ENGINE_C=1 -DGL2=1"
11592
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11509
diff changeset
    46
  - language: objective-c
11753
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
    47
    sudo: required
11592
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11509
diff changeset
    48
    os: osx
11753
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
    49
    compiler: clang
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
    50
    env: TRAVIS_OS_NAME="ios" SDL_LIB_PATH="$TRAVIS_BUILD_DIR/../Library"
11592
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11509
diff changeset
    51
    osx_image: xcode7.2
11753
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
    52
11415
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11398
diff changeset
    53
before_install: |
11753
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
    54
  if [ "$TRAVIS_OS_NAME" == "linux" ]; then
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
    55
    sudo apt-get update -qq
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
    56
  elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
    57
    brew update --all
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
    58
  elif [ "$TRAVIS_OS_NAME" == "ios" ]; then
11592
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11509
diff changeset
    59
    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: 11509
diff changeset
    60
    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: 11509
diff changeset
    61
    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: 11509
diff changeset
    62
    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: 11509
diff changeset
    63
    hg clone http://hg.libsdl.org/SDL_mixer $SDL_LIB_PATH/SDL_mixer/
11415
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11398
diff changeset
    64
  fi
11753
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
    65
11415
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11398
diff changeset
    66
install: |
11753
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
    67
  if [ "$TRAVIS_OS_NAME" == "linux" ]; then
13719
9ea58d0134ad Add missing server dependencies to Travis metadata
Wuzzy <Wuzzy2@mail.ru>
parents: 13306
diff changeset
    68
    sudo apt-get install -y debhelper cmake dpkg-dev qtbase5-dev qtbase5-private-dev qttools5-dev-tools qttools5-dev libphysfs-dev libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev libsdl2-net-dev bzip2 ghc libghc-mtl-dev libghc-vector-dev libghc-zlib-dev libghc-random-dev libghc-network-dev libghc-sandi-dev libghc-hslogger-dev libghc-utf8-string-dev libghc-sha-dev libghc-entropy-dev libghc-regex-tdfa-dev libghc-aeson-dev libghc-yaml-dev libghc-text-dev liblua5.1-0-dev fpc fp-compiler fp-units-misc libpng-dev fp-units-gfx libavcodec-dev libavformat-dev libglew1.6-dev
11415
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11398
diff changeset
    69
  elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
13301
fd857b7629ea Update .travis.yml to include Qt5 stuff
Wuzzy <Wuzzy2@mail.ru>
parents: 13298
diff changeset
    70
    brew install qt5
12821
be7f05f83f8e travis: Install qt4 with a brew tap
koda
parents: 12443
diff changeset
    71
    brew install fpc glew physfs lua51 sdl2 sdl2_image sdl2_net sdl2_ttf ffmpeg ghc cabal-install
11667
97a4188fc99e travis: Use correct vorbis flag in sdl2_mixer install
koda
parents: 11658
diff changeset
    72
    brew install sdl2_mixer --with-libvorbis
11415
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11398
diff changeset
    73
    # use cabal install haskell deps, pas2c ones are covered by server
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11398
diff changeset
    74
    if [[ "$BUILD_ARGS" != *"NOSERVER"* ]]; then
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11398
diff changeset
    75
      cabal update
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11398
diff changeset
    76
      cabal install --only-dependencies gameServer/hedgewars-server.cabal
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11398
diff changeset
    77
    fi
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11398
diff changeset
    78
    if [[ "$BUILD_ARGS" == *"BUILD_ENGINE_C"* ]]; then
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11398
diff changeset
    79
      cabal update
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11398
diff changeset
    80
      cabal install --only-dependencies tools/pas2c/pas2c.cabal
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11398
diff changeset
    81
    fi
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11398
diff changeset
    82
    # avoid installing Sparkle, add default unit path
11753
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
    83
    export BUILD_ARGS="$BUILD_ARGS -DNOAUTOUPDATE=1"
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
    84
  elif [ "$TRAVIS_OS_NAME" == "ios" ]; then
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
    85
    # FPC 3.0.0 required for using FPC 3.0.1 which contains rtl for ios
12443
664e2a221047 - Fix fpc download link for travis iOS build
antonc27 <antonc27@mail.ru>
parents: 12441
diff changeset
    86
    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
664e2a221047 - Fix fpc download link for travis iOS build
antonc27 <antonc27@mail.ru>
parents: 12441
diff changeset
    87
    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
11415
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11398
diff changeset
    88
  fi
11753
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
    89
11592
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11509
diff changeset
    90
before_script: |
11753
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
    91
  if [ "$TRAVIS_OS_NAME" == "ios" ]; then
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
    92
    # More or less stable hw iOS version can be compiled with FPC 3.1.1,
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
    93
    # but there are no (easy?) way to build it from sources,
11592
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11509
diff changeset
    94
    # 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: 11509
diff changeset
    95
    git apply tools/fix_fpc_ios_build_patch.diff
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11509
diff changeset
    96
    xctool -project ./project_files/HedgewarsMobile/Hedgewars.xcodeproj -scheme UpdateDataFolder build
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11509
diff changeset
    97
  else
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11509
diff changeset
    98
    mkdir build && cd build && cmake $BUILD_ARGS ..
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11509
diff changeset
    99
  fi
11753
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
   100
11592
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11509
diff changeset
   101
script: |
11753
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
   102
  if [ "$TRAVIS_OS_NAME" == "ios" ]; then
11592
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11509
diff changeset
   103
    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: 11509
diff changeset
   104
  else
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11509
diff changeset
   105
    make VERBOSE=1
cf83d9cb5590 - Enable CI builds with travis for hw iOS
antonc27 <antonc27@mail.ru>
parents: 11509
diff changeset
   106
  fi
11753
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
   107
11415
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11398
diff changeset
   108
after_success: |
11753
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
   109
  if [ "$TRAVIS_OS_NAME" == "linux" ]; then
11415
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11398
diff changeset
   110
    make test_verbose
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11398
diff changeset
   111
  elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11398
diff changeset
   112
    make install
1b9e183841e7 travis: Enable OSX tests
Vittorio Giovara <vittorio@vimeo.com>
parents: 11398
diff changeset
   113
  fi
11753
4a68030ee852 Minor changes to the travis file
koda
parents: 11667
diff changeset
   114
9915
67c9bd84f941 Added simple travis file
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents:
diff changeset
   115
notifications:
10664
20ec6af4fb87 Use notice and skip join on irc
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents: 10559
diff changeset
   116
  email: false
9915
67c9bd84f941 Added simple travis file
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents:
diff changeset
   117
  irc:
67c9bd84f941 Added simple travis file
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents:
diff changeset
   118
    channels:
9936
a9fe8db625d0 enable travis bot
koda
parents: 9935
diff changeset
   119
      - "chat.freenode.net#hedgewars"
9939
462b644f415c less spam
koda
parents: 9936
diff changeset
   120
    template:
462b644f415c less spam
koda
parents: 9936
diff changeset
   121
      - "hw-build #%{build_number} (%{commit} by %{author}): %{message}"
462b644f415c less spam
koda
parents: 9936
diff changeset
   122
      - "See details at %{build_url}"
10664
20ec6af4fb87 Use notice and skip join on irc
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents: 10559
diff changeset
   123
    on_success: change
20ec6af4fb87 Use notice and skip join on irc
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
parents: 10559
diff changeset
   124
    on_failure: always
11509
df336149cc2b travis: don't skip joins because that would require #hedgewars to allow messages from outside the channel
sheepluva
parents: 11415
diff changeset
   125
    skip_join: false