forked from OPCFoundation/UA-.NETStandard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
91 lines (68 loc) · 2.4 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#---------------------------------#
# general configuration #
#---------------------------------#
# version format
version: 1.4.364.{build}-{branch}
# branches to build
branches:
# blacklist
except:
- gh-pages
#---------------------------------#
# environment configuration #
#---------------------------------#
# Build worker image (VM template)
image: Visual Studio 2019
# scripts that are called at very beginning, before repo cloning
init:
- git config --global core.autocrlf input
# clone directory
clone_folder: c:\projects\UA-.NetStandard
environment:
matrix:
- solution_name: "UA Core Library.sln"
test_name: "void"
param: ""
- solution_name: "UA Reference.sln"
test_name: "void"
param: ""
- solution_name: "UA Reference.sln"
test_name: "void"
param: "/p:NoHttps=true"
# this is how to allow failing jobs in the matrix
matrix:
fast_finish: false # set this flag to immediately finish build once one of the jobs fails.
# scripts to run before build
before_build:
- nuget restore "%solution_name%"
# scripts to run *after* solution is built and *before* automatic packaging occurs (web apps, NuGet packages, Azure Cloud Services)
before_package:
# scripts to run after build
after_build:
# to run your custom scripts instead of automatic MSBuild
build_script:
- msbuild "%solution_name%" %param% /p:Configuration=Debug /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- msbuild "%solution_name%" %param% /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
# test
test:
test_script:
- if NOT "%test_name%" == "void" ( dotnet test "%test_name%" )
# TODO nunit3-console v3.6 cannot load csproj, enable when newer version is available
# - if NOT "%test_name%" == "void" ( nunit3-console "%test_name%" --result=./myresults.xml;format=AppVeyor )
# - $wc = New-Object 'System.Net.WebClient'
# - $wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit3/$($env:APPVEYOR_JOB_ID)", (Resolve-Path ./myresults.xml))
# build cache to preserve files/folders between builds
cache:
- packages -> **\packages.config
#---------------------------------#
# global handlers #
#---------------------------------#
# on successful build
on_success:
- echo on_success
# on build failure
on_failure:
- echo on_failure
# after build failure or success
on_finish:
- echo on_finish