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

Refactor CI workflow #43

Merged
merged 8 commits into from
Aug 6, 2024
Merged

Refactor CI workflow #43

merged 8 commits into from
Aug 6, 2024

Conversation

jgarber623
Copy link

@jgarber623 jgarber623 commented Aug 5, 2024

Description

This PR renames and refactors the project's GitHub Actions CI workflow. The updated workflow will now run on:

  • pushes to main,
  • pull requests against main, and
  • by manual invocation via GitHub's UI

Notable changes to the workflow include:

  • use CargoSense/setup-elixir-project reusable workflow (in Ubuntu job, at least)
  • adds Ubuntu and macOS to the test matrix
  • refactors existing Ubuntu test job
  • adds a new macOS test job
  • specifies oldest and newest Elixir and Erlang combo in the matrix
  • use latest actions/checkout
  • sets job name to use matrix values for clarity

The macOS job takes a necessarily different tact for installing Erlang and Elixir owing to the underlying erlef/setup-beam workflow not (yet) supporting macOS (see erlef/setup-beam#54).

This workflow will run on:

- pushes to main,
- pull requests against main, and
- by manual invocation via GitHub's UI
- use CargoSense/setup-elixir-project reusable workflow
- adds Ubuntu and macOS to the test matrix
- specifies oldest and newest Elixir and Erlang combo in the matrix
- use latest actions/checkout
- sets job name to use matrix values for clarity
@jgarber623 jgarber623 requested a review from a team as a code owner August 5, 2024 13:03
@jgarber623 jgarber623 self-assigned this Aug 5, 2024
@jgarber623
Copy link
Author

Error on the macOS job:

Error: @erlef/setup-beam only supports Ubuntu and Windows at this time

😭

@jgarber623 jgarber623 force-pushed the github-actions-refactor branch from d844164 to 540b967 Compare August 5, 2024 13:35
Turns out the underlying setup-beam workflow doesn't support macOS [1].

This change breaks out that OS into its own job whereby we ~~install
Erlang and (some version of) Elixir using Homebrew~~ use ASDF to install
the matrix'ed versions of Elixir and Erlang. I (originally) derived this
solution from [2].

🤞🏻 Let's see if it works!

[1] erlef/setup-beam#54
[2] https://github.com/rusterlium/rustler/blob/master/.github/workflows/main.yml

Squashed WIP commits with the following commit messages:

- 0a42b83 YAML 🥴
- 5b9a38a Fix runs-on values
- 95f2fd8 Try using asdf reusable workflow to install Elixir and Erlang
- 1785e90 Update macOS job name
- 3277cef Install Hex
- 5d1d30d Install dependencies in macOS jobs
@jgarber623 jgarber623 force-pushed the github-actions-refactor branch from 5d1d30d to a0b8826 Compare August 5, 2024 15:27
.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
jgarber623-cargosense and others added 2 commits August 6, 2024 11:41
PR #43 feedback.

Co-authored-by: Michael Crumm <michael.crumm@cargosense.com>
PR #43 feedback.

Co-authored-by: Michael Crumm <michael.crumm@cargosense.com>
Copy link
Member

@mcrumm mcrumm left a comment

Choose a reason for hiding this comment

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

macOS runners ftw! 🚀

@mcrumm mcrumm merged commit b30c494 into main Aug 6, 2024
4 checks passed
@mcrumm mcrumm deleted the github-actions-refactor branch August 6, 2024 17:33
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