From 3446797b8ce66ee3859c4d81b4fbe664f50ea4f3 Mon Sep 17 00:00:00 2001 From: Allison Piper Date: Mon, 22 Apr 2024 20:51:10 +0000 Subject: [PATCH] More updates... --- .github/workflows/ci-dispatch-group.yml | 1 - .github/workflows/ci-dispatch-job.yml | 11 +++++------ .github/workflows/ci-dispatch-two-stage.yml | 2 -- ci/compute-matrix.py | 18 +++++++----------- ci/matrix.yaml | 2 +- 5 files changed, 13 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci-dispatch-group.yml b/.github/workflows/ci-dispatch-group.yml index 40b1d78a690..a600c80a3f6 100644 --- a/.github/workflows/ci-dispatch-group.yml +++ b/.github/workflows/ci-dispatch-group.yml @@ -24,7 +24,6 @@ jobs: include: ${{fromJSON(inputs.jobs)['standalone']}} uses: ./.github/workflows/ci-dispatch-job.yml with: - dispatch: ${{ matrix.dispatch }} name: ${{ matrix.name }} runner: ${{ matrix.runner }} image: ${{ matrix.image }} diff --git a/.github/workflows/ci-dispatch-job.yml b/.github/workflows/ci-dispatch-job.yml index 1bafe93df23..d7ce3f79780 100644 --- a/.github/workflows/ci-dispatch-job.yml +++ b/.github/workflows/ci-dispatch-job.yml @@ -26,7 +26,6 @@ on: success: value: ${{ contains(toJSON(jobs.*.outputs.success), 'true') }} inputs: - dispatch: {type: string, required: true} name: {type: string, required: true} image: {type: string, required: true} runner: {type: string, required: true} @@ -40,7 +39,7 @@ permissions: jobs: linux: name: ${{inputs.name}} - # continue-on-error: ${{ ! startsWith(inputs.dispatch, 'linux') }} + continue-on-error: ${{ ! startsWith(inputs.runner, 'linux') }} outputs: success: ${{ steps.done.outputs.SUCCESS }} permissions: @@ -48,7 +47,7 @@ jobs: contents: read strategy: matrix: - include: ${{ fromJSON(startsWith(inputs.dispatch, 'linux') && inputs.dummy_matrix || '[]') }} + include: ${{ fromJSON(startsWith(inputs.runner, 'linux') && inputs.dummy_matrix || '[]') }} runs-on: ${{inputs.runner}} container: options: -u root @@ -57,7 +56,7 @@ jobs: NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }} steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: cccl persist-credentials: false @@ -98,7 +97,7 @@ jobs: windows: name: ${{inputs.name}} - # continue-on-error: ${{ ! startsWith(inputs.dispatch, 'windows') }} + continue-on-error: ${{ ! startsWith(inputs.runner, 'windows') }} outputs: success: ${{ steps.done.outputs.SUCCESS }} permissions: @@ -107,7 +106,7 @@ jobs: strategy: fail-fast: false matrix: - include: ${{ fromJSON(startsWith(inputs.dispatch, 'windows') && inputs.dummy_matrix || '[]') }} + include: ${{ fromJSON(startsWith(inputs.runner, 'windows') && inputs.dummy_matrix || '[]') }} runs-on: ${{inputs.runner}} env: SCCACHE_BUCKET: rapids-sccache-devs diff --git a/.github/workflows/ci-dispatch-two-stage.yml b/.github/workflows/ci-dispatch-two-stage.yml index 0ac72dd1ee4..9e8c4c520b2 100644 --- a/.github/workflows/ci-dispatch-two-stage.yml +++ b/.github/workflows/ci-dispatch-two-stage.yml @@ -28,7 +28,6 @@ jobs: include: ${{fromJSON(inputs.producers)}} uses: ./.github/workflows/ci-dispatch-job.yml with: - dispatch: ${{ matrix.dispatch }} name: ${{ matrix.name }} runner: ${{ matrix.runner }} image: ${{ matrix.image }} @@ -47,7 +46,6 @@ jobs: include: ${{fromJSON(inputs.consumers)}} uses: ./.github/workflows/ci-dispatch-job.yml with: - dispatch: ${{ matrix.dispatch }} name: ${{ matrix.name }} runner: ${{ matrix.runner }} image: ${{ matrix.image }} diff --git a/ci/compute-matrix.py b/ci/compute-matrix.py index be4a27f2bd5..5f11407553a 100755 --- a/ci/compute-matrix.py +++ b/ci/compute-matrix.py @@ -49,7 +49,6 @@ - job_json: A json object that represents a single job in a workflow. Used with ci-dispatch-job.yml. Example: { - dispatch: "...", # (linux|windows)-(cpu|gpu) name: "...", runner: "...", image: "...", @@ -88,21 +87,25 @@ def get_formatted_projected_name(project_name): return matrix_yaml['formatted_project_names'][project_name] return project_name + def get_formatted_host_compiler_name(host_compiler): config_name = host_compiler['name'] if config_name in matrix_yaml['formatted_host_compiler_names']: return matrix_yaml['formatted_host_compiler_names'][config_name] return config_name + def get_formatted_job_type(job_type): if job_type in matrix_yaml['formatted_job_types']: return matrix_yaml['formatted_job_types'][job_type] # Return with first letter capitalized: return job_type.capitalize() + def is_windows(matrix_job): return matrix_job['os'].startswith('windows') + def validate_matrix_job(matrix_job): for tag in matrix_yaml['required_tags']: if tag not in matrix_job: @@ -149,6 +152,7 @@ def explode_matrix_job(matrix_job): return new_jobs if len(new_jobs) > 0 else None + def generate_dispatch_group_name(matrix_job): project_name = get_formatted_projected_name(matrix_job['projects'][0]) ctk = matrix_job['ctk'] @@ -166,13 +170,6 @@ def generate_dispatch_group_name(matrix_job): return f"{project_name} {compiler_info} CTK{ctk}" -def generate_dispatch_job_runner_dispatch(matrix_job, job_type): - runner_os = "windows" if is_windows(matrix_job) else "linux" - cpu_gpu = "gpu" if job_type in matrix_yaml['gpu_required_job_types'] else "cpu" - - return f"{runner_os}-{cpu_gpu}" - - def generate_dispatch_job_name(matrix_job, job_type): std_ver = matrix_job['std'][0] cpu_str = matrix_job['cpu'] @@ -189,7 +186,6 @@ def generate_dispatch_job_name(matrix_job, job_type): return f"[{config_tag}] {formatted_job_type}({cpu_str}{gpu_str})" - return "[{}-{} C++{}] {}({}{}){}".format( matrix_job['host_compiler']['name'], matrix_job['host_compiler']['version'], @@ -256,7 +252,6 @@ def generate_dispatch_job_command(matrix_job, job_type): def generate_dispatch_job_json(matrix_job, job_type): return { - 'dispatch': generate_dispatch_job_runner_dispatch(matrix_job, job_type), 'name': generate_dispatch_job_name(matrix_job, job_type), 'runner': generate_dispatch_job_runner(matrix_job, job_type), 'image': generate_dispatch_job_image(matrix_job, job_type), @@ -393,7 +388,8 @@ def finalize_workflow_dispatch_groups(workflow_dispatch_groups_orig): 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}") + raise Exception( + f"ci-dispatch-two-stage.yml currently only supports a single producer. Found {num_producers} producers in '{group_name}':\n{producer_names}") return workflow_dispatch_groups diff --git a/ci/matrix.yaml b/ci/matrix.yaml index 12425c33229..bdb60fbe26e 100644 --- a/ci/matrix.yaml +++ b/ci/matrix.yaml @@ -166,7 +166,7 @@ pull_request: # - {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] } # nvrtc: - # - {job_types: ['nvrtc'], projects: ['libcudacxx'], ctk: *ctk_curr, host_compiler: *gcc12, std: [11, 14, 17, 20]} + - {job_types: ['nvrtc'], projects: ['libcudacxx'], ctk: *ctk_curr, host_compiler: *gcc12, std: [11, 14, 17, 20]} # clang-cuda: # - {job_types: ['build'], device_compiler: *llvm-newest, host_compiler: *llvm-newest, std: [17, 20]} # cccl-infra: