Misc CI enhancements

This commit is contained in:
JustArchi 2020-05-10 01:04:25 +02:00
parent 8960478939
commit 38c9848509
3 changed files with 35 additions and 44 deletions

View file

@ -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"
}

View file

@ -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

View file

@ -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"
}