Skip to content

Commit

Permalink
[GR-53334] Refactor tags into tag groups.
Browse files Browse the repository at this point in the history
PullRequest: graal/17539
  • Loading branch information
medoussboug committed May 16, 2024
2 parents f5d35bd + 6a1f001 commit 751f27a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ci.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ local verify_ci = (import 'ci/ci_common/ci-check.libsonnet').verify_ci;
assert std.length(std.toString(import 'ci/ci_common/common.jsonnet')) > 0,
ci_resources:: (import 'ci/ci_common/ci-resources.libsonnet'),
overlay: graal_common.ci.overlay,
specVersion: "3",
specVersion: "4",
builds: [common.add_excludes_guard(b) for b in (
common.with_components(compiler.builds, ["compiler"]) +
common.with_components(wasm.builds, ["wasm"]) +
Expand Down
9 changes: 7 additions & 2 deletions ci/ci_common/bench-common.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@
]
},

generate_fork_tags(suite_obj):: if std.objectHasAll(suite_obj, "tags") && std.objectHasAll(suite_obj.tags, "opt_post_merge") then {
tags: {opt_post_merge: [tag +"-many-forks" for tag in suite_obj.tags.opt_post_merge]},
} else {
tags: {}
},

generate_fork_builds(suite_obj, subdir='compiler', forks_file_base_name=null)::
/* based on a benchmark suite definition, generates the many forks version based on the hidden fields
* 'forks_batches' that specifies the number of batches this job should be split into and the corresponding
Expand All @@ -134,13 +140,12 @@
local batch_str = if suite_obj.forks_batches > 1 then "batch"+i else null,
"job_prefix":: "bench-forks-" + subdir,
"job_suffix":: batch_str,
tags: if std.objectHasAll(suite_obj, "tags") then [tag +"-many-forks" for tag in suite_obj.tags] else [],
"timelimit": suite_obj.forks_timelimit,
local base_name = if forks_file_base_name != null then forks_file_base_name else suite_obj.suite,
"environment" +: {
FORK_COUNT_FILE: "${FORK_COUNTS_DIRECTORY}/" + subdir + "/" + base_name + "_forks" + (if batch_str != null then "_"+batch_str else "") + ".json"
}
}
} + $.generate_fork_tags(suite_obj)
for i in std.range(0, suite_obj.forks_batches - 1)]
else
[],
Expand Down
2 changes: 1 addition & 1 deletion ci/common.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ local common_json = import "../common.json";
},
opt_post_merge: {
targets+: ["opt-post-merge"],
tags+: []
tags+: {opt_post_merge +: []},
},
daily: {
targets+: ["daily"],
Expand Down
2 changes: 1 addition & 1 deletion compiler/ci/ci_common/compiler-common.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
local use_libgraal_profile = libgraal_profiling_only(config.compiler.use_libgraal_profile),

job_prefix:: "bench-compiler",
tags+: ["bench-compiler"],
tags+: {opt_post_merge+: ["bench-compiler"]},
python_version : "3",
packages+: common.deps.svm.packages,
environment+: {
Expand Down

0 comments on commit 751f27a

Please sign in to comment.