-
Notifications
You must be signed in to change notification settings - Fork 1
329 lines (280 loc) · 12.5 KB
/
build_dev_utils.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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
# This Workflow builds an artifact with dev-utils and Fast DDS installed.
# This is used by other workflows in this and other repositories to avoid compiling dependencies every time they are needed.
#
# DESCRIPTION:
# First, this workflow downloads the last successful build of Fast DDS downloaded from build_fastdds workflow artifacts.
# This workflow takes a .repos file from "./.github/workflows/configurations/dev_utils/dependencies.repos" (in this same repository) and downloads the repositories included.
# Then uses the colcon.meta files in "./.github/workflows/configurations/metas/<os>/colcon.meta" to build projects.
# Finally it takes the install directory generated from colcon build and uploads it as an artifact.
# The result artifact also contains Fast DDS installed project.
# This is done for several OS and cmake built types:
# - ubuntu-22.04 | ubuntu-24.04 | windows-2019 | windows-2022
# - Debug | Release
#
# ARTIFACT RESULT:
# The artifact generated is called "build_dev_utils_<os>_<cmake_build_type><postfix>"
# - <os> is "ubuntu-22.04", "ubuntu-24.04", "windows-2019", or "windows-2022"
# - <cmake_build_type> is "Debug", or "Release"
# - <postfix> is "_nightly" for schedule runs every night, or is set manually from user.
#
# SCHEDULE:
# This workflow runs every night at 00:00 using latest version of dev-utils (main).
# It waits till Fast DDS workflow has finished.
#
# MANUAL RUN & WORKFLOW CALL:
# Running this workflow manually or from another workflow, the following arguments might be set:
# single_version_build: flag to build only the custom version taken from inputs.
# If set to false, all versions of Fast DDS (v2 and v3) will be built.
#
# configuration_branch: set a branch to download colcon.meta from this repository [Default: main]
#
# artifacts_name_postfix: set the postfix name for the uploading artifact [Default: _manual]
# Note: do not use "_nightly" in this argument, or other workflows may be affected
#
# dev_utils_branch: branch, tag or commit of eProsima/dev-utils repository.
# Check available branches in https://github.com/eProsima/dev-utils.
#
# foonathan_memory_vendor_branch: branch, tag or commit of eProsima/foonathan_memory_vendor repository.
# Check available branches in https://github.com/eProsima/foonathan_memory_vendor.
#
# fastcdr_branch: branch, tag or commit of eProsima/Fast-CDR repository.
# Check available branches in https://github.com/eProsima/Fast-CDR.
#
# fastdds_branch: branch, tag or commit of eProsima/Fast-DDS repository.
# Check available branches in https://github.com/eProsima/Fast-DDS.
#
name: build_dev_utils
on:
workflow_call:
inputs:
single_version_build:
description: >
Flag to build only the custom version taken from inputs.
If set to false, all versions of Fast DDS (v2 and v3) will be built.
required: true
type: boolean
default: true
configuration_branch:
description: >
Branch or tag of eProsima-CI repository to get colcon.meta with which the workflow will be executed.
required: false
type: string
default: main
artifacts_name_postfix:
description: >
Addition to artifacts name creation (do not use _nightly postfix when creating artifacts with specific arguments).
required: false
type: string
default: _manual
dev_utils_branch:
description: >
Branch, tag or commit of eProsima/dev-utils repository.
Check available branches in https://github.com/eProsima/dev-utils.
required: false
type: string
default: main
foonathan_memory_vendor_branch:
description: >
Branch, tag or commit of eProsima/foonathan_memory_vendor repository.
Check available branches in https://github.com/eProsima/foonathan_memory_vendor.
required: false
type: string
default: master
fastcdr_branch:
description: >
Branch, tag or commit of eProsima/Fast-CDR repository.
Check available branches in https://github.com/eProsima/Fast-CDR.
required: false
type: string
default: master
fastdds_branch:
description: >
Branch, tag or commit of eProsima/Fast-DDS repository.
Check available branches in https://github.com/eProsima/Fast-DDS.
required: false
type: string
default: master
workflow_dispatch:
inputs:
single_version_build:
description: >
Flag to build only the custom version taken from inputs.
If set to false, all versions of Fast DDS (v2 and v3) will be built.
required: true
type: boolean
default: true
configuration_branch:
description: >
Branch or tag of eProsima-CI repository to get colcon.meta with which the workflow will be executed.
required: false
default: main
artifacts_name_postfix:
description: >
Addition to artifacts name creation (do not use _nightly postfix when creating artifacts with specific arguments).
required: false
default: _manual
dev_utils_branch:
description: >
Branch, tag or commit of eProsima/dev-utils repository.
Check available branches in https://github.com/eProsima/dev-utils.
required: false
default: main
foonathan_memory_vendor_branch:
description: >
Branch, tag or commit of eProsima/foonathan_memory_vendor repository.
Check available branches in https://github.com/eProsima/foonathan_memory_vendor.
required: false
type: string
default: master
fastcdr_branch:
description: >
Branch, tag or commit of eProsima/Fast-CDR repository.
Check available branches in https://github.com/eProsima/Fast-CDR.
required: false
type: string
default: master
fastdds_branch:
description: >
Branch, tag or commit of eProsima/Fast-DDS repository.
Check available branches in https://github.com/eProsima/Fast-DDS.
required: false
type: string
default: master
schedule:
# Every night at 00:00
- cron: '0 1 * * *'
env:
default_configuration_branch: main
default_artifact_postfix: _nightly
artifact_prefix: build_dev_utils
default_dev_utils_branch: main
jobs:
build_fastdds:
name: build_fastdds
uses: eProsima/eProsima-CI/.github/workflows/build_fastdds.yml@main
with:
single_version_build: ${{ inputs.single_version_build || false }}
configuration_branch: ${{ inputs.configuration_branch }}
artifacts_name_postfix: ${{ inputs.artifacts_name_postfix }}
foonathan_memory_vendor_branch: ${{ inputs.foonathan_memory_vendor_branch }}
fastcdr_branch: ${{ inputs.fastcdr_branch }}
fastdds_branch: ${{ inputs.fastdds_branch }}
build_dev_utils_single_version:
name: build_dev_utils
if: ${{ contains(inputs.single_version_build, 'true') }}
needs: build_fastdds
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
cmake_build_type:
- Release
- Debug
os:
- ubuntu-22.04
- ubuntu-24.04
- windows-2019
- windows-2022
# Windows env variables
env:
OPENSSL64_ROOT: "C:/Program Files/OpenSSL-Win64"
steps:
- name: Sync this repository
uses: eProsima/eProsima-CI/external/checkout@main
with:
path: src/eprosima-CI
- name: Install Fast DDS dependencies
uses: eProsima/eProsima-CI/multiplatform/install_fastdds_dependencies@main
with:
cmake_build_type: ${{ matrix.cmake_build_type }}
- name: Get Fast DDS artifact
uses: eProsima/eProsima-CI/external/download-artifact@main
with:
name: build_fastdds_custom_${{ matrix.os }}_${{ matrix.cmake_build_type }}${{ inputs.artifacts_name_postfix || env.default_artifact_postfix }}
path: install
- name: Get colcon.meta and .repos files to build artifact
uses: eProsima/eProsima-CI/multiplatform/get_configurations_from_repo@main
with:
source_repository_branch: ${{ inputs.configuration_branch || env.default_configuration_branch }}
colcon_meta_file_path: .github/workflows/configurations/metas/${{ matrix.os }}/colcon.meta
repos_file_path: .github/workflows/configurations/dev_utils/dependencies.repos
colcon_meta_file_result: ${{ github.workspace }}/colcon.meta
repos_file_result: ${{ github.workspace }}/dependencies.repos
- name: Fetch dev-utils repositories
uses: eProsima/eProsima-CI/multiplatform/fetch_dev_utils_manual@main
with:
dev_utils_branch: ${{ inputs.dev_utils_branch || env.default_dev_utils_branch }}
destination_workspace: ${{ github.workspace }}/src
- name: Build workspace
uses: eProsima/eProsima-CI/multiplatform/colcon_build@main
with:
colcon_meta_file: ${{ github.workspace }}/colcon.meta
workspace: ${{ github.workspace }}
workspace_dependencies: install
cmake_build_type: ${{ matrix.cmake_build_type }}
- name: Upload binaries
uses: eProsima/eProsima-CI/external/upload-artifact@main
with:
name: ${{ env.artifact_prefix }}_custom_${{ matrix.os }}_${{ matrix.cmake_build_type }}${{ inputs.artifacts_name_postfix || env.default_artifact_postfix }}
path: ${{ github.workspace }}/install
build_dev_utils:
name: build_dev_utils
if: ${{ github.event_name == 'schedule' || contains(inputs.single_version_build, 'false') }}
needs: build_fastdds
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
fastdds_version:
- v2
- v3
cmake_build_type:
- Release
- Debug
os:
- ubuntu-22.04
- ubuntu-24.04
- windows-2019
- windows-2022
# Windows env variables
env:
OPENSSL64_ROOT: "C:/Program Files/OpenSSL-Win64"
steps:
- name: Sync this repository
uses: eProsima/eProsima-CI/external/checkout@main
with:
path: src/eprosima-CI
- name: Install Fast DDS dependencies
uses: eProsima/eProsima-CI/multiplatform/install_fastdds_dependencies@main
with:
cmake_build_type: ${{ matrix.cmake_build_type }}
- name: Get Fast DDS artifact
uses: eProsima/eProsima-CI/external/download-artifact@main
with:
name: build_fastdds_${{ matrix.fastdds_version }}_${{ matrix.os }}_${{ matrix.cmake_build_type }}${{ inputs.artifacts_name_postfix || env.default_artifact_postfix }}
path: install
- name: Get colcon.meta to build artifact
uses: eProsima/eProsima-CI/multiplatform/get_configurations_from_repo@main
with:
source_repository_branch: ${{ inputs.configuration_branch || env.default_configuration_branch }}
colcon_meta_file_path: .github/workflows/configurations/metas/${{ matrix.os }}/colcon.meta
repos_file_path: .github/workflows/configurations/dev_utils/deps_${{ matrix.fastdds_version }}.repos
colcon_meta_file_result: ${{ github.workspace }}/colcon.meta
repos_file_result: ${{ github.workspace }}/dependencies.repos
- name: Fetch dev-utils repositories with vcs-tool
uses: eProsima/eProsima-CI/multiplatform/vcs_import@main
with:
vcs_repos_file: ${{ github.workspace }}/dependencies.repos
destination_workspace: ${{ github.workspace }}/src
- name: Build workspace
uses: eProsima/eProsima-CI/multiplatform/colcon_build@main
with:
colcon_meta_file: ${{ github.workspace }}/colcon.meta
workspace: ${{ github.workspace }}
workspace_dependencies: install
cmake_build_type: ${{ matrix.cmake_build_type }}
- name: Upload binaries
uses: eProsima/eProsima-CI/external/upload-artifact@main
with:
name: ${{ env.artifact_prefix }}_${{ matrix.fastdds_version }}_${{ matrix.os }}_${{ matrix.cmake_build_type }}${{ inputs.artifacts_name_postfix || env.default_artifact_postfix }}
path: ${{ github.workspace }}/install