-
Notifications
You must be signed in to change notification settings - Fork 12
/
appveyor.yml
74 lines (60 loc) · 2.24 KB
/
appveyor.yml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
image:
- Visual Studio 2022
- Ubuntu
# ----------------
# ALL BUILD JOBS
# ----------------
skip_tags: false
test: off
for:
- # -----------------
# LINUX BUILD JOB
# -----------------
matrix:
only:
- image: Ubuntu
# build and run tests
build_script:
- uname -a
- ./build.sh
# upload test results
after_build:
- find "$APPVEYOR_BUILD_FOLDER/bin/Release" -type f -name '*TestResults.xml' -print0 | xargs -0 -I '{}' curl -F 'file=@{}' "https://ci.appveyor.com/api/testresults/nunit3/$APPVEYOR_JOB_ID"
# deployment is handled exclusively by the Windows build job (below)
deploy: off
- # -------------------
# WINDOWS BUILD JOB
# -------------------
matrix:
only:
- image: Visual Studio 2022
# update AppVeyor build version; this matters for deployments
init:
- ps: |
# https://www.appveyor.com/docs/build-worker-api/
# https://www.appveyor.com/docs/branches/
if ($env:APPVEYOR_REPO_TAG -eq "true")
{
Update-AppveyorBuild -Version ($env:APPVEYOR_REPO_TAG_NAME).TrimStart("v")
}
# build and run tests
build_script:
- cmd: build.cmd
# upload test results
after_build:
- ps: |
$wc = New-Object System.Net.WebClient
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path "artifacts\testresults\Release\Castle.Facilities.NHibernateIntegration.Tests_net9.0_TestResults.xml"))
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path "artifacts\testresults\Release\Castle.Facilities.NHibernateIntegration.Tests_net8.0_TestResults.xml"))
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path "artifacts\testresults\Release\Castle.Facilities.NHibernateIntegration.Tests_net48_TestResults.xml"))
# push packages to NuGet on tag builds
on_success:
- ps: |
if ($env:APPVEYOR_REPO_TAG -eq "true")
{
nuget push "artifacts\packages\Release\Castle.Facilities.NHibernateIntegration.${env:APPVEYOR_BUILD_VERSION}.nupkg" -ApiKey $env:NUGET_API_KEY -Source https://api.nuget.org/v3/index.json
}
# upload packages to AppVeyor
artifacts:
- path: artifacts\packages\Release\*.nupkg
name: net