Skip to content

Commit

Permalink
Introduce some duplicate jobs.
Browse files Browse the repository at this point in the history
  • Loading branch information
alliepiper committed Apr 23, 2024
1 parent 8b5ae80 commit 8f202aa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
20 changes: 11 additions & 9 deletions ci/compute-matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,18 +351,18 @@ def finalize_workflow_dispatch_groups(workflow_dispatch_groups_orig):
matching_consumers = merged_consumers[producer_index]

producer_names = ", ".join([producer['name'] for producer in producers])
print(f"::warning file=ci/matrix.yaml::Duplicate producer '{producer_names}' in '{group_name}'",
print(f"::notice file=ci/matrix.yaml::Merging consumers for duplicate producer '{producer_names}' in '{group_name}'",
file=sys.stderr)
consumer_names = ", ".join([consumer['name'] for consumer in matching_consumers])
print(f"::warning file=ci/matrix.yaml::Original consumers: {consumer_names}", file=sys.stderr)
print(f"::notice file=ci/matrix.yaml::Original consumers: {consumer_names}", file=sys.stderr)
consumer_names = ", ".join([consumer['name'] for consumer in consumers])
print(f"::warning file=ci/matrix.yaml::Duplicate consumers: {consumer_names}", file=sys.stderr)
print(f"::notice file=ci/matrix.yaml::Duplicate consumers: {consumer_names}", file=sys.stderr)
# Merge if unique:
for consumer in consumers:
if consumer not in matching_consumers:
matching_consumers.append(consumer)
consumer_names = ", ".join([consumer['name'] for consumer in matching_consumers])
print(f"::warning file=ci/matrix.yaml::Merged consumers: {consumer_names}", file=sys.stderr)
print(f"::notice file=ci/matrix.yaml::Merged consumers: {consumer_names}", file=sys.stderr)
else:
merged_producers.append(producers)
merged_consumers.append(consumers)
Expand All @@ -378,7 +378,7 @@ def finalize_workflow_dispatch_groups(workflow_dispatch_groups_orig):
unique_standalone_jobs = []
for job_json in standalone_jobs:
if job_json in unique_standalone_jobs:
print(f"::warning file=ci/matrix.yaml::Removing duplicate standalone job '{job_json['name']}' in '{group_name}'",
print(f"::notice file=ci/matrix.yaml::Removing duplicate standalone job '{job_json['name']}' in '{group_name}'",
file=sys.stderr)
else:
unique_standalone_jobs.append(job_json)
Expand All @@ -388,13 +388,13 @@ def finalize_workflow_dispatch_groups(workflow_dispatch_groups_orig):
for two_stage_job in two_stage_jobs:
for producer in two_stage_job['producers']:
if producer in unique_standalone_jobs:
print(f"::warning file=ci/matrix.yaml::Removing standalone job '{producer['name']}' " +
print(f"::notice file=ci/matrix.yaml::Removing standalone job '{producer['name']}' " +
f"as it appears as a producer in '{group_name}'",
file=sys.stderr)
unique_standalone_jobs.remove(producer)
for consumer in two_stage_job['consumers']:
if consumer in unique_standalone_jobs:
print(f"::warning file=ci/matrix.yaml::Removing standalone job '{consumer['name']}' " +
print(f"::notice file=ci/matrix.yaml::Removing standalone job '{consumer['name']}' " +
f"as it appears as a consumer in '{group_name}'",
file=sys.stderr)
unique_standalone_jobs.remove(consumer)
Expand Down Expand Up @@ -468,8 +468,10 @@ def natural_sort_key(key):
producer_names = ""
for job in two_stage_json['producers']:
producer_names += f" - {job['name']}\n"
raise Exception(
f"ci-dispatch-two-stage.yml currently only supports a single producer. Found {num_producers} producers in '{group_name}':\n{producer_names}")
error_message = f"ci-dispatch-two-stage.yml currently only supports a single producer. "
error_message += f"Found {num_producers} producers in '{group_name}':\n{producer_names}"
print(f"::error file=ci/matrix.yaml::{error_message}", file=sys.stderr)
raise Exception(error_message)

return workflow_dispatch_groups

Expand Down
2 changes: 1 addition & 1 deletion ci/matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ workflows:
- {job_types: ['build'], ctk: *ctk_prev_min, host_compiler: [*msvc2017, *gcc6], std: [11, 14] }
- {job_types: ['build'], ctk: *ctk_prev_min, host_compiler: [*gcc7, *gcc8, *gcc9, *llvm9], std: [11, 14, 17] }
- {job_types: ['build'], ctk: *ctk_prev_max, host_compiler: *gcc11, std: [11, 14, 17], cmake_cuda_arch: '60;70;80;90'}
- {job_types: ['build'], ctk: *ctk_curr, host_compiler: *gcc12, std: [11, 14, 17, 20] }
- {job_types: ['build'], ctk: *ctk_curr, host_compiler: [*gcc7, *gcc8, *gcc9], std: [11, 14, 17] }
- {job_types: ['build'], ctk: *ctk_curr, host_compiler: [*gcc10, *gcc11], std: [11, 14, 17, 20] }
- {job_types: ['build'], ctk: *ctk_curr, host_compiler: [*llvm9, *llvm10], std: [11, 14, 17] }
Expand All @@ -144,6 +143,7 @@ workflows:
- {job_types: ['build'], ctk: *ctk_curr, host_compiler: *msvc2019, std: [14, 17] }
- {job_types: ['build'], ctk: *ctk_curr, host_compiler: *msvc2022, std: [14, 17, 20] }
- {job_types: ['build'], ctk: *ctk_curr, host_compiler: *oneapi, std: [11, 14, 17] }
- {job_types: ['test'], ctk: *ctk_curr, host_compiler: *oneapi, std: [11, 14, 17] }
- {job_types: ['build'], ctk: *ctk_curr, host_compiler: [*gcc12, *llvm16], std: [11, 14, 17, 20], cpu: 'arm64'}
- {job_types: ['test'], ctk: *ctk_curr, host_compiler: [*gcc12, *llvm16], std: [11, 14, 17, 20], cmake_cuda_arch: '60;70;80;90'}
# clang-cuda:
Expand Down

0 comments on commit 8f202aa

Please sign in to comment.