-
Notifications
You must be signed in to change notification settings - Fork 111
/
Copy path.appveyor.yml
137 lines (119 loc) · 7.66 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# Appveyor configuration file
# Suggested by https://github.com/kf6kjg in https://github.com/luca-piccioni/OpenGL.Net/issues/44; great idea
init:
- ps: if ($env:APPVEYOR_REPO_TAG -eq "true") { $env:TAG_VERSION = "$env:APPVEYOR_REPO_TAG_NAME" } else { $env:TAG_VERSION = "v0.5.0.$env:APPVEYOR_BUILD_NUMBER-alpha" }
- ps: $env:TAG_VERSION = $env:TAG_VERSION -replace 'v',''
- ps: Write-Host "Setting version to '$env:TAG_VERSION'"
- ps: Update-AppveyorBuild -Version "$env:TAG_VERSION"
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
SLN_PATH: OpenGL.Net_VC14.sln
SLN_BUILD_OPTS: /nologo /verbosity:quiet /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
PUBLISH_NUGET: true
HAS_NETCORE: false
# - APPVEYOR_BUILD_WORKER_IMAGE: Previous Visual Studio 2017
# SLN_PATH: OpenGL.Net_VC15.sln
# SLN_BUILD_OPTS: /nologo /verbosity:quiet /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
# PUBLISH_NUGET: true
# HAS_NETCORE: true
# - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
# SLN_PATH: OpenGL.Net_Mono.sln
# SLN_BUILD_OPTS: /nologo /verbosity:quiet
# PUBLISH_NUGET: false
# HAS_NETCORE: false
pull_requests:
do_not_increment_build_number: true
matrix:
fast_finish: false
skip_commits:
message: /Update README.md/
cache:
- packages -> **\packages.config
- '%LocalAppData%\NuGet\Cache'
assembly_info:
patch: true
file: AssemblyInfo.*
assembly_version: "{version}"
assembly_file_version: "{version}"
assembly_informational_version: "{version}"
before_build:
- sh: sudo DEBIAN_FRONTEND=noninteractive apt-get -yq install nuget
- sh: sudo nuget update -self
- sh: sudo nuget restore $SLN_PATH
- sh: sudo nuget restore OpenGL.Net_VC14.sln
- cmd: nuget restore %SLN_PATH%
build_script:
- sh: msbuild $SLN_PATH $SLN_BUILD_OPTS /p:Configuration=Release /p:Platform="Any CPU"
- sh: msbuild $SLN_PATH $SLN_BUILD_OPTS /p:Configuration=Release /p:Platform="x86"
- sh: msbuild $SLN_PATH $SLN_BUILD_OPTS /p:Configuration=Release /p:Platform="x64"
- sh: msbuild $SLN_PATH $SLN_BUILD_OPTS /p:Configuration=Debug /p:Platform="Any CPU"
- sh: msbuild $SLN_PATH $SLN_BUILD_OPTS /p:Configuration=Debug /p:Platform="x86"
- sh: msbuild $SLN_PATH $SLN_BUILD_OPTS /p:Configuration=Debug /p:Platform="x64"
- sh: echo Build completed
- cmd: msbuild %SLN_PATH% %SLN_BUILD_OPTS% /p:Configuration=Release /p:Platform="Any CPU"
- cmd: msbuild %SLN_PATH% %SLN_BUILD_OPTS% /p:Configuration=Release /p:Platform="x86"
- cmd: msbuild %SLN_PATH% %SLN_BUILD_OPTS% /p:Configuration=Release /p:Platform="x64"
- cmd: msbuild %SLN_PATH% %SLN_BUILD_OPTS% /p:Configuration=Debug /p:Platform="Any CPU"
- cmd: msbuild %SLN_PATH% %SLN_BUILD_OPTS% /p:Configuration=Debug /p:Platform="x86"
- cmd: msbuild %SLN_PATH% %SLN_BUILD_OPTS% /p:Configuration=Debug /p:Platform="x64"
- cmd: echo Build completed
# Happy to have a GL 1.1 software driver ^^
test: off
test_script:
- sh: mono --version
- sh: msbuild OpenGL.Net.Test/OpenGL.Net.Test_net461.csproj $SLN_BUILD_OPTS /t:UnitTest /p:NUnitConsole=nunit3-console /p:NUnitResultFormat=";format=AppVeyor" /p:Configuration=Release /p:Platform="x86"
- sh: msbuild OpenGL.Net.Test/OpenGL.Net.Test_net461.csproj $SLN_BUILD_OPTS /t:UnitTest /p:NUnitConsole=nunit3-console /p:NUnitResultFormat=";format=AppVeyor" /p:Configuration=Release /p:Platform="x64"
- sh: msbuild OpenGL.Net.Test/OpenGL.Net.Test_net35.csproj $SLN_BUILD_OPTS /t:UnitTest /p:NUnitConsole=nunit3-console /p:NUnitResultFormat=";format=AppVeyor" /p:Configuration=Release /p:Platform="x86"
- sh: msbuild OpenGL.Net.Test/OpenGL.Net.Test_net35.csproj $SLN_BUILD_OPTS /t:UnitTest /p:NunitConsole=nunit3-console /p:NUnitResultFormat=";format=AppVeyor" /p:Configuration=Release /p:Platform="x64"
- sh: echo Unit tests completed
- cmd: msbuild OpenGL.Net.Test\OpenGL.Net.Test_net461.csproj %SLN_BUILD_OPTS% /t:UnitTest /p:NUnitConsole=nunit3-console /p:NUnitResultFormat=;format=AppVeyor /p:Configuration=Release /p:Platform="x86"
- cmd: msbuild OpenGL.Net.Test\OpenGL.Net.Test_net461.csproj %SLN_BUILD_OPTS% /t:UnitTest /p:NUnitConsole=nunit3-console /p:NUnitResultFormat=;format=AppVeyor /p:Configuration=Release /p:Platform="x64"
- cmd: msbuild OpenGL.Net.Test\OpenGL.Net.Test_net35.csproj %SLN_BUILD_OPTS% /t:UnitTest /p:NUnitConsole=nunit3-console /p:NUnitResultFormat=;format=AppVeyor /p:Configuration=Release /p:Platform="x86"
- cmd: msbuild OpenGL.Net.Test\OpenGL.Net.Test_net35.csproj %SLN_BUILD_OPTS% /t:UnitTest /p:NUnitConsole=nunit3-console /p:NUnitResultFormat=;format=AppVeyor /p:Configuration=Release /p:Platform="x64"
- cmd: msbuild OpenGL.Net.CoreUI.Test\OpenGL.Net.CoreUI.Test_net461.csproj %SLN_BUILD_OPTS% /t:UnitTest /p:NUnitConsole=nunit3-console /p:NUnitResultFormat=;format=AppVeyor /p:Configuration=Release /p:Platform="x86"
- cmd: msbuild OpenGL.Net.CoreUI.Test\OpenGL.Net.CoreUI.Test_net461.csproj %SLN_BUILD_OPTS% /t:UnitTest /p:NUnitConsole=nunit3-console /p:NUnitResultFormat=;format=AppVeyor /p:Configuration=Release /p:Platform="x64"
- cmd: echo Unit tests completed
after_test:
- cmd: msbuild OpenGL.Net.Test\OpenGL.Net.Test_net461.csproj %SLN_BUILD_OPTS% /t:Coverage /p:Configuration=Release /p:Platform="x86"
- cmd: msbuild OpenGL.Net.Test\OpenGL.Net.Test_net461.csproj %SLN_BUILD_OPTS% /t:Coverage /p:Configuration=Release /p:Platform="x64"
- cmd: msbuild OpenGL.Net.Test\OpenGL.Net.Test_net35.csproj %SLN_BUILD_OPTS% /t:Coverage /p:Configuration=Release /p:Platform="x86"
- cmd: msbuild OpenGL.Net.Test\OpenGL.Net.Test_net35.csproj %SLN_BUILD_OPTS% /t:Coverage /p:Configuration=Release /p:Platform="x64"
- cmd: msbuild OpenGL.Net.CoreUI.Test\OpenGL.Net.CoreUI.Test_net461.csproj %SLN_BUILD_OPTS% /t:Coverage /p:Configuration=Release /p:Platform="x86"
- cmd: msbuild OpenGL.Net.CoreUI.Test\OpenGL.Net.CoreUI.Test_net461.csproj %SLN_BUILD_OPTS% /t:Coverage /p:Configuration=Release /p:Platform="x64"
- cmd: pip install codecov
- ps: |
$covFiles = Get-ChildItem -Filter cov*.xml
foreach ($file in $covFiles) {
$path = $file.FullName
$idxTag = $path.IndexOf("_")
$idxPlatform = $path.LastIndexOf("\")
$platform = $path.Substring($idxPlatform + 4, 3)
$filter = "${platform}_$($path.Substring($idxTag+1).TrimEnd('.xml'))"
$ArgList = @(
'-f',"`"$path`""
'-F',"`"$filter`""
)
Start-Process -FilePath codecov -ArgumentList $ArgList
}
- cmd: IF "%PUBLISH_NUGET%"=="true" nuget pack OpenGL.Net.nuspec -Version %APPVEYOR_BUILD_VERSION%
- cmd: IF "%PUBLISH_NUGET%"=="true" nuget pack OpenGL.Net.Math.nuspec -Version %APPVEYOR_BUILD_VERSION%
- cmd: IF "%PUBLISH_NUGET%"=="true" nuget pack OpenGL.Net.WinForms.nuspec -Version %APPVEYOR_BUILD_VERSION%
- cmd: IF "%PUBLISH_NUGET%"=="true" nuget pack OpenGL.Net.Xamarin.Android.nuspec -Version %APPVEYOR_BUILD_VERSION%
- cmd: IF "%PUBLISH_NUGET%"=="true" nuget pack OpenGL.Net.VideoCore.nuspec -Version %APPVEYOR_BUILD_VERSION%
- cmd: IF "%PUBLISH_NUGET%"=="true" nuget pack OpenGL.Net.CoreProfile.nuspec -Version %APPVEYOR_BUILD_VERSION%
- cmd: IF "%PUBLISH_NUGET%"=="true" nuget pack OpenGL.Net.ES2Profile.nuspec -Version %APPVEYOR_BUILD_VERSION%
- cmd: IF "%PUBLISH_NUGET%"=="true" nuget pack OpenGL.Net.CoreUI.nuspec -Version %APPVEYOR_BUILD_VERSION%
# - cmd: IF "%PUBLISH_NUGET%"=="true" nuget pack OpenGL.Net.Objects.nuspec -Version %APPVEYOR_BUILD_VERSION%
artifacts:
- path: '*.nupkg'
deploy:
- provider: NuGet
name: nuget_release
api_key:
secure: hsqF28ceXmiIE0aa6mNKtvNJJuvRx0wRbbj7M8I9UiktTv8m3pjq5LCJpdAKYuPY
skip_symbols: true
on:
appveyor_repo_tag: true
nuget:
disable_publish_on_pr: true