/
.travis.yml
100 lines (92 loc) · 3.95 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
language: cpp
sudo: required
matrix:
include:
- os: linux
dist: xenial
compiler: clang
python: "3.6"
- os: linux
dist: xenial
compiler: gcc
python: "3.5"
- os: osx
#compiler: clang
git:
depth: 5
addons:
apt:
sources:
# add PPAs with more up-to-date toolchains
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-7
packages:
- gcc-8
- g++-8
#- clang-7.0
#- llvm-7.0-dev
#- libclang-7.0-dev
- mesa-common-dev
- libsdl2-dev
- libsdl2-image-dev
- libsdl2-ttf-dev
- libfreetype6-dev
- libopenal-dev
- libvorbis-dev
- zlib1g-dev
- libboost-dev
- libboost-system-dev
- libboost-filesystem-dev
- libboost-test-dev
- libtinyxml-dev
- libc6
- libglew-dev
- pylint
before_install:
# Linux Build
# change gcc to version 8
- if [ $TRAVIS_OS_NAME == linux ]; then sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 20; sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 20; fi
- if [ $TRAVIS_OS_NAME == linux ]; then sudo update-alternatives --config gcc; sudo update-alternatives --config g++; fi
# change clang to version 7.0
#- if [ $TRAVIS_OS_NAME == linux ]; then sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-6.0 20; sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-6.0 20; fi
#- if [ $TRAVIS_OS_NAME == linux ]; then sudo rm -f /usr/local/clang-5.0.0/bin/clang; sudo rm -f /usr/local/clang-5.0.0/bin/clang++; sudo update-alternatives --config clang; sudo update-alternatives --config clang++; fi
#- if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-get -qq update && sudo apt-get install -y libgle3-dev libvorbis-dev libalut-dev cppcheck; fi
# install newer version of pylint, the one fetched with apt-get is broken
#- if [ $TRAVIS_OS_NAME == linux ]; then sudo pip install pylint; fi
# Swig
- if [ $TRAVIS_OS_NAME == linux ]; then sudo add-apt-repository ppa:timsc/swig-3.0.12 -y; sudo apt-get update -q; sudo apt-get install swig; fi
# MacOS Build
- if [ $TRAVIS_OS_NAME == osx ]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install boost swig sdl2 sdl2_image sdl2_ttf freetype openal-soft tinyxml glew libvorbis python3 python || brew upgrade boost swig sdl2 sdl2_image sdl2_ttf freetype openal-soft tinyxml glew libvorbis python3 python || brew outdated boost swig sdl2 sdl2_image sdl2_ttf freetype openal-soft tinyxml glew libvorbis python3 python; fi
- cmake --version
install:
- git clone --quiet --depth 1 git://github.com/fifengine/fifechan.git
- if [ $TRAVIS_OS_NAME == linux ]; then mkdir build_fifechan; cd build_fifechan; cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ../fifechan; fi
- if [ $TRAVIS_OS_NAME == osx ]; then mkdir build_fifechan; cd build_fifechan; cmake ../fifechan; fi
- make -j3
- sudo make install
- cd ..
script:
- cd ..
- if [ $TRAVIS_OS_NAME == linux ]; then mkdir build; cd build; cmake -DPYTHON_EXECUTABLE=/usr/bin/python3 -DCMAKE_INSTALL_PREFIX:PATH=/usr -Dcegui=OFF ../fifengine; fi
- if [ $TRAVIS_OS_NAME == osx ]; then mkdir build; cd build; cmake -Dbuild-library=ON -DPYTHON_EXECUTABLE=/usr/local/bin/python3 -Dcegui=OFF ../fifengine; fi
- ls -alh .
- make -j3
- sudo make install
after_script:
- cd $TRAVIS_BUILD_DIR
- python3 -c 'from fife import fife; print(fife.getVersion())'
- if [ $TRAVIS_OS_NAME == linux ]; then cppcheck --verbose --enable=all --std=posix --std=c++11 --quiet -iengine/core/ext engine/core; fi
- if [ $TRAVIS_OS_NAME == linux ]; then pylint --rcfile=.pylintrc ./engine/python/fife/; fi
notifications:
irc: irc.freenode.org#fife
email: false
#deploy:
# provider: releases
# api_key:
# secure: "TiE1MLzq8DE2vJjiTeWnuhjEM/cH4hQ7yL/SSDkIqTijCY1eiCX6KPE7yDNh9F1SkCfxYyDPTuRc+f1EaAbk073aL56kUTM/bV/4TEcHk4TS40Hcd5aA10gR3XOH3lYwagT2edgXgXLA1cvU1tuwj8stKz1hEnkVlCvFdbvy4qg="
# file: Fifengine*.tar.gz
# file_glob: true
# skip_cleanup: true
# overwrite: true
# on:
# tags: true