forked from CorsixTH/CorsixTH
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
65 lines (64 loc) · 2.81 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
sudo: required
dist: trusty
language: cpp
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libssl-dev
- luarocks
- doxygen
- g++-5
- sshpass
before_install:
# Required for LDocGen
- luarocks --local install lpeg
- luarocks --local install luafilesystem
- luarocks --local install luasocket
# Required for lua unit tests
- luarocks --local install luasec OPENSSL_DIR=/usr OPENSSL_LIBDIR=/usr/lib/x86_64-linux-gnu/
- luarocks --local install busted
- git clone --depth=1 https://github.com/CorsixTH/deps.git $HOME/deps
- mkdir libs
- pushd libs
- mkdir $TRAVIS_BUILD_DIR/LevelEdit/bin
- popd
install:
- CMAKE_INCLUDE_PATH=$HOME/deps/gnu-linux-x64/include
- CMAKE_LIBRARY_PATH=$HOME/deps/gnu-linux-x64/lib
- cd $TRAVIS_BUILD_DIR
# Create unix makefiles
- cp $HOME/deps/travisci/cmake/FindFreetype.cmake CMake/FindFreetype.cmake
- cmake -DCMAKE_CXX_COMPILER="g++-5" -DLUA_PROGRAM_PATH=`which lua` -DWITH_AUDIO=ON -DWITH_MOVIES=ON -DWITH_LUAJIT=OFF -DCMAKE_INCLUDE_PATH="$CMAKE_INCLUDE_PATH;$CMAKE_INCLUDE_PATH/SDL2" -DCMAKE_LIBRARY_PATH="$CMAKE_LIBRARY_PATH" -DLUA_LIBRARY="$CMAKE_LIBRARY_PATH/liblua.so" -Bfresh -H. --debug-output
before_script:
# Don't ask for confirmation when using scp
- echo -e "Host armedpineapple.co.uk\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- echo -e "Host server2.armedpineapple.co.uk\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- cd fresh
script:
# Check if there are trailing whitespaces.
- ${TRAVIS_BUILD_DIR}/scripts/check_trailing_whitespaces.py $TRAVIS_BUILD_DIR
# Check for incorrectly encoded language files.
- python ${TRAVIS_BUILD_DIR}/scripts/check_language_files_not_BOM.py $TRAVIS_BUILD_DIR/CorsixTH/Lua/languages
# Check if there are lua classes with invalid/improper declarations.
- python ${TRAVIS_BUILD_DIR}/scripts/check_lua_classes.py
# Build CorsixTH
- make VERBOSE=1
# Validate lua files
- find $TRAVIS_BUILD_DIR -path $TRAVIS_BUILD_DIR/CorsixTH/Lua/languages -prune -o -name '*.lua' -print0 | xargs -0 luac -p --
# Run lua unit tests
- cd $TRAVIS_BUILD_DIR/CorsixTH/Luatest
- eval `luarocks --local path`
- LUA_PATH="../Lua/?.lua;$LUA_PATH" /home/travis/.luarocks/bin/busted
# Build LevelEdit
- cd $TRAVIS_BUILD_DIR/LevelEdit && ant dist
# Build documentation
- cd ${TRAVIS_BUILD_DIR}/fresh && make doc
after_success:
# Upload new docs
- if [ $TRAVIS_REPO_SLUG == "CorsixTH/CorsixTH" -a $TRAVIS_BRANCH == "master" ]; then sshpass -p "$SCP_PASS" scp -r -v -P12349 $TRAVIS_BUILD_DIR/fresh/doc/* [email protected]:/home/cthbuilder/docs/; fi;
env:
global:
secure: "mPtzSeDJKVeUu6KHJEbmHa91O+QK2XM0advYdr+13yr83w3C7cGFFjWgqzirsFUHVqPgdtSJIkom0DIxX7JtRoBZmt/xon+zfLq+Q4aSkJoYezWBqp2gavS8o1kSjtW7XuIuq995yjWvn7nehyoTYkKNtz/EzX5ZIVZ/iX73iyo="