This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 352
/
azure-pipelines.yaml
152 lines (141 loc) · 5.11 KB
/
azure-pipelines.yaml
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
# .NET Desktop
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net
variables:
MONO_VERSION: 5_16_0
XCODE_VERSION: 10.1
jobs:
- job: build_windows_vs2019
displayName: Build on Windows VS2019
pool:
vmImage: windows-2019
variables:
solution_source: './source/**/*.sln'
solution_samples: './samples/**/*.sln'
steps:
- checkout: self
submodules: recursive
- task: NuGetToolInstaller@0
displayName: 'Install NuGet'
- task: DotNetCoreInstaller@0
inputs:
version: '3.0.100-preview4-010963'
- task: DotNetCoreInstaller@0
displayName: 'Install .NET Core sdk 3.0'
inputs:
version: '3.0.100-preview4-010963'
- task: DotNetCoreInstaller@0
displayName: 'Install .NET Core sdk 2.2.300'
inputs:
version: '2.2.300'
# - script: dotnet dev-certs https --trust
- script: choco install visualstudio2019-workload-netcorebuildtools
- script: choco install dotnetcore-sdk --pre
- script: choco install dotnetcore-sdk
# - script: vs_buildtools.exe --add Microsoft.VisualStudio.Component.NuGet --quiet
- script: vs_enterprise.exe --add Microsoft.VisualStudio.Component.PortableLibrary
- task: UseDotNet@2
displayName: 'Use .NET Core SDK'
inputs:
packageType: sdk
version: 2.2.300
includePreviewVersions: true
installationPath: $(Agent.ToolsDirectory)/dotnet
#------------------------------------------------------------
- task: NuGetCommand@2
displayName: 'NuGet Restore Source'
inputs:
restoreSolution: '$(solution_source)'
- script: |
cd ./source/
dotnet restore
cd ../
displayName: 'dotnet restore Source'
- task: VSBuild@1
displayName: 'Build Source'
inputs:
solution: '$(solution_source)'
#------------------------------------------------------------
#------------------------------------------------------------
# - task: NuGetCommand@2
# displayName: 'NuGet Restore Samples'
# inputs:
# restoreSolution: '$(solution_samples)'
- script: |
cd ./samples/
dotnet restore
cd ../
displayName: 'dotnet restore Samples'
- task: VSBuild@1
displayName: 'Build Samples'
inputs:
solution: '$(solution_samples)'
#------------------------------------------------------------
- powershell: .\build.ps1 --target=nuget --verbosity=diagnostic
displayName: Run Cake Build
- job: build_windows_vs2017_quick_and_dirty
displayName: Build on Windows VS2017 Redth's Quick and Dirty
pool:
vmImage: vs2017-win2016
steps:
- task: NuGetCommand@2
displayName: 'NuGet restore'
inputs:
restoreSolution: 'source/Xamarin.Auth-Library.sln'
- task: MSBuild@1
displayName: 'Build solution source/Xamarin.Auth-Library.sln'
inputs:
solution: 'source/Xamarin.Auth-Library.sln'
configuration: Release
- task: NuGetCommand@2
displayName: 'NuGet Pack Xamarin.Auth'
inputs:
command: pack
packagesToPack: nuget/Xamarin.Auth.nuspec
basePath: '.\'
- task: NuGetCommand@2
displayName: 'NuGet Pack Xamarin.Auth.Extensions'
inputs:
command: pack
packagesToPack: nuget/Xamarin.Auth.Extensions.nuspec
basePath: '.\'
- task: NuGetCommand@2
displayName: 'NuGet Pack Xamarin.Auth.XamarinForms'
inputs:
command: pack
packagesToPack: nuget/Xamarin.Auth.XamarinForms.nuspec
basePath: '.\'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifacts'
inputs:
ArtifactName: nuget
- job: build_windows_vs2017
displayName: Build on Windows VS2017
pool:
vmImage: vs2017-win2016
steps:
- checkout: self
submodules: recursive
- powershell: .\build.ps1 --target=nuget --verbosity=diagnostic
displayName: Run Cake Build
- job: build_macos
displayName: Build on macOS VS4Mac
pool:
vmImage: macos-10.13
steps:
- checkout: self
submodules: recursive
- bash: sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh $(MONO_VERSION)
displayName: Switch to the latest Xamarin SDK
- bash: echo '##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]'/Applications/Xcode_$(XCODE_VERSION).app;sudo xcode-select --switch /Applications/Xcode_$(XCODE_VERSION).app/Contents/Developer
displayName: Switch to the latest Xcode
- bash: sh ./build.sh
displayName: Run build
- task: PublishTestResults@2
displayName: Publish test results
condition: always()
inputs:
testResultsFormat: xUnit
testResultsFiles: tests/**/TestResults/TestResults.xml
testRunTitle: macOS Tests