Skip to content

CI: Update Elixir & OTP build matrix, support old OTP versions - #200

Open
sgerrand wants to merge 6 commits into
michalmuskala:masterfrom
sgerrand:ci-add-elixir-1.16-otp-17
Open

CI: Update Elixir & OTP build matrix, support old OTP versions#200
sgerrand wants to merge 6 commits into
michalmuskala:masterfrom
sgerrand:ci-add-elixir-1.16-otp-17

Conversation

@sgerrand

@sgerrand sgerrand commented Apr 24, 2025

Copy link
Copy Markdown

💁 These changes update the the matrix of versions used in continuous integration to include:

  • Elixir 1.16, 1.17 and 1.18
  • OTP 27

I've followed the existing pattern of incrementing the Elixir minor version in lockstep with the most recent major version of Erlang/OTP that's supported by that Elixir version.

⚠️ The other significant part of these changes is to mitigate GitHub's recent retirement of ubuntu-20.04 as a runner image which can't be used by a GitHub Actions workflow job any more.

This is a scheduled Ubuntu 20.04 retirement. Ubuntu 20.04 LTS runner will be removed on 2025-04-15. For more details, see https://github.com/actions/runner-images/issues/11101

To minimise the size of changes I've split the original test job into 2 separate jobs:

@sgerrand

sgerrand commented May 1, 2025

Copy link
Copy Markdown
Author

👋 @michalmuskala, would you please review this change when you have a moment.

@michalmuskala

michalmuskala commented May 1, 2025

Copy link
Copy Markdown
Owner

Sorry for the delay. Looks like there's an issue with the chosen OTP/Elixir version pair.

In general the pattern we tried to follow is to test every dot Elixir release with the latest Erlang it supports - if we end up with some Erlang version not covered we bump down one of the previous Elixir releases. That said, it gets out of sync. Feel free to make bigger changes to this to cover all the missing Elixir releases, I'd be happy to merge.

Thank you for looking into this!

@sgerrand

sgerrand commented May 1, 2025

Copy link
Copy Markdown
Author

No worries and thank you for the guidance. I'll take another approach to the work that I've done to date.

@sgerrand
sgerrand force-pushed the ci-add-elixir-1.16-otp-17 branch from e250d3c to c07cd28 Compare May 1, 2025 21:41
Comment thread .github/workflows/ci.yml Outdated

@sgerrand sgerrand left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

⚠️ Found a breaking change, will try to resolve it.

Comment thread .github/workflows/ci.yml Outdated
@@ -18,42 +18,83 @@ jobs:
- elixir: 1.4.x
otp: 20
os: ubuntu-20.04

@sgerrand sgerrand May 2, 2025

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This runner image has been retired and can't be used by a GitHub Actions workflow job any more.

This is a scheduled Ubuntu 20.04 retirement. Ubuntu 20.04 LTS runner will be removed on 2025-04-15. For more details, see https://github.com/actions/runner-images/issues/11101

The implications of this are that any Elixir & OTP pairs which used ubuntu-20.04 as the runner image will break as the erlef/setup-beam action uses Hex.pm's OTP builds as the source of available builds. This means that OTP versions 20.x - 24.1 inclusive aren't available for download and installation.

I'll see if I can find a replacement image or another approach which enables keeping these older OTP versions in the build matrix.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

No luck in finding an immediate replacement for this deprecated image. However, I have successfully tested that OTP versions built for Ubuntu 20.04 work fine on Ubuntu 22.04. I plan to propose that Hex.pm's builder be extended to account for these deprecations of GitHub's ubuntu-20.04 runner image.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I ended up resolving this problem by creating a similar job in 71212eb and slicing the parts of the build matrix which depend on Ubuntu 20.04 in a container instead. It will make the workflow definition a little more cumbersome to maintain but the older Elixir & OTP pairs are unlikely to change.

@sgerrand

sgerrand commented May 2, 2025

Copy link
Copy Markdown
Author

@michalmuskala: GitHub are about to retire the ubuntu-20.04 runner image used by this Actions workflow job, which means that OTP versions 20, 21, 22 and 23 can't be installed by the erlef/setup-beam action. (More details on this above)

I'm happy to remove the affected Elixir & OTP version pairs from the build matrix but you may wish to keep testing against those older releases. Let me know your thoughts when you can?

GitHub retired the `ubuntu-20.04` runner image last month. These changes
add a new job which runs the Elixir & OTP pairs which need that Ubuntu
version in a container which uses the official Docker image instead.

A sample error from the existing GitHub workflow job follows:
```
This is a scheduled Ubuntu 20.04 retirement. Ubuntu 20.04 LTS runner
will be removed on 2025-04-15. For more details, see
actions/runner-images#11101
```
@sgerrand
sgerrand force-pushed the ci-add-elixir-1.16-otp-17 branch from 54d2523 to 71212eb Compare May 6, 2025 15:55
@sgerrand

sgerrand commented May 6, 2025

Copy link
Copy Markdown
Author

👋 @michalmuskala: These changes are ready for your review again and should be mergable.

@sgerrand sgerrand changed the title CI: Add Elixir 1.16, OTP 27 CI: Update Elixir & OTP build matrix, support old OTP versions May 6, 2025
@sgerrand

sgerrand commented May 9, 2025

Copy link
Copy Markdown
Author

👋 @michalmuskala, would you please review this change when you have a moment.

@sgerrand

Copy link
Copy Markdown
Author

👋 @michalmuskala, a gentle nudge to review these changes.

@sgerrand

Copy link
Copy Markdown
Author

🛎️ Ping?

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