From 38c984850937416b7869a7df6adc5318dfaf8a2c Mon Sep 17 00:00:00 2001 From: JustArchi Date: Sun, 10 May 2020 01:04:25 +0200 Subject: [PATCH] Misc CI enhancements --- .github/workflows/ci.yml | 27 +++++++++------------------ .travis.yml | 14 +++++++------- appveyor.yml | 38 +++++++++++++++++++------------------- 3 files changed, 35 insertions(+), 44 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1442e8618..02329b33c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,13 +56,19 @@ jobs: run: npm run-script build:ci --no-progress --prefix ASF-ui - name: Build ArchiSteamFarm - run: dotnet build ArchiSteamFarm -c "${{ env.CONFIGURATION }}" -f "${{ env.NET_CORE_VERSION }}" --nologo + run: dotnet build ArchiSteamFarm -c "${{ env.CONFIGURATION }}" -f "${{ env.NET_CORE_VERSION }}" -p:UseAppHost=false --nologo - name: Build ArchiSteamFarm.CustomPlugins.ExamplePlugin - run: dotnet build ArchiSteamFarm.CustomPlugins.ExamplePlugin -c "${{ env.CONFIGURATION }}" -f "${{ env.NET_CORE_VERSION }}" --nologo + run: dotnet build ArchiSteamFarm.CustomPlugins.ExamplePlugin -c "${{ env.CONFIGURATION }}" -f "${{ env.NET_CORE_VERSION }}" -p:UseAppHost=false --nologo - name: Run ArchiSteamFarm.Tests - run: dotnet test ArchiSteamFarm.Tests -c "${{ env.CONFIGURATION }}" -f "${{ env.NET_CORE_VERSION }}" --nologo + run: dotnet test ArchiSteamFarm.Tests -c "${{ env.CONFIGURATION }}" -f "${{ env.NET_CORE_VERSION }}" -p:UseAppHost=false --nologo + + - name: Perform cleanup in preparation for publishing + run: dotnet clean ArchiSteamFarm -c "${{ env.CONFIGURATION }}" -f "${{ env.NET_CORE_VERSION }}" -p:UseAppHost=false --nologo + + - name: Restore packages in preparation for publishing + run: dotnet restore ArchiSteamFarm - name: Publish ArchiSteamFarm on Unix if: startsWith(matrix.os, 'macos-') || startsWith(matrix.os, 'ubuntu-') @@ -90,9 +96,6 @@ jobs: cp "resources/ASF.ico" "out/${1}/ArchiSteamFarm.ico" } - dotnet clean ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" --nologo - dotnet restore ArchiSteamFarm - jobs="" for variant in $VARIANTS; do @@ -154,18 +157,6 @@ jobs: } } - dotnet clean ArchiSteamFarm -c "$env:CONFIGURATION" -f "$env:NET_CORE_VERSION" --nologo - - if ($LastExitCode -ne 0) { - throw "Last command failed." - } - - dotnet restore ArchiSteamFarm - - if ($LastExitCode -ne 0) { - throw "Last command failed." - } - foreach ($variant in $env:VARIANTS.Split([char[]] $null, [System.StringSplitOptions]::RemoveEmptyEntries)) { Start-Job -Name "$variant" $PublishBlock -ArgumentList "$variant" } diff --git a/.travis.yml b/.travis.yml index 41e559a87..07fdb7fbf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,9 +31,12 @@ script: npm ci --no-progress --prefix ASF-ui npm run-script deploy --no-progress --prefix ASF-ui - dotnet build ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" --nologo - dotnet build ArchiSteamFarm.CustomPlugins.ExamplePlugin -c "$CONFIGURATION" -f "$NET_CORE_VERSION" --nologo - dotnet test ArchiSteamFarm.Tests -c "$CONFIGURATION" -f "$NET_CORE_VERSION" --nologo + dotnet build ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -p:UseAppHost=false --nologo + dotnet build ArchiSteamFarm.CustomPlugins.ExamplePlugin -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -p:UseAppHost=false --nologo + dotnet test ArchiSteamFarm.Tests -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -p:UseAppHost=false --nologo + + dotnet clean ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -p:UseAppHost=false --nologo + dotnet restore ArchiSteamFarm publish() { if [ "$1" = 'generic' ]; then @@ -50,9 +53,6 @@ script: fi } - dotnet clean ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" --nologo - dotnet restore ArchiSteamFarm - jobs="" for variant in $VARIANTS; do @@ -77,4 +77,4 @@ matrix: - os: osx # Ref: https://docs.travis-ci.com/user/reference/osx dotnet: 3.1.201 # For OSX, we need absolute dotnet version until https://github.com/dotnet/core-setup/issues/4187 is resolved - osx_image: xcode11.3 + osx_image: xcode11.4 diff --git a/appveyor.yml b/appveyor.yml index 07869cb89..8c16d93fa 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -98,7 +98,7 @@ build_script: } - dotnet build ArchiSteamFarm -c "$env:CONFIGURATION" -f "$env:NET_CORE_VERSION" --nologo + dotnet build ArchiSteamFarm -c "$env:CONFIGURATION" -f "$env:NET_CORE_VERSION" -p:UseAppHost=false --nologo if ($LastExitCode -ne 0) { @@ -106,7 +106,7 @@ build_script: } - dotnet build ArchiSteamFarm.CustomPlugins.ExamplePlugin -c "$env:CONFIGURATION" -f "$env:NET_CORE_VERSION" --nologo + dotnet build ArchiSteamFarm.CustomPlugins.ExamplePlugin -c "$env:CONFIGURATION" -f "$env:NET_CORE_VERSION" -p:UseAppHost=false --nologo if ($LastExitCode -ne 0) { @@ -121,7 +121,7 @@ test_script: $ProgressPreference = 'SilentlyContinue' - dotnet test ArchiSteamFarm.Tests -c "$env:CONFIGURATION" -f "$env:NET_CORE_VERSION" --nologo + dotnet test ArchiSteamFarm.Tests -c "$env:CONFIGURATION" -f "$env:NET_CORE_VERSION" -p:UseAppHost=false --nologo if ($LastExitCode -ne 0) { @@ -136,6 +136,22 @@ after_test: $ProgressPreference = 'SilentlyContinue' + dotnet clean ArchiSteamFarm -c "$env:CONFIGURATION" -f "$env:NET_CORE_VERSION" -p:UseAppHost=false --nologo + + + if ($LastExitCode -ne 0) { + throw "Last command failed." + } + + + dotnet restore ArchiSteamFarm + + + if ($LastExitCode -ne 0) { + throw "Last command failed." + } + + $PublishBlock = { param($variant) @@ -202,22 +218,6 @@ after_test: } - dotnet clean ArchiSteamFarm -c "$env:CONFIGURATION" -f "$env:NET_CORE_VERSION" --nologo - - - if ($LastExitCode -ne 0) { - throw "Last command failed." - } - - - dotnet restore ArchiSteamFarm - - - if ($LastExitCode -ne 0) { - throw "Last command failed." - } - - foreach ($variant in $env:VARIANTS.Split([char[]] $null, [System.StringSplitOptions]::RemoveEmptyEntries)) { Start-Job -Name "$variant" $PublishBlock -ArgumentList "$variant" }