Skip to content

Commit

Permalink
Add GPU requirement to Windows jobs
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Luis Rivero <[email protected]>
  • Loading branch information
j-rivero committed Feb 5, 2025
1 parent 8e35e08 commit c80c120
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
14 changes: 7 additions & 7 deletions jenkins-scripts/dsl/gazebo_libs.dsl
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ String get_windows_distro_sortname(ci_config)
+ ci_config.system.version.split('_').collect { it[0] }.join('')
}

void generate_label_by_requirements(job, lib_name, requirements)
void generate_label_by_requirements(job, lib_name, requirements, base_label)
{

if (requirements.nvidia_gpu.contains(lib_name) &&
requirements.large_memory.contains(lib_name)) {
println ("ERROR: more than one label is generated by requirements")
println ("ERROR: more than one label is not supported by requirements")
exit(1)
}

Expand All @@ -46,7 +46,7 @@ void generate_label_by_requirements(job, lib_name, requirements)

job.with
{
label Globals.nontest_label(label)
label Globals.nontest_label("${base_label} && ${label}")

if (requirements.nvidia_gpu.contains(lib_name)) {
// unstable build if missing valid gpu display
Expand Down Expand Up @@ -127,7 +127,7 @@ void generate_ci_job(gz_ci_job, lib_name, branch, ci_config,
"gazebosim/${lib_name}",
branch,
ws_checkout_dir)
generate_label_by_requirements(gz_ci_job, lib_name, ci_config.requirements)
generate_label_by_requirements(gz_ci_job, lib_name, ci_config.requirements, 'docker')
gz_ci_job.with
{
steps {
Expand Down Expand Up @@ -217,7 +217,7 @@ void generate_win_ci_job(gz_win_ci_job, lib_name, branch, ci_config)
"gazebosim/${lib_name}",
branch,
ws_checkout_dir)

generate_label_by_requirements(gz_win_ci_job, lib_name, ci_config.requirements, 'win')
add_win_devel_bat_call(gz_win_ci_job,
lib_name,
ws_checkout_dir,
Expand Down Expand Up @@ -446,7 +446,7 @@ branch_index.each { lib_name, distro_configs ->
is_testing_enabled(lib_name, ci_config),
ENABLE_CPPCHECK,
branch_names)
generate_label_by_requirements(gz_ci_any_job, lib_name, ci_config.requirements)
generate_label_by_requirements(gz_ci_any_job, lib_name, ci_config.requirements, 'docker')
gz_ci_any_job.with
{
steps
Expand Down Expand Up @@ -527,7 +527,7 @@ branch_index.each { lib_name, distro_configs ->
GenericAnyJobGitHub.create(abi_job,
"gazebosim/${lib_name}",
branch_names)
generate_label_by_requirements(abi_job, lib_name, ci_config.requirements)
generate_label_by_requirements(abi_job, lib_name, ci_config.requirements, 'docker')
abi_job.with
{
steps {
Expand Down
14 changes: 14 additions & 0 deletions jenkins-scripts/dsl/gz-collections.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,13 @@ ci_configs:
version: legacy
arch: amd64
requirements:
large_memory:
- gz-physics
nvidia_gpu:
- gz-sim
- gz-gui
- gz-rendering
- gz-sensors
exclude:
all:
- gz-fortress
Expand Down Expand Up @@ -624,6 +631,13 @@ ci_configs:
version: legacy_ogre23
arch: amd64
requirements:
large_memory:
- gz-physics
nvidia_gpu:
- gz-sim
- gz-gui
- gz-rendering
- gz-sensors
exclude:
all:
- gz-harmonic
Expand Down

0 comments on commit c80c120

Please sign in to comment.