Merge pull request #787 from JustArchi/ci-improvements

CI improvements
This commit is contained in:
Łukasz Domeradzki
2018-05-10 22:45:58 +02:00
committed by GitHub
2 changed files with 11 additions and 16 deletions

View File

@@ -15,12 +15,10 @@ branches:
# Use latest images for building
group: travis_latest
# This is .NET Core project, we're not building with Mono
# ASF is based on .NET Core platform
dotnet: 2.1.105
mono: none
# ASF requires .NET Core 2.0+
dotnet: 2.1.104
env:
global:
- CONFIGURATION: Release
@@ -37,20 +35,19 @@ before_script:
fi
dotnet --info
dotnet restore
script:
- |
set -e
dotnet build -c "$CONFIGURATION" -o 'out/source' --no-restore /nologo
dotnet test ArchiSteamFarm.Tests -c "$CONFIGURATION" -o 'out/source' --no-build --no-restore
dotnet build -c "$CONFIGURATION" -o 'out/source' /nologo
dotnet test ArchiSteamFarm.Tests -c "$CONFIGURATION" -o 'out/source'
publish() {
if [ "$1" = 'generic' ]; then
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -o "out/${1}" --no-restore /nologo "/p:ASFVariant=$1"
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -o "out/${1}" /nologo "/p:ASFVariant=$1"
else
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -o "out/${1}" -r "$1" --no-restore /nologo "/p:ASFVariant=$1" "/p:CrossGenDuringPublish=false"
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -o "out/${1}" -r "$1" /nologo "/p:ASFVariant=$1" "/p:CrossGenDuringPublish=false"
fi
# If we include any helper scripts for this variant, copy them to output directory
@@ -75,4 +72,4 @@ matrix:
sudo: false
- os: osx
# Ref: https://docs.travis-ci.com/user/reference/osx/
osx_image: xcode9.3beta
osx_image: xcode9.3

View File

@@ -29,8 +29,6 @@ before_build:
dotnet --info
dotnet restore
build_script:
- pwsh: >-
Set-StrictMode -Version Latest
@@ -40,7 +38,7 @@ build_script:
$ProgressPreference = 'SilentlyContinue'
dotnet build -c "$env:CONFIGURATION" -o 'out\source' --no-restore /nologo
dotnet build -c "$env:CONFIGURATION" -o 'out\source' /nologo
test_script:
- pwsh: >-
Set-StrictMode -Version Latest
@@ -50,7 +48,7 @@ test_script:
$ProgressPreference = 'SilentlyContinue'
dotnet test ArchiSteamFarm.Tests -c "$env:CONFIGURATION" -o 'out\source' --no-build --no-restore
dotnet test ArchiSteamFarm.Tests -c "$env:CONFIGURATION" -o 'out\source'
after_test:
- pwsh: >-
Set-StrictMode -Version Latest
@@ -70,9 +68,9 @@ after_test:
Set-Location -Path "$env:APPVEYOR_BUILD_FOLDER"
if ($Variant -eq 'generic') {
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -o "out\$Variant" --no-restore /nologo "/p:ASFVariant=$Variant"
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -o "out\$Variant" /nologo "/p:ASFVariant=$Variant"
} else {
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -o "out\$Variant" -r "$Variant" --no-restore /nologo "/p:ASFVariant=$Variant" "/p:CrossGenDuringPublish=false"
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -o "out\$Variant" -r "$Variant" /nologo "/p:ASFVariant=$Variant" "/p:CrossGenDuringPublish=false"
}
# If we include any helper scripts for this variant, copy them to output directory