mirror of
https://github.com/JustArchiNET/ArchiSteamFarm
synced 2024-11-10 07:04:27 +00:00
AppVeyor/Travis: 2.0.0 runtime updates (#619)
This commit is contained in:
parent
40e8d85359
commit
6d1ea0b20c
2 changed files with 67 additions and 24 deletions
23
.travis.yml
23
.travis.yml
|
@ -20,8 +20,10 @@ dotnet: 2.0.0
|
|||
|
||||
env:
|
||||
global:
|
||||
- CONFIGURATION: Release
|
||||
- DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
|
||||
- RUNTIMES="generic win-x64 linux-x64 linux-arm osx-x64" # https://github.com/travis-ci/travis-ci/issues/1444
|
||||
|
||||
before_script: dotnet restore
|
||||
|
||||
|
@ -29,20 +31,23 @@ script:
|
|||
- |
|
||||
set -e
|
||||
|
||||
RUNTIMES="generic win-x64 linux-x64 linux-arm osx-x64"
|
||||
dotnet build -c "$CONFIGURATION" -o 'out/source' --no-restore
|
||||
dotnet test ArchiSteamFarm.Tests -c "$CONFIGURATION" -o 'out/source' --no-build --no-restore
|
||||
|
||||
dotnet build -c Release --no-restore
|
||||
dotnet test ArchiSteamFarm.Tests -c Release --no-build --no-restore
|
||||
|
||||
for RUNTIME in $RUNTIMES; do
|
||||
if [ "$RUNTIME" = "generic" ]; then
|
||||
dotnet publish ArchiSteamFarm -c Release -o "out/${RUNTIME}" --no-restore
|
||||
publish() {
|
||||
if [ "$1" = 'generic' ]; then
|
||||
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -o "out/${1}" --no-restore
|
||||
else
|
||||
dotnet publish ArchiSteamFarm -c Release -o "out/${RUNTIME}" -r "$RUNTIME" --no-restore
|
||||
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -o "out/${1}" -r "$1" --no-restore
|
||||
fi
|
||||
|
||||
echo "$RUNTIME" > "ArchiSteamFarm/out/${RUNTIME}/ArchiSteamFarm.version"
|
||||
echo "$1" > "ArchiSteamFarm/out/${1}/ArchiSteamFarm.version"
|
||||
}
|
||||
|
||||
for RUNTIME in $RUNTIMES; do
|
||||
publish "$RUNTIME" &
|
||||
done
|
||||
wait
|
||||
|
||||
matrix:
|
||||
# We can use fast finish, as we don't need to wait for allow_failures builds to mark build as success
|
||||
|
|
68
appveyor.yml
68
appveyor.yml
|
@ -10,34 +10,72 @@ configuration: Release
|
|||
platform: Any CPU
|
||||
clone_depth: 10
|
||||
environment:
|
||||
DOTNET_CHANNEL: release/2.0.0
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
|
||||
RUNTIMES: generic win-x64 linux-x64 linux-arm osx-x64
|
||||
matrix:
|
||||
fast_finish: true
|
||||
install:
|
||||
- ps: >-
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$env:DOTNET_INSTALL_DIR = "$pwd\.dotnetcli"
|
||||
|
||||
|
||||
New-Item '.\scripts\obtain' -ItemType 'directory' -Force
|
||||
|
||||
Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1' -OutFile '.\scripts\obtain\dotnet-install.ps1'
|
||||
|
||||
.\scripts\obtain\dotnet-install.ps1 -Channel "$env:DOTNET_CHANNEL" -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath
|
||||
|
||||
|
||||
$env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path"
|
||||
before_build:
|
||||
- ps: dotnet restore
|
||||
build:
|
||||
project: ArchiSteamFarm.sln
|
||||
parallel: true
|
||||
verbosity: minimal
|
||||
- ps: >-
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
dotnet --info
|
||||
|
||||
dotnet restore
|
||||
build_script:
|
||||
- ps: >-
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
dotnet build -c "$env:CONFIGURATION" -o 'out\source' --no-restore
|
||||
test_script:
|
||||
- ps: >-
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
dotnet test ArchiSteamFarm.Tests -c "$env:CONFIGURATION" -o 'out\source' --no-build --no-restore
|
||||
after_test:
|
||||
- ps: >-
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$PublishBlock = {
|
||||
param($RUNTIME)
|
||||
|
||||
$RUNTIMES = 'generic', 'win-x64', 'linux-x64', 'linux-arm', 'osx-x64'
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
Set-Location -Path "$env:APPVEYOR_BUILD_FOLDER"
|
||||
|
||||
foreach ($RUNTIME in $RUNTIMES) {
|
||||
if ($RUNTIME -eq 'generic') {
|
||||
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -o "out\$RUNTIME" --no-restore
|
||||
} else {
|
||||
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -o "out\$RUNTIME" -r "$RUNTIME" --no-restore
|
||||
}
|
||||
if ($RUNTIME -eq 'generic') {
|
||||
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -o "out\$RUNTIME" --no-restore
|
||||
} else {
|
||||
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -o "out\$RUNTIME" -r "$RUNTIME" --no-restore
|
||||
}
|
||||
|
||||
Set-Content -Path "ArchiSteamFarm\out\$RUNTIME\ArchiSteamFarm.version" -Value "$RUNTIME"
|
||||
Set-Content -Path "ArchiSteamFarm\out\$RUNTIME\ArchiSteamFarm.version" -Value "$RUNTIME"
|
||||
|
||||
7z a -bd -tzip -mm=Deflate64 -mx=5 "ArchiSteamFarm\out\ASF-$RUNTIME.zip" "$env:APPVEYOR_BUILD_FOLDER\ArchiSteamFarm\out\$RUNTIME\*"
|
||||
Push-AppveyorArtifact "ArchiSteamFarm\out\ASF-$RUNTIME.zip" -FileName "ASF-$RUNTIME.zip" -DeploymentName "ASF-$RUNTIME.zip"
|
||||
7z a -bd -tzip -mm=Deflate64 -mx=7 "ArchiSteamFarm\out\ASF-$RUNTIME.zip" "$env:APPVEYOR_BUILD_FOLDER\ArchiSteamFarm\out\$RUNTIME\*"
|
||||
Push-AppveyorArtifact "ArchiSteamFarm\out\ASF-$RUNTIME.zip" -FileName "ASF-$RUNTIME.zip" -DeploymentName "ASF-$RUNTIME.zip"
|
||||
}
|
||||
|
||||
foreach ($RUNTIME in $env:RUNTIMES.Split([char[]] $null, [System.StringSplitOptions]::RemoveEmptyEntries)) {
|
||||
Start-Job -Name "$RUNTIME" -ScriptBlock $PublishBlock -ArgumentList "$RUNTIME"
|
||||
}
|
||||
|
||||
Get-Job | Receive-Job -AutoRemoveJob -Wait
|
||||
deploy:
|
||||
- provider: GitHub
|
||||
tag: $(appveyor_repo_tag_name)
|
||||
|
|
Loading…
Reference in a new issue