-
Notifications
You must be signed in to change notification settings - Fork 311
Expand file tree
/
Copy path.vsts-ci.yml
More file actions
164 lines (148 loc) · 4.29 KB
/
.vsts-ci.yml
File metadata and controls
164 lines (148 loc) · 4.29 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
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
jobs:
- job: build
strategy:
matrix:
linux:
osName: 'Linux'
imageName: 'ubuntu-22.04'
mac:
osName: 'macOS'
imageName: 'macOS-14'
windows:
osName: 'Windows'
imageName: 'windows-latest'
displayName: Build
timeoutInMinutes: 180
pool:
vmImage: $(imageName)
steps:
# Prerequisites
- checkout: self
submodules: true
- task: Bash@3
displayName: Install tools
inputs:
targetType: inline
script: |
sudo apt-get -yq install dos2unix
condition: eq(variables.osName, 'Linux')
# Setup .NET
- task: UseDotNet@2
displayName: Install .NET 10.0 SDK for build
inputs:
packageType: 'sdk'
version: '10.0.x'
# Display version info
- task: PowerShell@2
displayName: Version Information
inputs:
targetType: inline
script: |
dotnet --info
try { msbuild -version } catch { }
try { mono --version } catch { }
# Build & Package
- powershell: ./make.ps1
displayName: Build
- powershell: ./make.ps1 package
displayName: Package
- task: CopyFiles@2
displayName: Copy Build Logs
inputs:
Contents: '*.binlog'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
condition: and(succeededOrFailed(), eq(variables['system.pullrequest.isfork'], false))
- task: CopyFiles@2
displayName: Copy Packages
inputs:
SourceFolder: '$(Build.Repository.LocalPath)/Package/Release/Packages'
Contents: |
**/*.nupkg
**/*.snupkg
**/*.zip
**/*.msi
**/*.deb
**/*.pkg
TargetFolder: '$(Build.ArtifactStagingDirectory)'
condition: and(succeededOrFailed(), eq(variables['system.pullrequest.isfork'], false))
- task: PublishBuildArtifacts@1
displayName: Publish Artifacts
inputs:
ArtifactName: '$(osName) Artifacts'
condition: and(succeededOrFailed(), eq(variables['system.pullrequest.isfork'], false))
- job: test
strategy:
matrix:
linux_net462:
osName: Linux
imageName: ubuntu-22.04
framework: net462
linux_net8_0:
osName: Linux
imageName: ubuntu-22.04
framework: net8.0
macos_net462:
osName: macOS
imageName: macOS-14
framework: net462
macos_net8_0:
osName: macOS
imageName: macOS-14
framework: net8.0
windows_net462:
osName: Windows
imageName: windows-latest
framework: net462
windows_net8_0:
osName: Windows
imageName: windows-latest
framework: net8.0
linux_net10_0:
osName: Linux
imageName: ubuntu-22.04
framework: net10.0
macos_net10_0:
osName: macOS
imageName: macOS-14
framework: net10.0
windows_net10_0:
osName: Windows
imageName: windows-latest
framework: net10.0
displayName: Test
timeoutInMinutes: 180
pool:
vmImage: $(imageName)
steps:
# Prerequisites
- checkout: self
submodules: true
# Setup .NET
- task: UseDotNet@2
displayName: Install .NET 10.0 SDK for build
inputs:
packageType: 'sdk'
version: '10.0.x'
- task: UseDotNet@2
displayName: Install .NET 9.0 runtime for testing
inputs:
packageType: 'runtime'
version: '9.0.x'
- task: UseDotNet@2
displayName: Install .NET 8.0 runtime for testing
inputs:
packageType: 'runtime'
version: '8.0.x'
# Build & Test
- powershell: ./make.ps1
displayName: Build
- powershell: ./make.ps1 -frameworks $(framework) test-all
displayName: Test ($(framework))
- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
testRunner: VSTest
testResultsFiles: '**/*.trx'
mergeTestResults: true
testRunTitle: $(osName) - $(framework)
condition: succeededOrFailed()