Skip to content

Commit

Permalink
Merge pull request #24 from danielga/fix-travis-ci-config
Browse files Browse the repository at this point in the history
Fixed .travis.yml config
  • Loading branch information
danielga authored Aug 23, 2018
2 parents 5fe9076 + ccf15a9 commit 5f9987e
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 33 deletions.
67 changes: 35 additions & 32 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,45 @@
language: cpp
compiler: gcc
os:
- linux
- osx
osx_image: xcode9.2
dist: trusty
if: tag IS present
env:
global:
- MODULE_NAME=luaerror
REPOSITORY_DIR="$TRAVIS_BUILD_DIR"
DEPENDENCIES="$TRAVIS_BUILD_DIR/dependencies"
GARRYSMOD_COMMON="$TRAVIS_BUILD_DIR/dependencies/garrysmod_common"
SOURCE_SDK="$TRAVIS_BUILD_DIR/dependencies/sourcesdk-minimal"
TARGET_OS="$TRAVIS_OS_NAME"
COMPILER_PLATFORM=gmake
BUILD_SCRIPT="$TRAVIS_BUILD_DIR/dependencies/garrysmod_common/build/ci.sh"
GARRYSMOD_COMMON_REPOSITORY="https://github.com/danielga/garrysmod_common.git"
PREMAKE5_EXECUTABLE=premake5
matrix:
include:
- os: linux
dist: trusty
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- linux-libc-dev:i386
- g++-8-multilib
env:
- PREMAKE5="$TRAVIS_BUILD_DIR/dependencies/linux/premake-core/premake5"
PROJECT_OS=linux
before_install:
- export CC=gcc-8
export CXX=g++-8
- os: osx
osx_image: xcode9.4
env:
- PREMAKE5="$TRAVIS_BUILD_DIR/dependencies/macosx/premake-core/premake5"
PROJECT_OS=macosx
cache:
directories:
- "$TRAVIS_BUILD_DIR/dependencies"
- "$TRAVIS_BUILD_DIR/projects"
addons:
apt:
packages:
- linux-libc-dev:i386
- g++-multilib
install:
- export MODULE_NAME="luaerror"
- export REPOSITORY_DIR="$TRAVIS_BUILD_DIR"
- export DEPENDENCIES="$TRAVIS_BUILD_DIR/dependencies"
- export GARRYSMOD_COMMON="$DEPENDENCIES/garrysmod_common"
- export SOURCE_SDK="$DEPENDENCIES/sourcesdk-minimal"
- export TARGET_OS="$TRAVIS_OS_NAME"
- export COMPILER_PLATFORM="gmake";
- export BUILD_SCRIPT="$GARRYSMOD_COMMON/build/ci.sh"
- export GARRYSMOD_COMMON_REPOSITORY="https://github.com/danielga/garrysmod_common.git"
- export PREMAKE5_EXECUTABLE="premake5";
- if [ $TRAVIS_OS_NAME = "osx" ]; then
export PREMAKE5="$DEPENDENCIES/macosx/premake-core/premake5";
export PROJECT_OS="macosx";
export CXX="g++";
export CC="gcc";
elif [ $TRAVIS_OS_NAME = "linux" ]; then
export PREMAKE5="$DEPENDENCIES/linux/premake-core/premake5";
export PROJECT_OS="linux";
export CXX="g++";
export CC="gcc";
fi
- mkdir -p "$DEPENDENCIES"
- if [ ! -f "$GARRYSMOD_COMMON/premake5.lua" ]; then
echo "garrysmod_common directory is empty, doing git clone of the remote repo";
Expand Down
2 changes: 1 addition & 1 deletion source/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static Detouring::Hook HandleClientLuaError_detour;
inline std::string Trim( const std::string &s )
{
std::string c = s;
auto not_isspace = std::not1( std::ptr_fun( isspace ) );
auto not_isspace = std::not1( std::function<int( int )>( isspace ) );
// remote trailing "spaces"
c.erase( std::find_if( c.rbegin( ), c.rend( ), not_isspace ).base( ), c.end( ) );
// remote initial "spaces"
Expand Down

0 comments on commit 5f9987e

Please sign in to comment.