forked from microsoft/lepton_jpeg_rust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
76 lines (62 loc) · 2.06 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
# 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.68'
authenticationToken: $(RustInstallerToken)
additionalTargets: 'i686-pc-windows-msvc'
- script: |
cargo build --locked 2>&1
displayName: 'Build debug'
- script: |
cargo test --locked --lib -- -Z unstable-options --report-time --format junit 1> $(System.DefaultWorkingDirectory)\TEST-rust.xml
echo content of xml
type $(System.DefaultWorkingDirectory)\TEST-rust.xml
echo end
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: 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_lepton_jpeg_rust'
- 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/Lepton.Jpeg.Rust.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'))