Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move ASAN jobs to be generated using gz-collections.yaml #1078

Merged
merged 5 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion jenkins-scripts/dsl/gazebo_libs.dsl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ENABLE_GITHUB_PR_INTEGRATION = true
def WRITE_JOB_LOG = System.getenv('WRITE_JOB_LOG') ?: false
logging_list = [:]
logging_list['branch_ci'] = []
logging_list['asan_ci'] = []

// Jenkins needs the relative path to work and locally the simulation is done
// using a symlink
Expand Down Expand Up @@ -124,7 +125,7 @@ void generate_ci_job(gz_ci_job, lib_name, branch, ci_config,
def arch = ci_config.system.arch
def pre_setup_script = ci_config.pre_setup_script_hook?.get(lib_name)?.join('\n')
def ws_checkout_dir = lib_name
extra_cmd = [extra_cmd, pre_setup_script].findAll({ it != null }).join()
extra_cmd = [extra_cmd, pre_setup_script].findAll({ it != null }).join('\n')

OSRFLinuxCompilation.create(gz_ci_job, is_testing_enabled(lib_name, ci_config))
OSRFGitHub.create(gz_ci_job,
Expand All @@ -151,6 +152,14 @@ void generate_ci_job(gz_ci_job, lib_name, branch, ci_config,
}
}

void generate_asan_ci_job(gz_ci_job, lib_name, branch, ci_config)
{
generate_ci_job(gz_ci_job, lib_name, branch, ci_config,
'-DGZ_SANITIZER=Address',
Globals.MAKETEST_SKIP_GZ,
'export ASAN_OPTIONS=check_initialization_order=true:strict_init_order=true')
}

void add_brew_shell_build_step(gz_brew_ci_job, lib_name, ws_checkout_dir)
{
// ignition formulas does not match the lib name, expand the prefix
Expand Down Expand Up @@ -238,6 +247,18 @@ ciconf_per_lib_index.each { lib_name, lib_configs ->
if (ci_config.system.so == 'linux') {
gz_ci_job = job("${gz_job_name_prefix}-ci-${branch_name}-${distro}-${arch}")
generate_ci_job(gz_ci_job, lib_name, branch_name, ci_config)
// Generate asan jobs on Linux
def gz_ci_asan_job = job("${gz_job_name_prefix}-ci_asan-${branch_name}-${distro}-${arch}")
generate_asan_ci_job(gz_ci_asan_job, lib_name, branch_name, ci_config)
gz_ci_asan_job.with
{
triggers {
scm(Globals.CRON_ON_WEEKEND)
}
}
logging_list['asan_ci'].add(
[collection: branch_and_collection.collection,
job_name: gz_ci_asan_job.name])
} else if (ci_config.system.so == 'darwin') {
gz_ci_job = job("${gz_job_name_prefix}-ci-${branch_name}-homebrew-${arch}")
generate_brew_ci_job(gz_ci_job, lib_name, branch_name, ci_config)
Expand Down
33 changes: 1 addition & 32 deletions jenkins-scripts/dsl/ignition.dsl
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,6 @@ gz_software.each { gz_sw ->
// 1.3 Per all supported_distros
// 1.3.1 Per all supported branches on each library
// 1.3.1.1 [job] Branch jobs -ci-$branch-
// 1.3.1.2 [job] Branch ASAN jobs -ci_asan-$branch-

// 1.1.1 ABI checker for main branches
// --------------------------------------------------------------
Expand All @@ -420,28 +419,7 @@ gz_software.each { gz_sw ->
description 'Automatic generated job by DSL jenkins. Stub job for migration, not doing any check'
} // end of with
} // end of abi_distro

all_supported_distros.each { distro ->
all_branches("${gz_sw}").each { branch ->
// 1. Standard CI
software_name = gz_sw // Necessary substitution. gz_sw won't overwrite

if (gz_sw == 'sim')
software_name = "gazebo"

// 1.3.1.2 Branch ASAN jobs -ci_asan-$branch-
// --------------------------------------------------------------
def gz_ci_asan_job = job("ignition_${software_name}-ci_asan-${branch}-${distro}-${arch}")
generate_asan_ci_job(gz_ci_asan_job, software_name, branch, distro, arch)
gz_ci_asan_job.with
{
triggers {
scm(Globals.CRON_ON_WEEKEND)
}
}
}
} // end of all_supported_distros
} // end of supported_arches
} // end of arch
} // end of gz_software


Expand Down Expand Up @@ -477,15 +455,6 @@ gz_software.each { gz_sw ->
}
}

void generate_asan_ci_job(gz_ci_job, gz_sw, branch, distro, arch)
{
generate_ci_job(gz_ci_job, gz_sw, branch, distro, arch,
'-DGZ_SANITIZER=Address',
Globals.MAKETEST_SKIP_GZ,
['export ASAN_OPTIONS=check_initialization_order=true:strict_init_order=true'])
}


void generate_ci_job(gz_ci_job, gz_sw, branch, distro, arch,
extra_cmake = '', extra_test = '', extra_cmd = [])
{
Expand Down