This repository has been archived by the owner on Jul 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathazure-pipelines.foxy.release.yml
152 lines (144 loc) · 4.92 KB
/
azure-pipelines.foxy.release.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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
trigger:
batch: true
branches:
include:
- master
paths:
include:
- ros/foxy/*
- ros/azure-pipelines.foxy.release.yml
pr:
branches:
include:
- master
paths:
include:
- ros/foxy/*
- ros/azure-pipelines.foxy.release.yml
resources:
pipelines:
- pipeline: ms-iot.external
source: vNext/ms-iot.external
version: '20220930.2'
name: '$(Date:yyyyMMdd).$(Rev:rrrr)'
variables:
RELEASE_VERSION: $(Build.BuildNumber)
ROS_DISTRO: 'foxy'
INSTALL_DIR: 'c:\opt\ros\foxy\x64'
stages:
- stage: build
displayName: 'Build ${{ variables.ROS_DISTRO }}'
jobs:
- job: Build
pool: 'Edge-Robotics-VS2019-ES'
variables:
PDB_OUTPUT_DIRECTORY: 'd:\symbols'
ROS_VERSION: '2'
timeoutInMinutes: 360
workspace:
clean: all
steps:
- script: 'reg add HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f'
displayName: 'Enable long paths on Windows'
- download: ms-iot.external
artifact: '${{ variables.ROS_DISTRO }}-external'
- task: ExtractFiles@1
inputs:
archiveFilePatterns: '$(PIPELINE.WORKSPACE)\ms-iot.external\$(ROS_DISTRO)-external\external.zip'
destinationFolder: '$(INSTALL_DIR)'
cleanDestinationFolder: true
- script: |
rd /s /q %PDB_OUTPUT_DIRECTORY% 2>&1
mkdir %PDB_OUTPUT_DIRECTORY%
displayName: 'Clean symbols folder'
- script: |
rd /s /q %INSTALL_DIR%\include\kdl
rd /s /q %INSTALL_DIR%\share\orocos_kdl
rd /s /q %INSTALL_DIR%\share\orocos-kdl
DEL /F /Q %INSTALL_DIR%\lib\orocos-kdl.lib
DEL /F /Q %INSTALL_DIR%\lib\pkgconfig\orocos-kdl.pc
DEL /F /Q %INSTALL_DIR%\lib\pkgconfig\orocos_kdl.pc
displayName: 'Remove orocos-kdl'
- script: |
call %Build_SourcesDirectory%\ros\foxy\patch.bat
displayName: 'Pre-patch the install directory'
- script: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" 10.0.19041.0
set PATH=%INSTALL_DIR%\Scripts;%INSTALL_DIR%;%INSTALL_DIR%\bin;%PATH%
copy c:\opt\ros\foxy\x64\python.exe c:\opt\ros\foxy\x64\python3.exe
set
mkdir ws\src
cd ws
vcs import --force --shallow --recursive src < ..\ros\gazebo.rosinstall
vcs import --force --shallow --recursive src < ..\ros\foxy\foxy.repos
vcs import --force --shallow --recursive src < ..\ros\foxy\foxy_override.repos
xcopy /Y /S /I ..\ros\src_patch src
call ..\ros\foxy\build.bat
displayName: 'build foxy'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: .\ws\log
artifactName: '$(ROS_DISTRO)-log'
condition: always()
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(PDB_OUTPUT_DIRECTORY)'
includeRootFolder: false
archiveType: 'zip' # Options: zip, 7z, tar, wim
tarCompression: 'gz' # Optional. Options: gz, bz2, xz, none
archiveFile: '$(Build.ArtifactStagingDirectory)/symbols.zip'
replaceExistingArchive: true
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(INSTALL_DIR)'
includeRootFolder: false
archiveType: 'zip' # Options: zip, 7z, tar, wim
tarCompression: 'gz' # Optional. Options: gz, bz2, xz, none
archiveFile: '$(Build.ArtifactStagingDirectory)/install.zip'
replaceExistingArchive: true
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)/install.zip'
artifactName: '$(ROS_DISTRO)-install'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)/symbols.zip'
artifactName: '$(ROS_DISTRO)-symbols'
- stage: packaging
displayName: 'Packaging ${{ variables.ROS_DISTRO }}'
dependsOn:
- build
jobs:
- template: azure-pipelines.packaging.yml
parameters:
INSTALL_DIR: ${{ variables.INSTALL_DIR }}
ROS_DISTRO: ${{ variables.ROS_DISTRO }}
RELEASE_VERSION: ${{ variables.RELEASE_VERSION }}
PACKAGE_NAME: 'ros-${{ variables.ROS_DISTRO }}-desktop'
- stage: signing
displayName: 'Signing ${{ variables.ROS_DISTRO }}'
dependsOn:
- packaging
condition: ne(variables['Build.Reason'], 'PullRequest')
jobs:
- template: azure-pipelines.signing.yml
parameters:
ROS_DISTRO: ${{ variables.ROS_DISTRO }}
- stage: publish_prerelease
displayName: 'Publish Prerelase ${{ variables.ROS_DISTRO }}'
dependsOn:
- packaging
condition: ne(variables['Build.Reason'], 'PullRequest')
jobs:
- template: azure-pipelines.publish.prerelease.yml
parameters:
ROS_DISTRO: ${{ variables.ROS_DISTRO }}
- stage: publish_release
displayName: 'Publish Release ${{ variables.ROS_DISTRO }}'
dependsOn:
- packaging
condition: ne(variables['Build.Reason'], 'PullRequest')
jobs:
- template: azure-pipelines.publish.release.yml
parameters:
ROS_DISTRO: ${{ variables.ROS_DISTRO }}