Skip to content
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

[GHA] Remove e2e job dependencies #1733

Closed
wants to merge 1 commit into from
Closed
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
3 changes: 0 additions & 3 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,18 @@ jobs:
permissions:
contents: read
pull-requests: write
needs: [ubuntu-build, level-zero]
uses: ./.github/workflows/e2e_level_zero.yml

e2e-opencl:
name: E2E OpenCL
permissions:
contents: read
pull-requests: write
needs: [ubuntu-build, opencl]
uses: ./.github/workflows/e2e_opencl.yml

e2e-cuda:
name: E2E CUDA
permissions:
contents: read
pull-requests: write
needs: [ubuntu-build, cuda]
uses: ./.github/workflows/e2e_cuda.yml
20 changes: 20 additions & 0 deletions .github/workflows/e2e_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ jobs:
any_changed: ${{ steps.get-changed.outputs.any_changed }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Fetch PR's merge commit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have "approve and run" button for pull_request_target trigger? If not, we can't blindly fetch content from users in here, especially since it runs on our sel-hosted runners

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given it shows up in the check UI I would expect the approval and run button also applies but I don't have proof for that.

The more caveats and gotchas turn up the more I'm leaning towards going with #1734 for now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given it shows up in the check UI I would expect the approval and run button also applies but I don't have proof for that.

I just found in other docs that it's not true, unfortunately:

Workflows triggered by pull_request_target events are run in the context of the base branch. Since the base branch is considered trusted, workflows triggered by these events will always run, regardless of approval settings.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The more caveats and gotchas turn up the more I'm leaning towards going with #1734 for now.

yeah... either this or we come back to idea with dispatch trigger (like benchmarks)

if: ${{ github.event_name == 'pull_request_target' }}
env:
PR_NO: ${{github.event.issue.number}}
run: |
git fetch -- https://github.com/${{github.repository}} +refs/pull/${PR_NO}/*:refs/remotes/origin/pr/${PR_NO}/*
git checkout origin/pr/${PR_NO}/merge
git rev-parse origin/pr/${PR_NO}/merge

- name: Get changed files
id: get-changed
uses: tj-actions/changed-files@d6babd6899969df1a11d14c368283ea4436bca78 # v44.5.2
Expand Down Expand Up @@ -106,6 +116,16 @@ jobs:
with:
path: ur-repo

- name: Fetch PR's merge commit
if: ${{ github.event_name == 'pull_request_target' }}
working-directory: ${{github.workspace}}/ur-repo
env:
PR_NO: ${{github.event.issue.number}}
run: |
git fetch -- https://github.com/${{github.repository}} +refs/pull/${PR_NO}/*:refs/remotes/origin/pr/${PR_NO}/*
git checkout origin/pr/${PR_NO}/merge
git rev-parse origin/pr/${PR_NO}/merge

- name: Checkout SYCL
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
Expand Down
Loading