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

Fix brew ign- formula names #1068

Merged
merged 5 commits into from
Nov 13, 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
39 changes: 20 additions & 19 deletions jenkins-scripts/dsl/gazebo_libs.dsl
Original file line number Diff line number Diff line change
Expand Up @@ -151,28 +151,37 @@ void generate_ci_job(gz_ci_job, lib_name, branch, ci_config,
}
}

void generate_brew_ci_job(gz_brew_ci_job, lib_name, branch, ci_config)
void add_brew_shell_build_step(gz_brew_ci_job, lib_name, ws_checkout_dir)
{
def script_name_prefix = cleanup_library_name(lib_name)
OSRFBrewCompilation.create(gz_brew_ci_job,
is_testing_enabled(lib_name, ci_config),
are_cmake_warnings_enabled(lib_name, ci_config))
OSRFGitHub.create(gz_brew_ci_job,
"gazebosim/${lib_name}",
branch,
lib_name)
// ignition formulas does not match the lib name, expand the prefix
lib_name = lib_name.replaceAll(/^ign-/, 'ignition-')
gz_brew_ci_job.with
{
steps {
shell("""\
#!/bin/bash -xe

export PROJECT_PATH="${ws_checkout_dir}"
/bin/bash -xe ./scripts/jenkins-scripts/lib/project-default-devel-homebrew-amd64.bash "${lib_name}"
""".stripIndent())
}
}
}

void generate_brew_ci_job(gz_brew_ci_job, lib_name, branch, ci_config)
{
def script_name_prefix = cleanup_library_name(lib_name)
def ws_checkout_dir = lib_name
OSRFBrewCompilation.create(gz_brew_ci_job,
is_testing_enabled(lib_name, ci_config),
are_cmake_warnings_enabled(lib_name, ci_config))
OSRFGitHub.create(gz_brew_ci_job,
"gazebosim/${lib_name}",
branch,
ws_checkout_dir)
add_brew_shell_build_step(gz_brew_ci_job, lib_name, ws_checkout_dir)
}

def ciconf_per_lib_index = [:].withDefault { [:] }
def pkgconf_per_src_index = [:].withDefault { [:] }
generate_ciconfigs_by_lib(gz_collections_yaml, ciconf_per_lib_index, pkgconf_per_src_index)
Expand Down Expand Up @@ -283,22 +292,14 @@ ciconf_per_lib_index.each { lib_name, lib_configs ->
// --------------------------------------------------------------
def gz_brew_ci_any_job_name = "${gz_job_name_prefix}-ci-pr_any-homebrew-amd64"
def gz_brew_ci_any_job = job(gz_brew_ci_any_job_name)
def ws_checkout_dir = lib_name
OSRFBrewCompilationAnyGitHub.create(gz_brew_ci_any_job,
"gazebosim/${lib_name}",
is_testing_enabled(lib_name, ci_config),
branch_names,
ENABLE_GITHUB_PR_INTEGRATION,
are_cmake_warnings_enabled(lib_name, ci_config))
gz_brew_ci_any_job.with
{
steps {
shell("""\
#!/bin/bash -xe

/bin/bash -xe "./scripts/jenkins-scripts/lib/project-default-devel-homebrew-amd64.bash" "${lib_name}"
""".stripIndent())
}
}
add_brew_shell_build_step(gz_brew_ci_any_job, lib_name, ws_checkout_dir)
}
} //en of lib_configs
} // end of lib
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ export HOMEBREW_MAKE_JOBS=${MAKE_JOBS}
# Get project name as first argument to this script
PROJECT=$1 # project will have the major version included (ex gazebo2)
PROJECT_ARGS=${2}

PROJECT_PATH=${PROJECT}

# PROJECT_PATH can be passed as env variable or assume that is the same than project name
PROJECT_PATH=${PROJECT_PATH:-$PROJECT}
# Check for major version number
# the PROJECT_FORMULA variable is only used for dependency resolution
PROJECT_FORMULA=${PROJECT//[0-9]}$(\
Expand Down