|
1 |
| -name: E2E Nightly |
| 1 | +name: E2E build & run |
2 | 2 |
|
3 | 3 | on:
|
4 |
| - schedule: |
5 |
| - # Run every day at 23:00 UTC |
6 |
| - - cron: '0 23 * * *' |
| 4 | + # this workflow can by only triggered by other workflows |
| 5 | + # for example by: e2e_cuda.yml or e2e_opencl.yml |
| 6 | + workflow_call: |
| 7 | + # acceptable input from adapter-specific workflows |
| 8 | + inputs: |
| 9 | + name: |
| 10 | + type: string |
| 11 | + required: true |
| 12 | + str_name: |
| 13 | + type: string |
| 14 | + required: true |
| 15 | + prefix: |
| 16 | + type: string |
| 17 | + required: true |
| 18 | + config: |
| 19 | + type: string |
| 20 | + required: true |
| 21 | + unit: |
| 22 | + type: string |
| 23 | + required: true |
| 24 | + runner_tag: |
| 25 | + type: string |
| 26 | + required: true |
7 | 27 |
|
8 | 28 | permissions:
|
9 | 29 | contents: read
|
| 30 | + pull-requests: write |
10 | 31 |
|
11 | 32 | jobs:
|
12 | 33 | e2e-build-hw:
|
13 | 34 | name: Build SYCL, UR, run E2E
|
14 | 35 | strategy:
|
15 | 36 | matrix:
|
16 | 37 | adapter: [
|
17 |
| - {name: CUDA, str_name: cuda, prefix: "ext_oneapi_", config: "--cuda --hip", unit: "gpu"}, |
18 |
| - {name: OPENCL, str_name: opencl, prefix: "", config: "", unit: "cpu"} |
| 38 | + {name: "${{inputs.name}}", |
| 39 | + str_name: "${{inputs.str_name}}", |
| 40 | + prefix: "${{inputs.prefix}}", |
| 41 | + config: "${{inputs.config}}", |
| 42 | + unit: "${{inputs.unit}}"} |
19 | 43 | ]
|
20 | 44 | build_type: [Release]
|
21 | 45 | compiler: [{c: clang, cxx: clang++}]
|
22 | 46 |
|
23 |
| - runs-on: ${{matrix.adapter.name}} |
| 47 | + runs-on: ${{inputs.runner_tag}} |
24 | 48 |
|
25 | 49 | steps:
|
26 | 50 | # Workspace on self-hosted runners is not cleaned automatically.
|
|
31 | 55 | ls -la ./
|
32 | 56 | rm -rf ./* || true
|
33 | 57 |
|
| 58 | + - uses: xt0rted/pull-request-comment-branch@d97294d304604fa98a2600a6e2f916a84b596dc7 # v2.0.0 |
| 59 | + id: comment-branch |
| 60 | + |
| 61 | + - name: Add comment to PR |
| 62 | + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 |
| 63 | + if: always() |
| 64 | + with: |
| 65 | + script: | |
| 66 | + const adapter = '${{ matrix.adapter.name }}'; |
| 67 | + const url = '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'; |
| 68 | + const body = `E2E ${adapter} build: \n${url}`; |
| 69 | +
|
| 70 | + github.rest.issues.createComment({ |
| 71 | + issue_number: context.issue.number, |
| 72 | + owner: context.repo.owner, |
| 73 | + repo: context.repo.repo, |
| 74 | + body: body |
| 75 | + }) |
| 76 | +
|
34 | 77 | - name: Checkout UR
|
35 | 78 | uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
36 | 79 | with:
|
|
0 commit comments