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

CI: Unify build jobs with reusable workflows #583

Merged
merged 1 commit into from
Jun 10, 2023

Conversation

guihkx
Copy link
Collaborator

@guihkx guihkx commented Jun 10, 2023

Instead of having individual workflow runs for every git operation, we can instead make them 'reusable' and then bundle all of them into a single, central workflow (which we will call CI).

Having them unified into a single workflow like that has several advantages:

  • Build jobs will only run if the Code Linting workflow passes first: Previously, build jobs would run in parallel with the linting workflow, which is probably undesired.

  • Build artifacts for every OS will be all in the same job.

  • This makes release automation much easier, which I intend to do next.

Finally, if for some reason we want to run a specific workflow individually (instead of running of all them), I've kept the workflow_dispatch option in each workflow, so we can always dispatch them manually.

Instead of having individual workflow runs for every git operation, we
can instead make them 'reusable'[1] and then bundle all of them into a
single, central workflow (which we will call 'CI').

Having them unified into a single workflow like that has several
advantages:

- Build jobs will only run if the 'Code Linting' workflow passes first:
  Previously, build jobs would run in parallel with the linting
  workflow, which is probably undesired.

- Build artifacts for every OS will be all in the same job.

- This makes release automation much easier, which I intend to do next.

Finally, if for some reason we want to run a specific workflow
individually (instead of running of all them), I've kept the
'workflow_dispatch' option[2] in each workflow, so we can always
dispatch them manually.

[1] https://docs.github.com/en/actions/using-workflows/reusing-workflows
[2] https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
@guihkx
Copy link
Collaborator Author

guihkx commented Jun 10, 2023

This setup looks kinda convoluted if you view it from the Checks tab in this pull request, but if you go to the Actions page instead, it looks much better, IMO.

Anyway, let me know your thoughts.

Copy link
Collaborator

@zjeffer zjeffer 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 it!

@nuttyartist
Copy link
Owner

nuttyartist commented Jun 10, 2023

I like it too! Looks much better this way, when everything is in one place.

@guihkx
Copy link
Collaborator Author

guihkx commented Jun 10, 2023

Awesome! 😄

@guihkx guihkx merged commit d9f0c8b into nuttyartist:master Jun 10, 2023
@guihkx guihkx deleted the ci-reusable-workflows branch June 10, 2023 17:48
@guihkx
Copy link
Collaborator Author

guihkx commented Jun 10, 2023

I just pushed a commit (5b76489) directly into master to address the failing macOS build, which was caused by the lack of access to GitHub Secrets.

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.

3 participants