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] Separate out hardware workflows #1530

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

kbenzie
Copy link
Contributor

@kbenzie kbenzie commented Apr 19, 2024

The goal of this patch is to make a failure of one HW build & test job only cancel jobs running on the same HW tag rather than all HW jobs for all adapters. It does this by moving the hardware jobs out of the cmake.yml workflow into the new build-hw-reusable.yml workflow, which as the name suggests is reusable. This reusable workflow is then used in by adapter specific jobs in the cmake.yml workflow to display jobs in a group which is collapsible.

@kbenzie kbenzie force-pushed the benie/gha-separate-hw-workflows branch from a12f8fe to d68ee89 Compare April 19, 2024 15:13
@github-actions github-actions bot added the ci/cd Continuous integration/devliery label Apr 19, 2024
@kbenzie kbenzie force-pushed the benie/gha-separate-hw-workflows branch 6 times, most recently from 97c67b0 to 1757cf7 Compare April 19, 2024 16:07
@kbenzie kbenzie marked this pull request as ready for review April 19, 2024 16:14
@kbenzie kbenzie requested a review from a team as a code owner April 19, 2024 16:14
.github/workflows/build-hw-level-zero.yml Outdated Show resolved Hide resolved
@lukaszstolarczuk
Copy link
Contributor

At the same time I like this change and I don't 😉 I think both of your goals are good, but I'd propose a slightly different implementation. If you feel like you still prefer your way I'm not going to be stubborn.

The reusable workflow is good, but in current approach it spawns a few more workflows per each PR. It's not that big of a deal, but instead of creating new files (per each adapter) we could do jobs per each adapter in cmake.yml, like the code below.
I think it should still achive your goals, it will omit the bloat code for each workflow file, and keep a little order in the workflows.

jobs:
  ...
  cuda:
    uses: ./.github/workflows/build-hw-reusable.yml
    with:
      name: CUDA
  hip:
    uses: ./.github/workflows/build-hw-reusable.yml
    with:
      name: HIP
  ...

Example "Checks" view on PR page:
image
vs
image
(all building workflows would be hidden as jobs in "Build and test", as it is now)

@kbenzie
Copy link
Contributor Author

kbenzie commented Apr 23, 2024

I think it should still achive your goals, it will omit the bloat code for each workflow file, and keep a little order in the workflows.

I'll try this out. I'm not 100% happy with how things got split up and displayed in my current approach either.

@kbenzie kbenzie force-pushed the benie/gha-separate-hw-workflows branch from 86cb3af to cdda8c2 Compare April 23, 2024 13:45
@kbenzie kbenzie requested a review from a team as a code owner April 23, 2024 13:49
@kbenzie
Copy link
Contributor Author

kbenzie commented Apr 23, 2024

@lukaszstolarczuk this looks good, on here I like how the adapter jobs are also collapsable. I'm tempted to split out the other jobs in the cmake.yml in a similar way if only for ease of browsing the Build and test workflow.

@kbenzie
Copy link
Contributor Author

kbenzie commented Apr 23, 2024

One thing this approach doesn't do, which I liked about the separate workflows, is allow for retrying just the jobs for a single adapter. The whole cmake.yml workflow needs to complete before I can retry, this would be nice for when a short term network related issue pops up.

@kbenzie kbenzie force-pushed the benie/gha-separate-hw-workflows branch from ce5f2ad to 5b9bb8e Compare April 23, 2024 14:01
The goal of this patch is to make a failure of one HW build & test job
only cancel jobs running on the same HW tag rather than all HW jobs for
all adapters. It does this by moving the hardware jobs out of the
`cmake.yml` workflow into the new `build-hw-reusable.yml` workflow,
which as the name suggests is reusable. This reusable workflow is then
used in by adapter specific jobs in the `cmake.yml` workflow to display
jobs in a group which is collapsible.
@kbenzie kbenzie force-pushed the benie/gha-separate-hw-workflows branch from 5b9bb8e to 9cf23eb Compare April 29, 2024 15:27
@kbenzie kbenzie merged commit 70a1e78 into oneapi-src:main Apr 30, 2024
51 checks passed
@kbenzie kbenzie deleted the benie/gha-separate-hw-workflows branch June 11, 2024 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/cd Continuous integration/devliery
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants