This repository has been archived by the owner on Oct 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 66
/
azure-pipelines.yml
95 lines (93 loc) · 3.74 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
trigger:
branches:
include:
- main
- refs/tags/*
resources:
repositories:
- repository: internal-templates
type: github
name: xamarin/yaml-templates
endpoint: xamarin
ref: refs/heads/main
variables:
- group: Xamarin-Secrets
- name: Configuration
value: Release
- name: DotNetVersion
value: 6.0.100-preview.1.21103.13
- name: DotNet.Cli.Telemetry.OptOut
value: true
- name: Android.Msi
value: https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/net6/4451481/master/05bb8e0eae11ae6a73838b13cf91ee2433169dff/Microsoft.NET.Workload.Android.11.0.200.85.msi
- name: Android.Pkg
value: https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/net6/4451481/master/05bb8e0eae11ae6a73838b13cf91ee2433169dff/Microsoft.NET.Workload.Android-11.0.200-ci.master.85.pkg
- name: iOS.Msi
value: https://bosstoragemirror.azureedge.net/wrench/main/f01fde5cd9a7ffffcdc8d241200c35988700fa00/4449408/package/Microsoft.NET.Workload.iOS.14.3.100-ci.main.1079.msi
- name: iOS.Pkg
value: https://bosstoragemirror.azureedge.net/wrench/main/f01fde5cd9a7ffffcdc8d241200c35988700fa00/4449408/package/notarized/Microsoft.iOS.Bundle.14.3.100-ci.main.1079.pkg
- name: Codeql.Enabled
value: True
- name: Codeql.TSAEnabled
value: True
stages:
- stage: Build
jobs:
- job: buildWindows
pool:
name: AzurePipelines-EO
demands:
- ImageOverride -equals AzurePipelinesWindows2019compliant
variables:
LogDirectory: $(Build.ArtifactStagingDirectory)\logs
steps:
- powershell: |
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri "https://dot.net/v1/dotnet-install.ps1" -OutFile dotnet-install.ps1
& .\dotnet-install.ps1 -Version $(DotNetVersion) -InstallDir "$env:ProgramFiles\dotnet\" -Verbose
& dotnet --list-sdks
displayName: install .NET $(DotNetVersion)
errorActionPreference: stop
- powershell: |
& dotnet tool install --global boots
& boots $(Android.Msi)
& boots $(iOS.Msi)
displayName: install .NET workloads
errorActionPreference: stop
- powershell: |
& dotnet build Projects\OpenTK.Android\OpenTK.Android.csproj -c Debug -bl:$(LogDirectory)\Debug.binlog
& dotnet build Projects\OpenTK.Android\OpenTK.Android.csproj -c Release -bl:$(LogDirectory)\Release.binlog
displayName: build libraries
errorActionPreference: stop
- powershell: |
& dotnet pack Projects\OpenTK.Android\OpenTK.Android.csproj -c Release -bl:$(LogDirectory)\PackRelease.binlog
displayName: pack NuGet
errorActionPreference: stop
- task: CopyFiles@2
displayName: Copy nupkg
inputs:
contents: '*.nupkg'
targetFolder: $(Build.ArtifactStagingDirectory)
- task: CopyFiles@2
displayName: Copy SignList
inputs:
contents: 'SignList.xml'
targetFolder: $(Build.ArtifactStagingDirectory)
- task: CopyFiles@2
displayName: Copy snupkg
inputs:
contents: '*.snupkg'
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
displayName: upload artifacts
inputs:
artifactName: 'nuget'
pathtoPublish: $(Build.ArtifactStagingDirectory)
- stage: Publish
dependsOn: Build
condition: eq(variables['System.TeamProject'], 'devdiv') # only sign the packages when running on Windows, and using the private server which has the certificates
jobs:
- template: sign-artifacts/jobs/v2.yml@internal-templates
parameters:
signListPath: 'SignList.xml'
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')