Skip to content

Commit

Permalink
Fixed CI scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
danielga committed Aug 25, 2018
1 parent f42b595 commit 6640632
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 226 deletions.
27 changes: 20 additions & 7 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,42 @@
version: '{build}'
skip_non_tags: true
image: Visual Studio 2017
clone_depth: 5
clone_depth: 1
init:
- ps: git config --global core.autocrlf true
- cmd: git config --global core.autocrlf true
environment:
MODULE_NAME: serversecure.core
MODULE_NAME: serversecure
REPOSITORY_DIR: $(APPVEYOR_BUILD_FOLDER)
DEPENDENCIES: $(APPVEYOR_BUILD_FOLDER)/dependencies
GARRYSMOD_COMMON: $(APPVEYOR_BUILD_FOLDER)/dependencies/garrysmod_common
SOURCE_SDK: $(APPVEYOR_BUILD_FOLDER)/dependencies/sourcesdk-minimal
PREMAKE5_EXECUTABLE: premake5.exe
PREMAKE5: $(APPVEYOR_BUILD_FOLDER)/dependencies/windows/premake-core/premake5.exe
BUILD_SCRIPT: $(APPVEYOR_BUILD_FOLDER)/dependencies/garrysmod_common/build/ci.ps1
GARRYSMOD_COMMON_REPOSITORY: https://github.com/danielga/garrysmod_common.git
PROJECT_OS: windows
TARGET_OS: win32
COMPILER_PLATFORM: vs2017
install:
- cmd: >-
if not exist "%DEPENDENCIES%/" mkdir "%DEPENDENCIES%"
if exist "%GARRYSMOD_COMMON%/premake5.lua" (echo "garrysmod_common directory is good, pulling any latest changes" & git -C "%GARRYSMOD_COMMON%" pull & git -C "%GARRYSMOD_COMMON%" submodule update --init --recursive)
if not exist "%GARRYSMOD_COMMON%/premake5.lua" (echo "garrysmod_common directory is empty, doing git clone of the remote repo" & git clone --recursive "%GARRYSMOD_COMMON_REPOSITORY%" "%GARRYSMOD_COMMON%")
cache:
- $(APPVEYOR_BUILD_FOLDER)/dependencies/
- $(APPVEYOR_BUILD_FOLDER)/projects/
build_script:
- ps: '& "$env:REPOSITORY_DIR/ci.ps1"'
- cmd: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat" && powershell -File "%BUILD_SCRIPT%"'
test: off
artifacts:
- path: projects/windows/vs2017/release/gmsv_$(MODULE_NAME)_win32.dll
name: gmsv_$(MODULE_NAME)_win32.dll
- path: projects/$(PROJECT_OS)/$(COMPILER_PLATFORM)/release/gmsv_$(MODULE_NAME)_$(TARGET_OS).dll
name: gmsv_$(MODULE_NAME)_$(TARGET_OS).dll
deploy:
- provider: GitHub
tag: $(APPVEYOR_REPO_TAG_NAME)
auth_token:
secure: Kcf0IrxCRLDEYu42alXhUjIettCA8LbmmGkwy2CMykU2I7cZMr22BWXHVLWUJvk5
artifact: projects/windows/vs2017/release/gmsv_$(MODULE_NAME)_win32.dll
artifact: projects/$(PROJECT_OS)/$(COMPILER_PLATFORM)/release/gmsv_$(MODULE_NAME)_$(TARGET_OS).dll
force_update: true
54 changes: 0 additions & 54 deletions .gitlab-ci.yml

This file was deleted.

81 changes: 48 additions & 33 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,62 @@
language: cpp
compiler: gcc
os:
- linux
- osx
osx_image: xcode7.3
if: tag IS present
git:
depth: 1
env:
global:
- MODULE_NAME=serversecure.core
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:
sources:
- ubuntu-toolchain-r-test
packages:
- linux-libc-dev:i386
- gcc-4.9
- gcc-4.9-multilib
- g++-4.9
- g++-4.9-multilib
install:
- export MODULE_NAME="serversecure.core"
- 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 REPOSITORY_DIR=$TRAVIS_BUILD_DIR
- 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++-4.9;
export CC=gcc-4.9;
- mkdir -p "$DEPENDENCIES"
- if [ ! -f "$GARRYSMOD_COMMON/premake5.lua" ]; then
echo "garrysmod_common directory is empty, doing git clone of the remote repo";
git clone --recursive "$GARRYSMOD_COMMON_REPOSITORY" "$GARRYSMOD_COMMON";
else
echo "garrysmod_common directory is good, pulling any latest changes";
git -C "$GARRYSMOD_COMMON" pull;
git -C "$GARRYSMOD_COMMON" submodule update --init --recursive;
fi
script: "$TRAVIS_BUILD_DIR/ci.sh"
script: "$BUILD_SCRIPT"
deploy:
provider: releases
skip_cleanup: true
file: "$TRAVIS_BUILD_DIR/projects/$PROJECT_OS/gmake/release/gmsv_${MODULE_NAME}_${TARGET_OS}.dll"
file:
- "${TRAVIS_BUILD_DIR}/projects/${PROJECT_OS}/${COMPILER_PLATFORM}/release/gmsv_${MODULE_NAME}_${TARGET_OS}.dll"
on:
tags: true
api_key:
Expand Down
76 changes: 0 additions & 76 deletions ci.ps1

This file was deleted.

56 changes: 0 additions & 56 deletions ci.sh

This file was deleted.

0 comments on commit 6640632

Please sign in to comment.