Skip to content

[CI] Let sycl-devops-pr/** branches trigger pre/post-commit #10002

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
Jun 21, 2023

Conversation

aelovikov-intel
Copy link
Contributor

@aelovikov-intel aelovikov-intel commented Jun 20, 2023

In #9950 I envisioned a setup when there will be a dedicated devops pre-commit task that would create fake branch/PR in the repository to verify changes affecting CI. I later realized that we can just push the source branch for such a PR directly to origin and use that for testing.

As such, rename which branch is allowed to trigger post-commit and allow the same for pre-commit. Future changes are expected to be done like this:

  • create branch sycl-devops-pr/<name> in intel/llvm repo, it will
    run post-commit testing.
  • create PR out of that branch
  • create an extra draft PR with a target branch set to the same
    sycl-devops-pr/<name>, that will run pre-commit testing.

In #9950 I envisioned a setup when there will be a dedicated devops
pre-commit task that would create fake branch/PR in the repository to
verify changes affecting CI. I later realized that we can just push the
source branch for such a PR directly to origin and use that for testing.

As such, rename which branch is allowed to trigger post-commit and allow
the same for pre-commit.
@aelovikov-intel
Copy link
Contributor Author

Tested
Post-commit: https://github.com/intel/llvm/actions/runs/5328224599
Pre-commit: https://github.com/intel/llvm/actions/runs/5328099732

I've cancelled both of the runs after initial/first task finished because the trigger itself is being changed in this PR.

@aelovikov-intel aelovikov-intel marked this pull request as ready for review June 20, 2023 23:13
@aelovikov-intel aelovikov-intel requested a review from a team as a code owner June 20, 2023 23:13
Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

I like this idea!

@aelovikov-intel aelovikov-intel merged commit ed392bf into sycl Jun 21, 2023
@aelovikov-intel aelovikov-intel deleted the sycl-devops-pr/change-post-branch branch June 21, 2023 15:21
aelovikov-intel added a commit that referenced this pull request Jan 23, 2025
It was originally added in #10002,
back when we used `pull_request_target` for pre-commit trigger. Now that
`pull_request` is used it isn't (as) necessary.

I'm also adding a `workflow_dispatch` trigger for the post-commit job
for cases when somebody wants to test extensive non-CI changes with
post-commit before the merge. I think that will work but it's impossible
to verify before merging this due to how GHA work.

This will address the following usage scenario:
  * Push CI-related changes to `sycl-devops-pr` (possibly several
    iterations)
  * Result are ok, open a PR from that branch
    - extra post-commit task is spawned for the commit that has been
      tested already (this duplication will remain, unfortunately)
  * Address review feedback with a new upload
    - two post-commit jobs are automatically launched (after this PR, no
      manual dispatch would happen here, leaving only automatic
      pre-commit testing of the post-commit workflow)
aelovikov-intel added a commit that referenced this pull request Jan 23, 2025
It was originally added in #10002,
back when we used `pull_request_target` for pre-commit trigger. Now that
`pull_request` is used it isn't (as) necessary.

I'm also adding a `workflow_dispatch` trigger for the post-commit job
for cases when somebody wants to test extensive non-CI changes with
post-commit before the merge. I think that will work but it's impossible
to verify before merging this due to how GHA work.

This will address the following usage scenario:
* Push CI-related changes to `sycl-devops-pr` (possibly several
iterations)
  * Result are ok, open a PR from that branch
- extra post-commit task is spawned for the commit that has been tested
already (this duplication will remain, unfortunately)
  * Address review feedback with a new upload
- two post-commit jobs are automatically launched (after this PR, no
manual dispatch would happen here, leaving only automatic pre-commit
testing of the post-commit workflow)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants