Skip to content

Commit

Permalink
Force testing of PR 1038
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 Oct 16, 2023
1 parent 5143e36 commit 77f4ca8
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 188 deletions.
20 changes: 3 additions & 17 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: CI

# base_ref / head_reaf are only available in PRs
on: [pull_request]
on: [pull_request, push]

jobs:
dsl_ci:
Expand All @@ -12,24 +12,10 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Idenfify files changed in this PR
id: files
run: |
git fetch origin ${{ github.ref }}
git diff --name-only origin/${{ github.base_ref }}...FETCH_HEAD
echo "changed-files=$(git diff --name-only origin/${{ github.base_ref }}...FETCH_HEAD| tr '\n' ' ')" >> $GITHUB_OUTPUT
- name: Run testing on changed config files
id: dsl_check
run: |
for changed_file in ${{ steps.files.outputs.changed-files }}; do
if [[ ${changed_file} != ${changed_file/dsl\/*} ]]; then
echo "+ Detected at leat one config file: ${changed_file}."
echo "run_job=true" >> $GITHUB_OUTPUT
break
else
echo "run_job=false" >> $GITHUB_OUTPUT
fi
done
run:
echo "run_job=true" >> $GITHUB_OUTPUT
- name: Checkout
if: steps.dsl_check.outputs.run_job == 'true'
uses: actions/checkout@v3
Expand Down
111 changes: 0 additions & 111 deletions jenkins-scripts/docker/ignition-abichecker.bash

This file was deleted.

44 changes: 37 additions & 7 deletions jenkins-scripts/dsl/gazebo_libs.dsl
Original file line number Diff line number Diff line change
Expand Up @@ -149,25 +149,25 @@ ciconf_per_lib_index.each { lib_name, lib_configs ->
def ci_config = gz_collections_yaml.ci_configs.find{ it.name == config_name }
def branches_with_collections = ci_configs.getValue()
def branch_names = branches_with_collections.collect { it.branch }.unique()
if (ci_config.exclude.contains(lib_name))
if (ci_config.exclude.all?.contains(lib_name))
return
assert(lib_name)
assert(branch_names)
assert(ci_config)

if (ci_config.exclude.contains(lib_name))
return


// Main PR jobs (-ci-pr_any-) (pulling check every 5 minutes)
// --------------------------------------------------------------
def distro = ci_config.system.version
def arch = ci_config.system.arch
def gz_job_name_prefix = lib_name.replaceAll('-','_')
def gz_ci_job_name = "${gz_job_name_prefix}-ci-pr_any-${distro}-${arch}"
def gz_ci_any_job = job(gz_ci_job_name)
def pre_setup_script = ci_config.pre_setup_script_hook?.get(lib_name)?.join('\n')
def extra_cmd = pre_setup_script ?: ""

// Main PR jobs (-ci-pr_any-) (pulling check every 5 minutes)
// --------------------------------------------------------------
def gz_ci_job_name = "${gz_job_name_prefix}-ci-pr_any-${distro}-${arch}"
def gz_ci_any_job = job(gz_ci_job_name)
OSRFLinuxCompilationAnyGitHub.create(gz_ci_any_job,
"gazebosim/${lib_name}",
is_testing_enabled(lib_name, ci_config),
Expand All @@ -193,6 +193,37 @@ ciconf_per_lib_index.each { lib_name, lib_configs ->
} // end of steps
} // end of ci_any_job

if (! ci_config.exclude.abichecker?.contains(lib_name)) {
// ABI branch jobs (-ci-abichecker-) for non main branches
def abi_job_name = "${gz_job_name_prefix}-abichecker-any_to_any-ubuntu-${distro}-${arch}"
def abi_job = job(abi_job_name)
OSRFLinuxABIGitHub.create(abi_job)
GenericAnyJobGitHub.create(abi_job,
"gazebosim/${lib_name}",
branch_names - [ 'main'])
generate_label_by_requirements(abi_job, lib_name, ci_config.requirements)
abi_job.with
{
steps {
shell("""\
#!/bin/bash -xe

export DISTRO=${distro}

${GLOBAL_SHELL_CMD}
${extra_cmd}

export ARCH=${arch}
export DEST_BRANCH=\${DEST_BRANCH:-\$ghprbTargetBranch}
export SRC_BRANCH=\${SRC_BRANCH:-\$ghprbSourceBranch}
export SRC_REPO=\${SRC_REPO:-\$ghprbAuthorRepoGitUrl}
export ABI_JOB_SOFTWARE_NAME=${lib_name}
/bin/bash -xe ./scripts/jenkins-scripts/docker/gz-abichecker.bash
""".stripIndent())
} // end of steps
} // end of with
}

// CI branch jobs (-ci-$branch-) (pulling check every 5 minutes)
branches_with_collections.each { branch_and_collection ->
// TODO: remove after testing
Expand All @@ -212,7 +243,6 @@ ciconf_per_lib_index.each { lib_name, lib_configs ->
[collection: branch_and_collection.collection,
job_name: gz_ci_job.name])
} // end_of_branch

} //en of lib_configs
} // end of lib

Expand Down
24 changes: 18 additions & 6 deletions jenkins-scripts/dsl/gz-collections.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ collections:
configs:
- jammy
exclude:
- __upcoming__
- __upcoming__
ci_configs:
- name: bionic
system:
Expand All @@ -496,7 +496,11 @@ ci_configs:
version: bionic
arch: amd64
exclude:
- ign-citadel
all:
- ign-citadel
abichecker:
- ign-cmake
- ign-tools
requirements:
large_memory:
- ign-physics
Expand Down Expand Up @@ -524,8 +528,12 @@ ci_configs:
- gz-rendering
- gz-sensors
exclude:
- gz-fortress
- gz-garden
all:
- gz-fortress
- gz-garden
abichecker:
- gz-cmake
- gz-tools
pre_setup_script_hook:
ign-physics:
- "export MAKE_JOBS=1"
Expand All @@ -545,8 +553,12 @@ ci_configs:
- gz-rendering
- gz-sensors
exclude:
- gz-harmonic
- __upcoming__
all:
- gz-harmonic
- __upcoming__
abichecker:
- gz-cmake
- gz-tools
pre_setup_script_hook:
gz-physics:
- "export MAKE_JOBS=1"
Expand Down
52 changes: 6 additions & 46 deletions jenkins-scripts/dsl/ignition.dsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,7 @@ import _configs_.*
import javaposse.jobdsl.dsl.Job

// IGNITION PACKAGES
gz_software = [ 'cmake',
'common',
'fuel-tools',
'gazebo',
'gui',
'launch',
'math',
'msgs',
'physics',
'plugin',
'rendering',
'sensors',
'sim',
'tools',
'transport',
gz_software = [ 'physics',
'utils' ]
// DESC: need gpu/display for tests
gz_gpu = [ 'gazebo',
Expand Down Expand Up @@ -389,9 +375,9 @@ void generate_install_job(prefix, gz_sw, major_version, distro, arch)
gz_software.each { gz_sw ->
supported_arches.each { arch ->
// 1 Per library and per linux arch
// 1.1 Per abi_distro
// 1.1 DEPRECATED Per abi_distro
// 1.1.1 [job] ABI checker for main branches
// 1.2 Per ci_str_distro
// 1.2 DEPRECATED Per ci_str_distro
// 1.2.1 [job] Main PR jobs (-ci-pr_any-)
// 1.3 Per all supported_distros
// 1.3.1 Per all supported branches on each library
Expand All @@ -412,39 +398,12 @@ gz_software.each { gz_sw ->

abi_job_names[software_name] = "ignition_${software_name}-abichecker-any_to_any-ubuntu_auto-${arch}"
def abi_job = job(abi_job_names[software_name])
checkout_subdir = "ign-${software_name}"
OSRFLinuxABIGitHub.create(abi_job)
GenericAnyJobGitHub.create(abi_job,
"gazebosim/ign-${software_name}",
all_branches(software_name) - [ 'main'])
abi_job.with
{
extra_str=""
if (gz_sw == 'physics')
{
label Globals.nontest_label("large-memory")
// on ARM native nodes in buildfarm we need to restrict to 1 the
// compilation threads to avoid OOM killer
extra_str += '\nexport MAKE_JOBS=1'
}

steps {
shell("""\
#!/bin/bash -xe

export DISTRO=${distro}

${GLOBAL_SHELL_CMD}
${extra_str}

export ARCH=${arch}
export DEST_BRANCH=\${DEST_BRANCH:-\$ghprbTargetBranch}
export SRC_BRANCH=\${SRC_BRANCH:-\$ghprbSourceBranch}
export SRC_REPO=\${SRC_REPO:-\$ghprbAuthorRepoGitUrl}
export ABI_JOB_SOFTWARE_NAME=${checkout_subdir}
/bin/bash -xe ./scripts/jenkins-scripts/docker/ignition-abichecker.bash
""".stripIndent())
} // end of steps
description 'Automatic generated job by DSL jenkins. Stub job for migration, not doing any check'
} // end of with
} // end of abi_distro

Expand Down Expand Up @@ -559,7 +518,8 @@ void generate_ci_job(gz_ci_job, gz_sw, branch, distro, arch,
{
if (gz_sw == 'physics') {
label Globals.nontest_label("large-memory")
extra_str += '\nexport MAKE_JOBS=1'
extra_cmd += "\
export MAKE_JOBS=1"
}
if (gz_sw == 'gazebo')
gz_sw = 'sim'
Expand Down
2 changes: 1 addition & 1 deletion jenkins-scripts/dsl/ignition_collection.dsl
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ gz_collections_yaml.collections.each { collection ->
distro = ci_config.system.version
arch = ci_config.system.arch

if (ci_config.exclude.contains(gz_collection_name))
if (ci_config.exclude.all?.contains(gz_collection_name))
return

// INSTALL JOBS:
Expand Down

0 comments on commit 77f4ca8

Please sign in to comment.