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.humble.release.yml
238 lines (229 loc) · 10.1 KB
/
azure-pipelines.humble.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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
trigger:
batch: true
branches:
include:
- master
paths:
include:
- ros/humble/*
- ros/azure-pipelines.humble.release.yml
pr:
branches:
include:
- master
paths:
include:
- ros/humble/*
- ros/azure-pipelines.humble.release.yml
resources:
pipelines:
- pipeline: ms-iot.ros-external-vs2022
source: ms-iot.ros-external-vs2022
version: '20230207.1'
name: '$(Date:yyMMdd).$(Rev:rrrr)'
variables:
RELEASE_VERSION: $(Build.BuildNumber)
ROS_DISTRO: 'humble'
INSTALL_DIR: 'c:\opt\ros\humble\x64'
stages:
- stage: build
displayName: 'Build ${{ variables.ROS_DISTRO }}'
jobs:
- job: Build
pool: Edge-Robotics-VS2022-ESBuild
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.ros-external-vs2022
artifact: '${{ variables.ROS_DISTRO }}-external'
- task: ExtractFiles@1
inputs:
archiveFilePatterns: '$(PIPELINE.WORKSPACE)\ms-iot.ros-external-vs2022\$(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: |
call %Build_SourcesDirectory%\ros\humble\patch.bat
- script: |
set CMAKE_FIND_USE_INSTALL_PREFIX=TRUE
set Python3_FIND_REGISTRY=FALSE
set PYTHONIOENCODING=utf-8
set PYTHONLEGACYWINDOWSSTDIO=utf-8
set PYTHON3_EXECUTABLE=%INSTALL_DIR%\python3.exe
set PYTHON_EXECUTABLE=%Python3_EXECUTABLE%
set Python3_ROOT_DIR=%INSTALL_DIR%
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
set PATH=%INSTALL_DIR%\Scripts;%INSTALL_DIR%;%INSTALL_DIR%\bin;%PATH%
where python
copy %Python3_EXECUTABLE% %INSTALL_DIR%\python3.exe
dir %INSTALL_DIR%
set
mkdir ws\src
pushd ws
vcs import --force --shallow --recursive src < %Build_SourcesDirectory%\ros\humble\humblemin.repos
vcs import --force --shallow --recursive src < %Build_SourcesDirectory%\ros\humble\humble_override.repos
dir src
xcopy /Y /S /I ..\ros\src_patch src
call ..\ros\humble\build.bat
popd
displayName: 'build humble'
- script: |
set PYTHONIOENCODING=utf-8
set PYTHONLEGACYWINDOWSSTDIO=utf-8
set PYTHON3_EXECUTABLE=%INSTALL_DIR%\python3.exe
set PYTHON_EXECUTABLE=%Python3_EXECUTABLE%
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
set PATH=%INSTALL_DIR%\Scripts;%INSTALL_DIR%;%INSTALL_DIR%\bin;%PATH%
call "%INSTALL_DIR%\setup.bat"
set
mkdir microros2_ws\src
pushd microros2_ws
vcs import --force --shallow --recursive src < %Build_SourcesDirectory%\ros\humble\microros.repos
:: two phase build because microros doesn't declare dependencies on _client correctly
colcon build --event-handlers=console_cohesion+ --merge-install --install-base %INSTALL_DIR% --packages-up-to microxrcedds_client --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING:BOOL=False -DBUILD_DOCS:BOOL=False -DCMAKE_PDB_OUTPUT_DIRECTORY=%PDB_OUTPUT_DIRECTORY% -DUAGENT_USE_SYSTEM_LOGGER=ON -DMICROROSAGENT_SUPERBUILD=OFF -DUAGENT_SUPERBUILD=OFF -DPython3_EXECUTABLE=%Python3_EXECUTABLE%
colcon build --event-handlers=console_cohesion+ --merge-install --install-base %INSTALL_DIR% --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING:BOOL=False -DBUILD_DOCS:BOOL=False -DCMAKE_PDB_OUTPUT_DIRECTORY=%PDB_OUTPUT_DIRECTORY% -DUAGENT_USE_SYSTEM_LOGGER=ON -DMICROROSAGENT_SUPERBUILD=OFF -DUAGENT_SUPERBUILD=OFF -DPython3_EXECUTABLE=%Python3_EXECUTABLE%
popd
displayName: 'build MicroROS2'
- script: |
set PYTHONIOENCODING=utf-8
set PYTHONLEGACYWINDOWSSTDIO=utf-8
set Python3_EXECUTABLE=%INSTALL_DIR%\python3.exe
set Python3_EXECUTABLE=%Python3_EXECUTABLE:\=/%
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
set PATH=%INSTALL_DIR%\Scripts;%INSTALL_DIR%;%INSTALL_DIR%\bin;%PATH%
call "%INSTALL_DIR%\setup.bat"
set
mkdir gz_ws\src
pushd gz_ws
vcs import --force --shallow --recursive src < %Build_SourcesDirectory%\ros\gazebo11\gazebo11.rosinstall
colcon build --event-handlers=console_cohesion+ --merge-install --install-base %INSTALL_DIR% --cmake-target install --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING:BOOL=False -DBUILD_DOCS:BOOL=False -DCMAKE_PDB_OUTPUT_DIRECTORY=%PDB_OUTPUT_DIRECTORY% -DPython3_EXECUTABLE=%Python3_EXECUTABLE%
popd
displayName: 'build gazebo'
- script: |
set PYTHONIOENCODING=utf-8
set PYTHONLEGACYWINDOWSSTDIO=utf-8
set Python3_EXECUTABLE=%INSTALL_DIR%\python3.exe
set Python3_EXECUTABLE=%Python3_EXECUTABLE:\=/%
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
set PATH=%INSTALL_DIR%\Scripts;%INSTALL_DIR%;%INSTALL_DIR%\bin;%PATH%
call "%INSTALL_DIR%\setup.bat"
set
mkdir nav2_ws\src
pushd nav2_ws
vcs import --force --shallow --recursive src < %Build_SourcesDirectory%\ros\humble\nav2.repos
colcon build --event-handlers=console_cohesion+ --merge-install --install-base %INSTALL_DIR% --cmake-target install --packages-skip nav2_system_tests --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING:BOOL=False -DBUILD_DOCS:BOOL=False -DCMAKE_PDB_OUTPUT_DIRECTORY=%PDB_OUTPUT_DIRECTORY% -DPython3_EXECUTABLE=%Python3_EXECUTABLE%
popd
displayName: 'build Nav2'
- script: |
set PYTHONIOENCODING=utf-8
set PYTHONLEGACYWINDOWSSTDIO=utf-8
set Python3_EXECUTABLE=%INSTALL_DIR%\python3.exe
set Python3_EXECUTABLE=%Python3_EXECUTABLE:\=/%
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
set PATH=%INSTALL_DIR%\Scripts;%INSTALL_DIR%;%INSTALL_DIR%\bin;%PATH%
call "%INSTALL_DIR%\setup.bat"
set
mkdir moveit2_ws\src
pushd moveit2_ws
vcs import --force --shallow --recursive src < %Build_SourcesDirectory%\ros\humble\moveit2.repos
colcon build --event-handlers=console_cohesion+ --merge-install --install-base %INSTALL_DIR% --cmake-target install --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING:BOOL=False -DBUILD_DOCS:BOOL=False -DCMAKE_PDB_OUTPUT_DIRECTORY=%PDB_OUTPUT_DIRECTORY% -DPython3_EXECUTABLE=%Python3_EXECUTABLE%
popd
displayName: 'build MoveIt2'
- powershell: |
& $(Build.Repository.LocalPath)\ros\collectDisclosures.ps1 -Path $Env:INSTALL_DIR -outputfile $Env:Build_SourcesDirectory\ros\humble\LICENSE.txt
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: .\ws\log
artifactName: '$(ROS_DISTRO)-log'
condition: always()
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: .\moveit2_ws\log
artifactName: 'moveit-$(ROS_DISTRO)-log'
condition: always()
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: .\moveit2_ws\log
artifactName: 'moveit-$(ROS_DISTRO)-log'
condition: always()
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: .\nav2_ws\log
artifactName: 'nav2-$(ROS_DISTRO)-log'
condition: always()
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: .\gz_ws\log
artifactName: 'gz-$(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: and(succeeded(), 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: and(succeeded(), 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: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
jobs:
- template: azure-pipelines.publish.release.yml
parameters:
ROS_DISTRO: ${{ variables.ROS_DISTRO }}