forked from riok/SpiderEye
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
97 lines (94 loc) · 3.46 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
variables:
versionprefix: 0.1.0
buildConfiguration: 'Release'
jobs:
- job: 'BuildPackage'
strategy:
matrix:
linux-x64:
imageName: 'ubuntu-20.04'
rid: 'linux-x64'
mac-x64:
imageName: 'macos-11'
rid: 'osx-x64'
mac-arm64:
imageName: 'macos-11'
rid: 'osx-arm64'
windows-x64:
rid: 'win-x64'
imageName: 'windows-2019'
pool:
vmImage: $(imageName)
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core sdk'
inputs:
packageType: sdk
useGlobalJson: true
installationPath: $(Agent.ToolsDirectory)/dotnet
- task: CmdLine@2
displayName: 'Install linux dependencies'
condition: eq(variables.rid, 'linux-x64')
inputs:
script: 'sudo apt-get update && sudo apt-get install libgtk-3-dev libwebkit2gtk-4.0-dev'
- task: CmdLine@2
displayName: 'dotnet pack SpiderEye.Native'
inputs:
script: 'dotnet pack --runtime $(rid) --include-symbols --include-source -c $(buildConfiguration) Source/SpiderEye.Native/SpiderEye.Native.csproj -o ./artifacts /p:VersionPrefix=$(versionprefix) /p:VersionSuffix=$(Build.BuildNumber)'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: 'artifacts'
ArtifactName: 'artifacts-$(rid)'
publishLocation: 'Container'
- job: 'CombinePackages'
dependsOn: 'BuildPackage'
pool:
vmImage: 'ubuntu-20.04'
steps:
- task: DownloadBuildArtifacts@0
inputs:
downloadPath: 'artifacts'
artifactName: 'artifacts-win-x64'
- task: DownloadBuildArtifacts@0
inputs:
downloadPath: 'artifacts'
artifactName: 'artifacts-linux-x64'
- task: DownloadBuildArtifacts@0
inputs:
downloadPath: 'artifacts'
artifactName: 'artifacts-osx-x64'
- task: DownloadBuildArtifacts@0
inputs:
downloadPath: 'artifacts'
artifactName: 'artifacts-osx-arm64'
- task: CmdLine@2
inputs:
script: 'ls -R artifacts'
- task: CmdLine@2
displayName: 'Merge .nupkg files'
inputs:
script: 'sudo apt update && sudo apt -y install zipmerge && mkdir combined && zipmerge combined/Bildstein.SpiderEye.Native.$(versionprefix)-$(Build.BuildNumber).nupkg artifacts/*/Bildstein.SpiderEye.Native.$(versionprefix)-$(Build.BuildNumber).nupkg && zip --delete ./combined/Bildstein.SpiderEye.Native.$(versionprefix)-$(Build.BuildNumber).nupkg "lib/*"'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: 'combined'
ArtifactName: 'artifacts-combined'
publishLocation: 'Container'
- job: 'BuildCore'
pool:
vmImage: 'ubuntu-20.04'
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core sdk'
inputs:
packageType: sdk
useGlobalJson: true
installationPath: $(Agent.ToolsDirectory)/dotnet
- task: CmdLine@2
displayName: 'dotnet pack SpiderEye.Core'
inputs:
script: 'dotnet pack --include-symbols --include-source -c $(buildConfiguration) Source/SpiderEye.Core/SpiderEye.Core.csproj -o ./artifacts /p:VersionPrefix=$(versionprefix) /p:VersionSuffix=$(Build.BuildNumber)'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: 'artifacts'
ArtifactName: 'artifacts-core'
publishLocation: 'Container'