forked from mcneel/Eto.Toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
114 lines (98 loc) · 3.36 KB
/
azure-pipelines.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
variables:
solution: 'src/Eto.Toolkit.sln'
build.version: 'ci-$(Build.BuildNumber)'
build.configuration: 'Release'
build.basearguments: '/v:minimal /p:BuildVersion=$(build.version) /p:BuildBranch=$(Build.SourceBranch)'
build.arguments: '/restore /t:Build;Pack $(build.basearguments)'
build.dotnetversion: 3.1.100
build.xamarinversion: 6_6_0
trigger:
- master
- refs/tags/*
jobs:
- job: Mac
pool:
vmImage: 'macOS-10.14'
variables:
build.platform: 'Mac'
steps:
- checkout: self
submodules: true
- script: sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh $(build.xamarinversion)
displayName: 'Select Xamarin SDK version'
- task: UseDotNet@2
displayName: Install .NET Core SDK
inputs:
packageType: sdk
version: $(build.dotnetversion)
- task: MSBuild@1
displayName: Restore, Build and Package
inputs:
solution: '$(solution)'
platform: '$(build.platform)'
configuration: '$(build.configuration)'
msbuildArguments: '$(build.arguments)'
- task: PublishBuildArtifacts@1
displayName: Publish nupkg
inputs:
pathtoPublish: artifacts/nuget/$(build.configuration)
artifactName: nuget
publishLocation: container
- task: CopyFiles@2
displayName: Copy Eto.UnitTest.Desktop.app
inputs:
sourceFolder: artifacts/core/$(build.configuration)/net461
contents: Eto.UnitTest.Desktop.app/**
targetFolder: $(Build.ArtifactStagingDirectory)/dmg
- script: hdiutil create -fs HFS+ -srcfolder "$(Build.ArtifactStagingDirectory)/dmg" -volname "Eto.UnitTest.Desktop" "$(Build.ArtifactStagingDirectory)/Eto.UnitTest.Desktop.dmg"
displayName: 'Create Eto.UnitTest.Desktop.dmg'
- task: PublishBuildArtifacts@1
displayName: Publish Eto.UnitTest.Desktop for Mac
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/Eto.UnitTest.Desktop.dmg
artifactName: Eto.UnitTest
publishLocation: container
- job: Windows
pool:
vmImage: 'windows-2019'
variables:
build.platform: 'Windows'
steps:
- checkout: self
submodules: true
- task: UseDotNet@2
displayName: Install .NET Core SDK
inputs:
packageType: sdk
version: $(build.dotnetversion)
- task: MSBuild@1
displayName: Restore, Build and Package
inputs:
solution: '$(solution)'
platform: '$(build.platform)'
configuration: '$(build.configuration)'
msbuildArguments: '/t:Build;Pack $(build.arguments)'
- task: MSBuild@1
displayName: Publish Eto.UnitTest.Desktop
inputs:
solution: 'src/Eto.UnitTest.Desktop/Eto.UnitTest.Desktop.csproj'
platform: '$(build.platform)'
configuration: '$(build.configuration)'
msbuildArguments: '/t:Publish $(build.basearguments)'
- task: PublishBuildArtifacts@1
displayName: Publish nupkg
inputs:
pathtoPublish: artifacts/nuget/$(build.configuration)
artifactName: nuget
publishLocation: container
- task: CopyFiles@2
displayName: Copy Eto.UnitTest.Desktop
inputs:
sourceFolder: artifacts/core/Windows/$(build.configuration)/net461/publish
targetFolder: $(Build.ArtifactStagingDirectory)/Eto.UnitTest.Desktop/
- task: PublishBuildArtifacts@1
displayName: Publish Eto.UnitTest.Desktop
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)
artifactName: Eto.UnitTest
publishLocation: container