2017-02-23 17:50:57 +00:00
|
|
|
version: '{build}-{branch}'
|
2017-02-12 14:15:20 +00:00
|
|
|
pull_requests:
|
|
|
|
do_not_increment_build_number: true
|
2017-01-16 02:03:19 +00:00
|
|
|
skip_branch_with_pr: true
|
2019-08-31 09:08:57 +00:00
|
|
|
image: Visual Studio 2019
|
2016-04-20 23:09:52 +00:00
|
|
|
configuration: Release
|
|
|
|
clone_depth: 10
|
2017-06-30 01:54:48 +00:00
|
|
|
environment:
|
2020-11-10 22:22:57 +00:00
|
|
|
# DOTNET_CHANNEL: 5.0
|
2017-06-30 01:54:48 +00:00
|
|
|
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
2019-09-26 17:12:56 +00:00
|
|
|
DOTNET_INSTALL_DIR: C:\Program Files\dotnet
|
2020-09-28 19:46:17 +00:00
|
|
|
DOTNET_NOLOGO: true
|
2020-11-10 22:22:57 +00:00
|
|
|
DOTNET_SDK: 5.0.100
|
|
|
|
NET_CORE_VERSION: net5.0
|
2019-08-01 21:31:07 +00:00
|
|
|
NET_FRAMEWORK_VERSION: net48
|
2020-06-02 17:20:55 +00:00
|
|
|
NODE_JS_VERSION: lts
|
2020-06-13 12:45:41 +00:00
|
|
|
STEAM_TOKEN_DUMPER_NAME: ArchiSteamFarm.OfficialPlugins.SteamTokenDumper
|
2020-06-13 10:08:21 +00:00
|
|
|
STEAM_TOKEN_DUMPER_TOKEN:
|
|
|
|
secure: uttQUE9ZK7BIa9SIbDkpUTMx7Slnl3zAPkRNzE465YgwxLdLEwv6yYR5QXCSZolb5Qq23Z/LmZNGd3M6B0+hbx3waWOeW2AiWvfCcnUmuT+3wfLJsgLbf1g4agFS7zsDgeRPfnNMzOxD8etelnA5YOOUMNB3RLw3fIdznNd+Fs6R0Ou3/1UavDuHKkbh1+A5
|
2020-04-08 17:32:53 +00:00
|
|
|
VARIANTS: generic generic-netf linux-arm linux-arm64 linux-x64 osx-x64 win-x64 # NOTE: When modifying variants, don't forget to update ASF_VARIANT definitions in SharedInfo.cs!
|
2017-08-18 17:41:17 +00:00
|
|
|
matrix:
|
2018-04-17 08:59:06 +00:00
|
|
|
allow_failures:
|
2019-08-31 09:08:57 +00:00
|
|
|
- image: Visual Studio 2019 Preview
|
2017-08-18 17:41:17 +00:00
|
|
|
fast_finish: true
|
2018-09-22 23:52:19 +00:00
|
|
|
install:
|
|
|
|
- pwsh: >-
|
|
|
|
Set-StrictMode -Version Latest
|
|
|
|
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
|
|
|
|
$ProgressPreference = 'SilentlyContinue'
|
|
|
|
|
|
|
|
|
2019-12-18 21:09:33 +00:00
|
|
|
git submodule sync --recursive
|
2019-11-11 16:04:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
if ($LastExitCode -ne 0) {
|
|
|
|
throw "Last command failed."
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-09-22 23:52:19 +00:00
|
|
|
git submodule update --init --recursive
|
|
|
|
|
|
|
|
|
|
|
|
if ($LastExitCode -ne 0) {
|
|
|
|
throw "Last command failed."
|
|
|
|
}
|
2018-10-29 21:58:14 +00:00
|
|
|
|
2019-11-11 16:04:49 +00:00
|
|
|
|
2018-10-29 21:58:14 +00:00
|
|
|
if ($env:DOTNET_CHANNEL) {
|
2018-11-06 05:00:01 +00:00
|
|
|
dotnet --info
|
|
|
|
|
|
|
|
&([scriptblock]::Create((Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1'))) -Channel "$env:DOTNET_CHANNEL" -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath
|
2020-11-10 22:22:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ($env:DOTNET_SDK) {
|
|
|
|
dotnet --info
|
|
|
|
|
|
|
|
&([scriptblock]::Create((Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1'))) -Channel 'Current' -Version "$env:DOTNET_SDK" -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath
|
2018-10-29 21:58:14 +00:00
|
|
|
}
|
2020-06-02 17:20:55 +00:00
|
|
|
- ps: Install-Product node "$env:NODE_JS_VERSION"
|
2017-06-27 16:36:40 +00:00
|
|
|
before_build:
|
2018-03-17 17:06:30 +00:00
|
|
|
- pwsh: >-
|
2017-10-15 09:04:25 +00:00
|
|
|
Set-StrictMode -Version Latest
|
2017-10-15 09:45:05 +00:00
|
|
|
|
2017-08-18 17:41:17 +00:00
|
|
|
$ErrorActionPreference = 'Stop'
|
2017-10-15 09:45:05 +00:00
|
|
|
|
2017-10-15 09:04:25 +00:00
|
|
|
$ProgressPreference = 'SilentlyContinue'
|
2017-08-18 17:41:17 +00:00
|
|
|
|
2017-10-23 10:46:47 +00:00
|
|
|
|
2017-08-18 17:41:17 +00:00
|
|
|
dotnet --info
|
2018-05-19 19:48:26 +00:00
|
|
|
|
2018-07-04 20:55:34 +00:00
|
|
|
|
2019-06-01 14:03:52 +00:00
|
|
|
if ($LastExitCode -ne 0) {
|
|
|
|
throw "Last command failed."
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-09-30 23:21:50 +00:00
|
|
|
node -v
|
|
|
|
|
|
|
|
|
|
|
|
if ($LastExitCode -ne 0) {
|
|
|
|
throw "Last command failed."
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
npm -v
|
2019-06-01 14:03:52 +00:00
|
|
|
|
|
|
|
|
2018-05-19 19:48:26 +00:00
|
|
|
if ($LastExitCode -ne 0) {
|
2018-06-01 18:11:20 +00:00
|
|
|
throw "Last command failed."
|
2018-05-19 19:48:26 +00:00
|
|
|
}
|
2017-08-18 17:41:17 +00:00
|
|
|
build_script:
|
2018-03-17 17:06:30 +00:00
|
|
|
- pwsh: >-
|
2017-10-15 09:04:25 +00:00
|
|
|
Set-StrictMode -Version Latest
|
2017-10-15 09:45:05 +00:00
|
|
|
|
2017-08-18 17:41:17 +00:00
|
|
|
$ErrorActionPreference = 'Stop'
|
2017-10-15 09:45:05 +00:00
|
|
|
|
2017-10-15 09:04:25 +00:00
|
|
|
$ProgressPreference = 'SilentlyContinue'
|
2017-08-18 17:41:17 +00:00
|
|
|
|
2017-10-23 10:46:47 +00:00
|
|
|
|
2019-12-05 18:25:42 +00:00
|
|
|
npm ci --no-progress --prefix ASF-ui
|
2018-09-22 23:52:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
if ($LastExitCode -ne 0) {
|
|
|
|
throw "Last command failed."
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-12-05 18:25:42 +00:00
|
|
|
npm run-script deploy --no-progress --prefix ASF-ui
|
2018-09-22 23:52:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
if ($LastExitCode -ne 0) {
|
|
|
|
throw "Last command failed."
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-06-13 12:45:41 +00:00
|
|
|
dotnet build ArchiSteamFarm -c "$env:CONFIGURATION" -p:UseAppHost=false --nologo
|
2018-05-19 19:48:26 +00:00
|
|
|
|
2018-07-04 20:55:34 +00:00
|
|
|
|
2019-01-10 21:33:07 +00:00
|
|
|
if ($LastExitCode -ne 0) {
|
|
|
|
throw "Last command failed."
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-06-13 12:45:41 +00:00
|
|
|
dotnet build ArchiSteamFarm.CustomPlugins.ExamplePlugin -c "$env:CONFIGURATION" -p:UseAppHost=false --nologo
|
2019-01-10 21:33:07 +00:00
|
|
|
|
|
|
|
|
2020-05-22 09:48:02 +00:00
|
|
|
if ($LastExitCode -ne 0) {
|
|
|
|
throw "Last command failed."
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-06-13 12:45:41 +00:00
|
|
|
dotnet build ArchiSteamFarm.CustomPlugins.PeriodicGC -c "$env:CONFIGURATION" -p:UseAppHost=false --nologo
|
|
|
|
|
|
|
|
|
|
|
|
if ($LastExitCode -ne 0) {
|
|
|
|
throw "Last command failed."
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-06-15 11:45:17 +00:00
|
|
|
dotnet build "$env:STEAM_TOKEN_DUMPER_NAME" -c "$env:CONFIGURATION" -p:UseAppHost=false --nologo
|
2020-05-22 09:48:02 +00:00
|
|
|
|
|
|
|
|
2018-05-19 19:48:26 +00:00
|
|
|
if ($LastExitCode -ne 0) {
|
2018-06-01 18:11:20 +00:00
|
|
|
throw "Last command failed."
|
2018-05-19 19:48:26 +00:00
|
|
|
}
|
2017-08-18 17:41:17 +00:00
|
|
|
test_script:
|
2018-03-17 17:06:30 +00:00
|
|
|
- pwsh: >-
|
2017-10-15 09:04:25 +00:00
|
|
|
Set-StrictMode -Version Latest
|
2017-10-15 09:45:05 +00:00
|
|
|
|
2017-08-18 17:41:17 +00:00
|
|
|
$ErrorActionPreference = 'Stop'
|
2017-10-15 09:45:05 +00:00
|
|
|
|
2017-10-15 09:04:25 +00:00
|
|
|
$ProgressPreference = 'SilentlyContinue'
|
2017-08-18 17:41:17 +00:00
|
|
|
|
2017-10-23 10:46:47 +00:00
|
|
|
|
2020-06-13 12:45:41 +00:00
|
|
|
dotnet test ArchiSteamFarm.Tests -c "$env:CONFIGURATION" -p:UseAppHost=false --nologo
|
2018-05-19 19:48:26 +00:00
|
|
|
|
2018-07-04 20:55:34 +00:00
|
|
|
|
2018-05-19 19:48:26 +00:00
|
|
|
if ($LastExitCode -ne 0) {
|
2018-06-01 18:11:20 +00:00
|
|
|
throw "Last command failed."
|
2018-05-19 19:48:26 +00:00
|
|
|
}
|
2017-07-10 06:33:38 +00:00
|
|
|
after_test:
|
2018-03-17 17:06:30 +00:00
|
|
|
- pwsh: >-
|
2017-10-15 09:04:25 +00:00
|
|
|
Set-StrictMode -Version Latest
|
2017-10-15 09:45:05 +00:00
|
|
|
|
2017-06-30 05:54:18 +00:00
|
|
|
$ErrorActionPreference = 'Stop'
|
2017-10-15 09:45:05 +00:00
|
|
|
|
2017-10-15 09:04:25 +00:00
|
|
|
$ProgressPreference = 'SilentlyContinue'
|
2017-06-30 02:07:28 +00:00
|
|
|
|
2017-10-23 10:46:47 +00:00
|
|
|
|
2020-06-15 11:45:17 +00:00
|
|
|
if ((Test-Path env:STEAM_TOKEN_DUMPER_TOKEN) -and (Test-Path "$env:STEAM_TOKEN_DUMPER_NAME\SharedInfo.cs" -PathType Leaf)) {
|
|
|
|
(Get-Content "$env:STEAM_TOKEN_DUMPER_NAME\SharedInfo.cs").Replace('STEAM_TOKEN_DUMPER_TOKEN', "$env:STEAM_TOKEN_DUMPER_TOKEN") | Set-Content "$env:STEAM_TOKEN_DUMPER_NAME\SharedInfo.cs"
|
2020-06-13 14:14:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-06-13 12:45:41 +00:00
|
|
|
dotnet publish "$env:STEAM_TOKEN_DUMPER_NAME" -c "$env:CONFIGURATION" -f "$env:NET_CORE_VERSION" -o "out/$env:STEAM_TOKEN_DUMPER_NAME/$env:NET_CORE_VERSION" -p:UseAppHost=false --nologo
|
|
|
|
|
|
|
|
|
|
|
|
if ($LastExitCode -ne 0) {
|
|
|
|
throw "Last command failed."
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
dotnet publish "$env:STEAM_TOKEN_DUMPER_NAME" -c "$env:CONFIGURATION" -f "$env:NET_FRAMEWORK_VERSION" -o "out/$env:STEAM_TOKEN_DUMPER_NAME/$env:NET_FRAMEWORK_VERSION" -p:UseAppHost=false --nologo
|
|
|
|
|
|
|
|
|
|
|
|
if ($LastExitCode -ne 0) {
|
|
|
|
throw "Last command failed."
|
|
|
|
}
|
|
|
|
|
|
|
|
dotnet clean ArchiSteamFarm -c "$env:CONFIGURATION" -p:UseAppHost=false --nologo
|
2020-05-09 23:04:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
if ($LastExitCode -ne 0) {
|
|
|
|
throw "Last command failed."
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
dotnet restore ArchiSteamFarm
|
|
|
|
|
|
|
|
|
|
|
|
if ($LastExitCode -ne 0) {
|
|
|
|
throw "Last command failed."
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-08-18 17:41:17 +00:00
|
|
|
$PublishBlock = {
|
2018-06-03 07:36:23 +00:00
|
|
|
param($variant)
|
2017-07-05 01:35:09 +00:00
|
|
|
|
2017-10-15 09:04:25 +00:00
|
|
|
Set-StrictMode -Version Latest
|
2017-08-18 17:41:17 +00:00
|
|
|
$ErrorActionPreference = 'Stop'
|
2017-10-15 09:04:25 +00:00
|
|
|
$ProgressPreference = 'SilentlyContinue'
|
2017-06-30 02:43:39 +00:00
|
|
|
|
2018-11-06 05:00:01 +00:00
|
|
|
Set-Location "$env:APPVEYOR_BUILD_FOLDER"
|
2017-07-05 01:35:09 +00:00
|
|
|
|
2018-06-03 07:36:23 +00:00
|
|
|
if ($variant -like '*-netf') {
|
|
|
|
$targetFramework = $env:NET_FRAMEWORK_VERSION
|
2017-08-18 17:41:17 +00:00
|
|
|
} else {
|
2018-06-03 07:36:23 +00:00
|
|
|
$targetFramework = $env:NET_CORE_VERSION
|
2018-06-03 05:51:20 +00:00
|
|
|
}
|
|
|
|
|
2018-06-03 07:36:23 +00:00
|
|
|
if ($variant -like 'generic*') {
|
2020-04-22 20:27:59 +00:00
|
|
|
$variantArgs = '-p:UseAppHost=false'
|
2018-06-03 05:51:20 +00:00
|
|
|
} else {
|
2020-05-15 15:43:09 +00:00
|
|
|
$variantArgs = '-p:PublishSingleFile=true', '-p:PublishTrimmed=true', '-r', "$variant"
|
2017-08-18 17:41:17 +00:00
|
|
|
}
|
2017-06-30 05:54:18 +00:00
|
|
|
|
2020-04-22 20:27:59 +00:00
|
|
|
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -f "$targetFramework" -o "out\$variant" "-p:ASFVariant=$variant" --no-restore --nologo $variantArgs
|
2019-12-07 22:55:44 +00:00
|
|
|
|
2018-05-19 19:48:26 +00:00
|
|
|
if ($LastExitCode -ne 0) {
|
2018-06-01 18:11:20 +00:00
|
|
|
throw "Last command failed."
|
2018-05-19 19:48:26 +00:00
|
|
|
}
|
|
|
|
|
2020-06-13 12:45:41 +00:00
|
|
|
# If we're including any overlay for this variant, copy it to output directory
|
2019-01-12 01:00:19 +00:00
|
|
|
if (Test-Path "ArchiSteamFarm\overlay\$variant" -PathType Container) {
|
2019-09-26 17:12:56 +00:00
|
|
|
Copy-Item "ArchiSteamFarm\overlay\$variant\*" "out\$variant"
|
2017-09-23 02:43:27 +00:00
|
|
|
}
|
|
|
|
|
2020-06-13 12:45:41 +00:00
|
|
|
# If we're including SteamTokenDumper plugin for this framework, copy it to output directory
|
|
|
|
if (Test-Path "out\$env:STEAM_TOKEN_DUMPER_NAME\$targetFramework\$env:STEAM_TOKEN_DUMPER_NAME.dll" -PathType Leaf) {
|
|
|
|
if (!(Test-Path "out\$variant\plugins\$env:STEAM_TOKEN_DUMPER_NAME" -PathType Container)) {
|
|
|
|
New-Item -ItemType Directory -Path "out\$variant\plugins\$env:STEAM_TOKEN_DUMPER_NAME" > $null
|
|
|
|
}
|
|
|
|
|
|
|
|
Copy-Item "out\$env:STEAM_TOKEN_DUMPER_NAME\$targetFramework\$env:STEAM_TOKEN_DUMPER_NAME.dll" "out\$variant\plugins\$env:STEAM_TOKEN_DUMPER_NAME"
|
|
|
|
}
|
|
|
|
|
2020-07-31 18:35:28 +00:00
|
|
|
# Icon is available only in .NET Framework and .NET Core Windows build, we'll bundle the .ico file for other flavours
|
|
|
|
if (($targetFramework -eq "$env:NET_CORE_VERSION") -and !(Test-Path "out\$variant\ArchiSteamFarm.exe" -PathType Leaf)) {
|
|
|
|
Copy-Item 'resources\ASF.ico' "out\$variant\ArchiSteamFarm.ico"
|
2017-09-27 00:58:57 +00:00
|
|
|
}
|
|
|
|
|
2018-07-04 03:43:51 +00:00
|
|
|
# By default use fastest compression
|
|
|
|
$compressionArgs = '-mx=1'
|
|
|
|
|
|
|
|
# Include extra logic for builds marked for release
|
2017-09-26 04:30:20 +00:00
|
|
|
if ($env:APPVEYOR_REPO_TAG -eq 'true') {
|
2017-09-28 03:07:23 +00:00
|
|
|
# Update link in Changelog.html accordingly
|
2019-09-26 17:12:56 +00:00
|
|
|
if (Test-Path "out\$variant\Changelog.html" -PathType Leaf) {
|
|
|
|
(Get-Content "out\$variant\Changelog.html").Replace('ArchiSteamFarm/commits/master', "ArchiSteamFarm/releases/tag/$env:APPVEYOR_REPO_TAG_NAME") | Set-Content "out\$variant\Changelog.html"
|
2017-09-28 03:07:23 +00:00
|
|
|
}
|
2017-09-26 04:30:20 +00:00
|
|
|
}
|
|
|
|
|
2020-04-10 17:33:31 +00:00
|
|
|
7z a -bd -slp -tzip -mm=Deflate $compressionArgs "out\ASF-$variant.zip" "$env:APPVEYOR_BUILD_FOLDER\out\$variant\*"
|
2018-05-19 19:48:26 +00:00
|
|
|
|
|
|
|
if ($LastExitCode -ne 0) {
|
2018-06-01 18:11:20 +00:00
|
|
|
throw "Last command failed."
|
2018-05-19 19:48:26 +00:00
|
|
|
}
|
|
|
|
|
2018-07-13 10:15:35 +00:00
|
|
|
# TODO: Change me to Push-AppveyorArtifact once https://github.com/appveyor/ci/issues/2183 is fixed
|
2019-09-26 17:12:56 +00:00
|
|
|
appveyor PushArtifact "out\ASF-$variant.zip" -FileName "ASF-$variant.zip" -DeploymentName "ASF-$variant.zip"
|
2017-06-30 04:18:03 +00:00
|
|
|
}
|
2017-08-18 17:41:17 +00:00
|
|
|
|
2018-07-04 20:55:34 +00:00
|
|
|
|
2017-11-29 00:22:40 +00:00
|
|
|
foreach ($variant in $env:VARIANTS.Split([char[]] $null, [System.StringSplitOptions]::RemoveEmptyEntries)) {
|
2018-11-06 05:00:01 +00:00
|
|
|
Start-Job -Name "$variant" $PublishBlock -ArgumentList "$variant"
|
2017-08-18 17:41:17 +00:00
|
|
|
}
|
|
|
|
|
2018-07-04 20:55:34 +00:00
|
|
|
|
2018-11-06 05:00:01 +00:00
|
|
|
Get-Job | Receive-Job -Wait -AutoRemoveJob
|
2020-07-31 18:35:28 +00:00
|
|
|
deploy: off
|
2017-07-15 02:45:44 +00:00
|
|
|
notifications:
|
|
|
|
- provider: Webhook
|
|
|
|
url:
|
2017-07-15 03:21:25 +00:00
|
|
|
secure: i/og7KzkpbcWcKoUubrLH+KB6bkfqA55FHUlGxLepLmgZNQeNMiMoAFICOFY795fFrFfUNUKqwk7ApXE6HUyWMoiijLj7G/JBLTPkBiTCu8fZMTMqwQm6FiHB3+/0h0C+ukcrBEqnXYSQUh6znpKqJSTrIfXUQ7ftNuC966kBAw=
|
2017-07-15 02:45:44 +00:00
|
|
|
method: POST
|
|
|
|
body: >-
|
|
|
|
{
|
|
|
|
"avatar_url": "https://www.appveyor.com/assets/img/appveyor-logo-256.png",
|
|
|
|
"username": "AppVeyor",
|
2018-09-23 01:31:47 +00:00
|
|
|
"content": "[{{projectName}}:{{branch}}] {{commitMessage}} by {{commitAuthor}} ({{commitId}}) | **{{status}}** on {{buildUrl}}"
|
2017-07-15 02:45:44 +00:00
|
|
|
}
|
|
|
|
on_build_success: true
|
|
|
|
on_build_failure: true
|
2018-11-16 18:50:34 +00:00
|
|
|
on_build_status_changed: false
|