-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathazure-pipelines.yml
124 lines (108 loc) · 3.57 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
115
116
117
118
119
120
121
122
123
124
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- main
pool:
name: Azure Pipelines
vmImage: windows-latest
steps:
- task: ssplat.rust-build-release-tools.rust-installer-task.RustInstaller@1
displayName: 'Install Rust '
inputs:
rustVersion: 'ms-1.82'
additionalTargets: 'i686-pc-windows-msvc'
toolchainFeed: https://onedrive.pkgs.visualstudio.com/b52099a6-3b13-4b08-9270-a07884a10e3d/_packaging/RustTools/nuget/v3/index.json
cratesIoFeedOverride: sparse+https://onedrive.pkgs.visualstudio.com/b52099a6-3b13-4b08-9270-a07884a10e3d/_packaging/RustCratesIO/Cargo/index/
- script: |
cargo build --locked 2>&1
displayName: 'Build debug'
- script: |
cargo install junit-test
junit-test
copy junit.xml $(System.DefaultWorkingDirectory)\TEST-rust.xml
displayName: 'Test debug'
- task: PublishTestResults@2
displayName: 'Publish Test Results **/TEST-*.xml'
inputs:
mergeTestResults: true
- script: 'cargo build --locked --release 2>&1'
displayName: 'Build Release'
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '6.x'
- task: EsrpCodeSigning@5
inputs:
ConnectedServiceName: 'ESRP CodeSigningV2-OneDrive Service'
AppRegistrationClientId: 'bd3fbc52-4cf5-4cca-a25d-94160e5ed309'
AppRegistrationTenantId: 'cdc5aeea-15c5-4db6-b079-fcadd2505dc2'
AuthAKVName: 'ODSP-ESRP'
AuthCertName: 'ODSP-ESRP-Auth-V2'
AuthSignCertName: 'CodeSigningCertificate'
FolderPath: '$(Build.SourcesDirectory)'
Pattern: '
target\debug\preflate_rs.dll,
target\debug\preflate_util.exe,
target\release\preflate_rs.dll,
target\release\preflate_util.exe'
signConfigType: 'inlineSignParams'
inlineOperation: |
[
{
"KeyCode": "CP-401405",
"OperationCode": "SigntoolSign",
"ToolName": "sign",
"ToolVersion": "1.0",
"Parameters": {
"OpusName": "Microsoft",
"OpusInfo": "https://www.microsoft.com",
"FileDigest": "/fd SHA256",
"PageHash": "/NPH",
"TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
}
},
{
"KeyCode": "CP-401405",
"OperationCode": "SigntoolVerify",
"ToolName": "sign",
"ToolVersion": "1.0",
"Parameters": {}
}
]
SessionTimeout: '60'
MaxConcurrency: '50'
MaxRetryAttempts: '5'
PendingAnalysisWaitTimeoutMinutes: '5'
- task: CopyFiles@2
displayName: 'Copy Rust output files to: $(Build.ArtifactStagingDirectory) copy'
inputs:
SourceFolder: '$(Build.SourcesDirectory)'
Contents: |
target\debug\?(*.dll|*.exe|*.pdb)
target\release\?(*.dll|*.exe|*.pdb)
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact'
inputs:
ArtifactName: 'drop_preflate_rs'
- task: PublishSymbols@2
displayName: 'Publish symbols copy'
inputs:
SymbolsFolder: '$(Build.ArtifactStagingDirectory)'
SearchPattern: '**\*.pdb'
SymbolServerType: TeamServices
- task: NuGetCommand@2
displayName: 'NuGet pack'
inputs:
command: pack
packagesToPack: package/PreflateRs.nuspec
- task: NuGetCommand@2
displayName: 'NuGet push'
inputs:
command: push
packagesToPush: '$(Build.ArtifactStagingDirectory)\*.nupkg'
publishVstsFeed: 'b87285d9-99ab-48db-a000-cb0cc8a2a1b5'
allowPackageConflicts: true
condition: and(succeeded(), in(variables['Build.Reason'], 'Manual'))