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

Reusable workflows #331

Merged
merged 3 commits into from
Dec 20, 2021
Merged

Reusable workflows #331

merged 3 commits into from
Dec 20, 2021

Conversation

zakkak
Copy link
Collaborator

@zakkak zakkak commented Dec 17, 2021

  • Allows the whole matrix to run under a single CI run while making the base workflow reusable by other branches so that we can stop replicating CI pipelines in release branches. This has the following benefits:
    1. The whole matrix runs a lot faster (~4h for all combinations instead of ~2h per combination in some cases)

      Before:
      image

      After:
      image

    2. It's much easier to understand what fails in the whole matrix by inspecting a single page (it used to be 8)

    3. We can now test the workflow in PRs that affect it

  • Adds wrappers for workflow_dispatch, so that we can still run custom jobs with gh workflow run...
  • Makes artifacts unique per reusable workflow inputs. This is necessary since when using reusable workflows and calling a reusable workflow multiple times from the same caller workflow will result in artifact-name collisions.

Special thanks to @gvre for:

  • Making me aware of the GA of reusable workflows
  • Reading my rants while I was exploring the uncharted waters of reusable workflows
  • Helping me overcome some of the obstacles I faced while transitioning our pipeline from workflow_dispatch to workflow_call

* Allows the whole matrix to run under a single CI run while making the
  base workflow reusable by other branches so that we can stop
  replicating CI pipelines in release branches. This has the following benefits:
  1. The whole matrix runs a lot faster (~4h for all combinations
     instead of 2h per combination in some cases)
  2. It's much easier to understand what fails in the whole matrix by
     inspecting a single page (it used to be 8)
  3. We can now test the workflow in PRs that affect it
* Adds wrappers for workflow_dispatch, so that we can still run custom
  jobs with `gh workflow run`...
* Makes artifacts unique per reusable workflow inputs. This is necessary
  since when using reusable workflows and calling a reusable workflow
  multiple times from the same caller workflow will result in
  artifact-name collisions.
When using reusable workflows job names get prefixed with the caller job
name in the github UI. Shorter names make it easier to distinguish jobs
and understand what each job is doing.
@zakkak zakkak added enhancement New feature or request testing CI and testing related issues and PRs labels Dec 17, 2021
@zakkak zakkak self-assigned this Dec 17, 2021
@zakkak zakkak marked this pull request as ready for review December 20, 2021 07:39
@zakkak zakkak requested review from jerboaa and Karm December 20, 2021 07:40
Copy link
Collaborator

@jerboaa jerboaa left a comment

Choose a reason for hiding this comment

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

OK, but I'm not much use as a reviewer for gh workflow files ;-)

@zakkak
Copy link
Collaborator Author

zakkak commented Dec 20, 2021

OK, but I'm not much use as a reviewer for gh workflow files ;-)

I mostly include you and Karm in those to make sure you are aware of the changes and to spot potential high level issues. I don't expect you to parse the yaml file :)

@zakkak zakkak merged commit 9cb5a54 into graalvm:default Dec 20, 2021
@zakkak zakkak deleted the reusable-workflows branch December 20, 2021 10:28
zakkak added a commit to zakkak/mandrel that referenced this pull request Dec 21, 2021
graalvm#331 added reusable workflows
that allow us to invoke them from different branches (even repositories)
and avoid duplicating workflow definitions across branches (and
repositories).
zakkak added a commit to zakkak/mandrel that referenced this pull request Dec 21, 2021
graalvm#331 added reusable workflows
that allow us to invoke them from different branches (even repositories)
and avoid duplicating workflow definitions across branches (and
repositories).
zakkak added a commit that referenced this pull request Dec 22, 2021
#331 added reusable workflows
that allow us to invoke them from different branches (even repositories)
and avoid duplicating workflow definitions across branches (and
repositories).
Karm pushed a commit that referenced this pull request Oct 7, 2022
#331 added reusable workflows
that allow us to invoke them from different branches (even repositories)
and avoid duplicating workflow definitions across branches (and
repositories).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request oca-signed testing CI and testing related issues and PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants