-
-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathappveyor.yml
More file actions
48 lines (48 loc) · 2.1 KB
/
Copy pathappveyor.yml
File metadata and controls
48 lines (48 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
image:
- Visual Studio 2022
#- macOS
#- Ubuntu
environment:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
build_script:
- pwsh: |
if ($isWindows) {
Invoke-WebRequest "https://dot.net/v1/dotnet-install.ps1" -OutFile "./dotnet-install.ps1"
./dotnet-install.ps1 -JSonFile global.json -Architecture x64 -InstallDir 'C:\Program Files\dotnet'
dotnet build src --configuration Release
dotnet test --solution src/DiffEngine.slnx --configuration Release --no-build --no-restore --report-trx
$testExit = $LASTEXITCODE
dotnet publish src/DiffEngine.AotTests/DiffEngine.AotTests.csproj --configuration Release
}
else {
Invoke-WebRequest "https://dot.net/v1/dotnet-install.sh" -OutFile "./dotnet-install.sh"
sudo chmod u+x dotnet-install.sh
if ($isMacOS) {
sudo ./dotnet-install.sh --jsonfile global.json --architecture x64 --install-dir '/usr/local/share/dotnet'
} else {
sudo ./dotnet-install.sh --jsonfile global.json --architecture x64 --install-dir '/usr/share/dotnet'
}
dotnet build src --configuration Release-NotWindows
dotnet test --solution src/DiffEngine.slnx --configuration Release-NotWindows --no-build --no-restore --report-trx
$testExit = $LASTEXITCODE
dotnet publish src/DiffEngine.AotTests/DiffEngine.AotTests.csproj --configuration Release-NotWindows
}
$url = "https://ci.appveyor.com/api/testresults/mstest/$($env:APPVEYOR_JOB_ID)"
Get-ChildItem -Recurse -Filter *.trx | ForEach-Object {
Write-Host "Uploading test results: $($_.FullName)"
try { (New-Object System.Net.WebClient).UploadFile($url, $_.FullName) }
catch { Write-Host "Failed to upload test results: $_" }
}
# Captured before the publish step so a test failure is not masked by it.
if ($testExit -ne 0) { exit $testExit }
on_failure:
- ps: |
$root = (Get-Location).Path
Get-ChildItem *.received.* -Recurse | % {
$rel = $_.FullName.Substring($root.Length + 1)
Push-AppveyorArtifact $_.FullName -FileName $rel
}
test: off
artifacts:
- path: nugets\*.nupkg