-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
95 lines (82 loc) · 3.24 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
# Based on HLEnhanced's .travis.yml, credits to Shepard for writing it!
# Use the C base
language: c
# Linux - use Ubuntu 14.04 Trusty Tahr instead of 12.04 Precise Pengolin, this
# is required for the correct version of libsdl2-dev.
sudo: required
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libsdl2-dev
- linux-libc-dev
- gcc-6-multilib
- g++-6-multilib
matrix:
allow_failures:
# Mac OS X Mavericks 10.9.5 (Xcode 6.1)
- os: osx
include:
#debug
- os: linux
env: COMPILER=gcc-6 BUILD_RULES="-DOPT:STRING=debug -DGAME_BASE_DIRECTORY=dummy" OPT=debug
#optimized
- os: linux
env: COMPILER=gcc-6 BUILD_RULES="-DOPT:STRING=opt -DGAME_BASE_DIRECTORY=dummy" OPT=opt
#optimized fast
- os: linux
env: COMPILER=gcc-6 BUILD_RULES="-DOPT:STRING=opt-fast -DGAME_BASE_DIRECTORY=dummy" OPT=opt-fast
before_install:
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
sudo dpkg --add-architecture i386
sudo apt-get -qq update
sudo apt-get install -y linux-libc-dev:i386
else
brew update
fi
install:
# Prepare the dependencies
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
# Get the latest CMake version
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
CMAKE_URL="http://www.cmake.org/files/v3.6/cmake-3.6.2-Linux-x86_64.tar.gz"
mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
export PATH=${DEPS_DIR}/cmake/bin:${PATH}
else
CMAKE_URL="http://www.cmake.org/files/v3.6/cmake-3.6.2-Darwin-x86_64.tar.gz"
mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
export PATH=${DEPS_DIR}/cmake/CMake.app/Contents/bin:${PATH}
fi
before_script:
# Move to build directory
- cd ${TRAVIS_BUILD_DIR}
- mkdir build && cd build
script:
# Just execute the cmake and make commands
- |
if [[ "${COMPILER}" == "gcc-6" ]]; then
cmake -DCMAKE_CXX_COMPILER="g++-6" -DCMAKE_C_COMPILER="gcc-6" ${BUILD_RULES} ..
else
cmake ${BUILD_RULES} ..
fi
- make
after_success:
- zip Metamod-P-${OPT}-Linux.zip metamod/metamod.so
- zip Plugins-${OPT}-Linux.zip stub_plugin/stub_plugin.so trace_plugin/trace_plugin.so wdmisc_plugin/wdmisc_plugin.so
notifications:
email: false
deploy:
provider: releases
api_key:
secure: PJVhs6xh1B7HY9Faba2H1J4OiVrf75gKzQ2BrNbayt+po+GK/pTe34Lk5SenXkF/KQRre6H2V6xpdScLClXpaYdjIG8VhGOAFjJ8iWt766gqXacfkOpTeHV49kK8EOfzA08CeavJFqTrB+0CNmPn/kXTeOaP1eiGX2Me2hMTyQxZODf0lTNrodSpgSQdQeaI2Nch1MpKRR3qxWHMJIPwAn+ceOLKdSD8uurg8JI7Ot2CHuCxakppQ7DLc0rYuxBHMv7g1ZxymyApRi71GhEHPWLJNEa2pZgwoC4c6Zm4/6ZdHW8wNnksdDYcz/5EeGWevvelTPxUbFPEdZMOuxqvbwsFpPiUSjSatjCCYBESEF1PczK7b2gKiKMbwPQJF4iNHl3VPdvfla/fJCBOGvHBdcX5l5fk4f+tQpw/UBDq4KtdGBf0zpSKwTDOkJhkPC8rHNAWL3sH1qviGCRGBx9Bv0k88iFzvosvtcwovmV7yqGLqlPK1MuDixr7OEhjI/X7RXbKmRZ/HaK9BIydnH03PKpWJwcO2bNUQQoYFXnT6G/uOYT1+riDXi+sj9UWV8OH/niKezLEgFz36jnnh+manibJUE1jKGmZuwBMMVP/gJh6lQ8HYixi/0DOkJX+tSDQ8jr0zFJk4RRis1h5AVx4JaKASAhual755UFmyS/MzMU=
file:
- "Metamod-P-${OPT}-Linux.zip"
- "Plugins-${OPT}-Linux.zip"
skip_cleanup: true
on:
tags: true