CI cleanup

This commit is contained in:
JustArchi
2017-01-16 03:03:19 +01:00
parent ab34ca70a6
commit d09407d4d0
3 changed files with 42 additions and 34 deletions

View File

@@ -1,29 +1,31 @@
language: csharp
solution: ArchiSteamFarm.sln
# Save bandwidth by limiting to only last 10 commits
# Save bandwidth by limiting git clone to only last 10 commits
git:
depth: 10
# Don't build other branches than master
# Sadly Travis doesn't support AppVeyor's "skip_branch_with_pr"
branches:
only:
- master
# We test ASF on latest stable and nightly version of Mono
# We test ASF on latest stable and nightly versions of Mono
mono:
- weekly
# - alpha
# - beta
# - alpha
# - beta
- latest
# Mono is often broken, allow all Mono failures by default
matrix:
allow_failures:
- mono: weekly
# - mono: alpha
# - mono: beta
- mono: latest
# Mono is often broken, we might need to enable/disable following setting on as-needed basis
#matrix:
# fast_finish: true
# allow_failures:
# - mono: weekly
# - mono: alpha
# - mono: beta
# - mono: latest
# Initialize our envsetup before building
before_script:

View File

@@ -1,7 +1,5 @@
version: 1.0.{build}-{branch}
branches:
only:
- master
skip_branch_with_pr: true
image: Visual Studio 2015
configuration: Release
platform: Any CPU
@@ -13,10 +11,12 @@ build:
after_build:
- cmd: 7z a -mx=9 -mfb=258 -mpass=15 %APPVEYOR_BUILD_FOLDER%\out\ASF.zip %APPVEYOR_BUILD_FOLDER%\out\ASF.exe %APPVEYOR_BUILD_FOLDER%\out\ASF-ConfigGenerator.exe %APPVEYOR_BUILD_FOLDER%\out\config
artifacts:
- path: out\ASF.zip
name: ASF.zip
- path: out\ASF.exe
name: ASF.exe
- path: out\ASF.zip
name: ASF.zip
- path: out\ASF-ConfigGenerator.exe
name: ASF-ConfigGenerator.exe
- path: out\ASF-Service.exe
name: ASF-Service.exe
notifications:
@@ -25,4 +25,4 @@ notifications:
method: POST
on_build_success: true
on_build_failure: true
on_build_status_changed: false
on_build_status_changed: true

View File

@@ -1,11 +1,13 @@
MONO_DEBUG_IF_AVAILABLE() {
echo "INFO: Appending $1 to MONO_DEBUG..."
local PREVIOUS_MONO_DEBUG="$MONO_DEBUG"
# Add change if needed
if [ -z "$PREVIOUS_MONO_DEBUG" ]; then
export MONO_DEBUG="$1"
elif echo "$PREVIOUS_MONO_DEBUG" | grep -Fq "$1"; then
echo "Success: $1 already exists"
echo "DONE: $1 already exists"
return 0
else
export MONO_DEBUG="${PREVIOUS_MONO_DEBUG},${1}"
@@ -14,50 +16,54 @@ MONO_DEBUG_IF_AVAILABLE() {
# If we did a change, check if Mono supports that option
# If not, it will be listed as invalid option on line 1
if mono "" 2>&1 | head -n 1 | grep -Fq "$1"; then
echo "Failure: $1"
echo "FAILED: $1"
export MONO_DEBUG="$PREVIOUS_MONO_DEBUG"
return 1
fi
echo "Success: $1"
echo "DONE: $1"
return 0
}
VERSION_GREATER() {
VERSION_GREATER_THAN() {
if [ "$1" = "$2" ]; then
return 1
fi
! VERSION_LESS_EQUAL "$1" "$2"
! VERSION_LESS_EQUAL_THAN "$1" "$2"
}
VERSION_GREATER_EQUAL() {
! VERSION_LESS "$1" "$2"
VERSION_GREATER_EQUAL_THAN() {
! VERSION_LESS_THAN "$1" "$2"
}
VERSION_LESS() {
VERSION_LESS_THAN() {
if [ "$1" = "$2" ]; then
return 1
fi
VERSION_LESS_EQUAL "$1" "$2"
VERSION_LESS_EQUAL_THAN "$1" "$2"
}
VERSION_LESS_EQUAL() {
VERSION_LESS_EQUAL_THAN() {
[ "$1" = "$(echo -e "$1\n$2" | sort -V | head -n 1)" ]
}
echo "Mono environment setup executed!"
echo "INFO: Mono environment setup executed!"
MONO_VERSION="$(mono -V | head -n 1 | cut -d ' ' -f 5)"
MINIMUM_MONO_VERSION="4.6.0" # Bump as needed
CURRENT_MONO_VERSION="$(mono -V | head -n 1 | cut -d ' ' -f 5)"
echo "Mono version: $MONO_VERSION"
echo "INFO: Mono version: $CURRENT_MONO_VERSION | Required: ${MINIMUM_MONO_VERSION}+"
if VERSION_GREATER_EQUAL "$MONO_VERSION" "4.6.0"; then
echo "INFO: Appending no-compact-seq-points to MONO_DEBUG..."
MONO_DEBUG_IF_AVAILABLE "no-compact-seq-points"
if VERSION_LESS_THAN "$CURRENT_MONO_VERSION" "$MINIMUM_MONO_VERSION"; then
echo "ERROR: You've attempted to build ASF with unsupported Mono version!"
return 1
fi
MONO_DEBUG_IF_AVAILABLE "no-compact-seq-points"
MONO_DEBUG_IF_AVAILABLE "no-gdb-backtrace"
if [ -z "$MONO_ENV_OPTIONS" ]; then
echo "INFO: Setting MONO_ENV_OPTIONS to: --server -O=all"
export MONO_ENV_OPTIONS="--server -O=all"
@@ -65,4 +71,4 @@ else
echo "INFO: Skipping setting of MONO_ENV_OPTIONS as it's already declared with value: $MONO_ENV_OPTIONS"
fi
echo "Mono environment setup finished!"
echo "INFO: Mono environment setup finished!"