Skip to content

[CI] Enable Cuda/OpenCL e2e on PR comment #1261

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

Merged
merged 1 commit into from
Feb 27, 2024
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
Original file line number Diff line number Diff line change
@@ -1,26 +1,56 @@
name: E2E Nightly
name: E2E build & run

on:
schedule:
# Run every day at 23:00 UTC
- cron: '0 23 * * *'
# this workflow can by only triggered by other workflows
# for example by: e2e_cuda.yml or e2e_opencl.yml
workflow_call:
# acceptable input from adapter-specific workflows
inputs:
name:
description: Adapter name
type: string
required: true
str_name: Formatted adapter name
description:
type: string
required: true
prefix:
description: Prefix for cmake parameter
type: string
required: true
config:
description: Params for sycl configuration
type: string
required: true
unit:
description: Test unit (cpu/gpu)
type: string
required: true
runner_tag:
description: Tag defifned for the runner
type: string
required: true

permissions:
contents: read
pull-requests: write

jobs:
e2e-build-hw:
name: Build SYCL, UR, run E2E
strategy:
matrix:
adapter: [
{name: CUDA, str_name: cuda, prefix: "ext_oneapi_", config: "--cuda --hip", unit: "gpu"},
{name: OPENCL, str_name: opencl, prefix: "", config: "", unit: "cpu"}
{name: "${{inputs.name}}",
str_name: "${{inputs.str_name}}",
prefix: "${{inputs.prefix}}",
config: "${{inputs.config}}",
unit: "${{inputs.unit}}"}
]
build_type: [Release]
compiler: [{c: clang, cxx: clang++}]

runs-on: ${{matrix.adapter.name}}
runs-on: ${{inputs.runner_tag}}

steps:
# Workspace on self-hosted runners is not cleaned automatically.
Expand All @@ -31,6 +61,25 @@ jobs:
ls -la ./
rm -rf ./* || true

- uses: xt0rted/pull-request-comment-branch@d97294d304604fa98a2600a6e2f916a84b596dc7 # v2.0.0
id: comment-branch

- name: Add comment to PR
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
if: always()
with:
script: |
const adapter = '${{ matrix.adapter.name }}';
const url = '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}';
const body = `E2E ${adapter} build: \n${url}`;

github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: body
})

- name: Checkout UR
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/e2e_cuda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: E2E Cuda

on:
schedule:
# Run every day at 23:00 UTC
- cron: '0 23 * * *'
issue_comment:
types: [created, edited]

permissions:
contents: read
pull-requests: write

jobs:
e2e-build-hw:
# trigger only if PR comment contains "e2e-cuda"
if: ${{ (github.event.issue.pull_request && contains(github.event.comment.body, '/e2e-cuda')) || (github.event_name == 'schedule') }}
name: Start e2e job
# use core flow, run it with cuda specific parameters
uses: ./.github/workflows/e2e_core.yml
# parameters that we pass to the core flow
with:
name: "CUDA"
runner_tag: "CUDA_E2E"
str_name: "cuda"
prefix: "ext_oneapi_"
config: "--cuda"
unit: "gpu"
28 changes: 28 additions & 0 deletions .github/workflows/e2e_opencl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: E2E OpenCL

on:
schedule:
# Run every day at 23:00 UTC
- cron: '0 23 * * *'
issue_comment:
types: [created, edited]

permissions:
contents: read
pull-requests: write

jobs:
e2e-build-hw:
# trigger only if PR comment contains "e2e-opencl"
if: ${{ (github.event.issue.pull_request && contains(github.event.comment.body, '/e2e-opencl')) || (github.event_name == 'schedule') }}
name: Start e2e job
# use core flow, run it with OpenCL specific parameters
uses: ./.github/workflows/e2e_core.yml
# parameters that we pass to the core flow
with:
name: "OPENCL"
runner_tag: "OPENCL"
str_name: "opencl"
prefix: ""
config: ""
unit: "cpu"