-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines.yml
105 lines (99 loc) · 3.75 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
variables:
MONO_VERSION: 5_18_1
XCODE_VERSION: 10.2.1
BUILD_NUMBER: $[counter('$(Build.SourceBranchName)_counter', 1)]
resources:
repositories:
- repository: xamarin-templates
type: github
name: xamarin/yaml-templates
endpoint: xamarin
jobs:
- job: build_windows
displayName: Build on Windows
timeoutInMinutes: 360
pool:
vmImage: vs2017-win2016
steps:
- checkout: self
submodules: recursive
- powershell: .\build.ps1
displayName: Run build
- task: PublishTestResults@2
displayName: Publish test results
condition: always()
inputs:
testResultsFormat: xUnit
testResultsFiles: output/test-results/*/TestResults.xml
testRunTitle: Windows Tests
- task: PublishBuildArtifacts@1
displayName: Publish the output
condition: always()
inputs:
artifactName: output_windows
pathToPublish: output
- task: PublishBuildArtifacts@1
displayName: Publish the NuGets
condition: always()
inputs:
artifactName: nuget
pathToPublish: output/nugets
# # Run some internal auditing
# - ${{ if eq(variables['System.TeamProject'], 'devdiv') }}:
# - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
# displayName: Component Detection - Log
# inputs:
# scanType: LogOnly
# - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
# displayName: Component Detection - Report
# - task: securedevelopmentteam.vss-secure-development-tools.build-task-policheck.PoliCheck@1
# displayName: 'PoliCheck'
# inputs:
# targetType: F
- job: build_macos
displayName: Build on macOS
timeoutInMinutes: 360
pool:
vmImage: macos-10.14
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: output/test-results/*/TestResults.xml
testRunTitle: macOS Tests
- task: PublishBuildArtifacts@1
displayName: Publish the output
condition: always()
inputs:
artifactName: output_macos
pathToPublish: output
# only sign the packages when running on Windows, and using the private server which has the certificates
- ${{ if eq(variables['System.TeamProject'], 'devdiv') }}:
- job: signing
displayName: Signing NuGets
dependsOn: build_windows
pool:
name: VSEng-XamarinCustom
demands:
- corpnet
condition: and(succeeded(), or(startsWith(variables['Build.SourceBranch'], 'refs/tags/'), eq(variables['Build.SourceBranch'], 'refs/heads/master')))
steps:
- checkout: none
- template: sign-artifacts.yml@xamarin-templates
parameters:
targetFolder: '$(Build.ArtifactStagingDirectory)/signed'
- task: PublishBuildArtifacts@1
displayName: 'Publish Signed NuGets'
inputs:
artifactName: nuget-signed
pathToPublish: '$(Build.ArtifactStagingDirectory)/signed'