From 38f4d7f9f294b69775e18fe6373cae0e6c907dea Mon Sep 17 00:00:00 2001 From: Piotr Balcer Date: Tue, 27 Feb 2024 14:28:56 +0000 Subject: [PATCH] use correct checkout ref in e2e and add a status comment --- .github/workflows/e2e_core.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/e2e_core.yml b/.github/workflows/e2e_core.yml index 413ffef708..3fd858bf8f 100644 --- a/.github/workflows/e2e_core.yml +++ b/.github/workflows/e2e_core.yml @@ -84,6 +84,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: path: ur-repo + ref: ${{ steps.comment-branch.outputs.head_ref }} - name: Checkout SYCL uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 @@ -174,4 +175,22 @@ jobs: -DLLVM_LIT="${{github.workspace}}/sycl-repo/llvm/utils/lit/lit.py" - name: Run e2e tests + id: tests run: ninja -C build-e2e check-sycl-e2e + + - 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 status = ${{ steps.tests.outcome }}; + const body = `E2E ${adapter} build: \n${url}\n Status: ${status}`; + + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: body + })