--no-restore improvements

This commit is contained in:
JustArchi
2018-05-10 21:35:03 +02:00
parent e823546788
commit 7ba429de6e
2 changed files with 11 additions and 16 deletions

View File

@@ -15,12 +15,10 @@ branches:
# Use latest images for building # Use latest images for building
group: travis_latest 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 mono: none
# ASF requires .NET Core 2.0+
dotnet: 2.1.104
env: env:
global: global:
- CONFIGURATION: Release - CONFIGURATION: Release
@@ -37,20 +35,19 @@ before_script:
fi fi
dotnet --info dotnet --info
dotnet restore
script: script:
- | - |
set -e set -e
dotnet build -c "$CONFIGURATION" -o 'out/source' --no-restore /nologo dotnet build -c "$CONFIGURATION" -o 'out/source' /nologo
dotnet test ArchiSteamFarm.Tests -c "$CONFIGURATION" -o 'out/source' --no-build --no-restore dotnet test ArchiSteamFarm.Tests -c "$CONFIGURATION" -o 'out/source'
publish() { publish() {
if [ "$1" = 'generic' ]; then 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 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 fi
# If we include any helper scripts for this variant, copy them to output directory # If we include any helper scripts for this variant, copy them to output directory
@@ -75,4 +72,4 @@ matrix:
sudo: false sudo: false
- os: osx - os: osx
# Ref: https://docs.travis-ci.com/user/reference/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 --info
dotnet restore
build_script: build_script:
- pwsh: >- - pwsh: >-
Set-StrictMode -Version Latest Set-StrictMode -Version Latest
@@ -40,7 +38,7 @@ build_script:
$ProgressPreference = 'SilentlyContinue' $ProgressPreference = 'SilentlyContinue'
dotnet build -c "$env:CONFIGURATION" -o 'out\source' --no-restore /nologo dotnet build -c "$env:CONFIGURATION" -o 'out\source' /nologo
test_script: test_script:
- pwsh: >- - pwsh: >-
Set-StrictMode -Version Latest Set-StrictMode -Version Latest
@@ -50,7 +48,7 @@ test_script:
$ProgressPreference = 'SilentlyContinue' $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: after_test:
- pwsh: >- - pwsh: >-
Set-StrictMode -Version Latest Set-StrictMode -Version Latest
@@ -70,9 +68,9 @@ after_test:
Set-Location -Path "$env:APPVEYOR_BUILD_FOLDER" Set-Location -Path "$env:APPVEYOR_BUILD_FOLDER"
if ($Variant -eq 'generic') { 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 { } 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 # If we include any helper scripts for this variant, copy them to output directory