ubuntu-24.04 is available, 20.04 will be fully unsupported by 2025-04-15
Update 5 december: The Ubuntu 20.04 Actions runner image will begin deprecation on 2025-02-01 and will be fully unsupported by 2025-04-01, see https://github.com/actions/runner-images/issues/11101
Update 18 november: I've updated several repositories to use ubuntu-24.04 instead of 20.04 or 22.04. In particular, ejabberd in d3baacd7 updates ubuntu to 24.04 (and use containers in Runtime) for all workflows and jobs except CI.
Ubuntu runners
GitHub Actions provides several runners where we can run our workflows:
- ubuntu-20.04 includes Erlang/OTP 24
- ubuntu-22.04 doesn't include Erlang/OTP https://github.com/actions/runner-images/issues/5490
- ubuntu-24.04 doesn't either
Now that GitHub is considering ubuntu-24.04 as ubuntu-latest, it is expected that in the near future ubuntu-20.04 will be marked as obsolete. Once that time arrives, we will have to upgrade our actions from ubuntu-20.04 to ubuntu-22.04 or higher.
Erlang/OTP install methods
When the runner doesn't include Erlang/OTP (for example ubuntu-22.0.4 and higher), or we want to use a specific erlang version, our workflows use two alternative methods to install Erlang, depending on the requirements of the workflow:
A) Erlang Docker container, suitable for simple tasks (running rebar3/mix, compiling, testing dialyzer, starting/stopping ejabberd)
jobs:
tests:
strategy:
matrix:
otp: [20, 25, 26, 27]
container:
image: erlang:${{ matrix.otp }}
B) erlef/setup-beam action is suitable for complex tasks (setting up databases and run ejabberd CI), but in ubuntu-22.04 the lower erlang supported is 24.2.
jobs:
tests:
name: Tests
strategy:
matrix:
otp: ['23.0', '25', '26', '27']
elixir: ['1.13', '1.15', '1.16', '1.17']
steps:
- name: Get specific Erlang/OTP
uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
Our Ubuntu usage
This is a summary of what we are using right now:
| repository | workflow | job | runs-on | erlang install method |
|---|---|---|---|---|
| ejabberd | ci.yml | tests | 20.04 :warning: | setup-beam |
| ejabberd | container.yml | container | 24.04 | not needed |
| ejabberd | installers.yml | binaries | 24.04 | not needed |
| ejabberd | installers.yml | release | 24.04 | not needed |
| ejabberd | runtime.yml | rebars | 24.04 | container |
| ejabberd | runtime.yml | rebar3-elixir | 24.04 | container |
| ejabberd | runtime.yml | mix | 24.04 | container |
| ejabberd-contrib | ci.yml | tests | 24.04 | container |
| docker-ejabberd | tests.yml | tests | 24.04 | not needed |
| docs | ci.yml | deploy | latest | not needed |
| ejabberd-api | build.yml | build | latest | not needed |
| xmpp | ci.yml | tests | 24.04 | container |
| others (cache_tab, eimp, ...) | ci.yml | tests | 20.04/22.04 :warning: | container |
As ejabberd supports from Erlang/OTP 20.0 up, for complex tests like ejabberd's ci and runtime, we need to use ubuntu-20.04. In ubuntu-22.04 there's no way to install Erlang/OTP older than 24.2 to use it for complex tests.
What to expect in the future
As mentioned in https://github.com/actions/runner-images/issues/10636
We support two latest LTS Ubuntu versions, so Ubuntu 22 will still be available in near future.
In the future when ubuntu-20.04 runner is deleted and we are forced to use ubuntu-22.04, I expect that there will be no way to test ejabberd with Erlang/OTP lower than 24.2. When that time arrives, we may have to raise the Erlang/OTP requirement in ejabberd to 24.2.
Unfortunately, building the binary toolchain now fails while trying to generate glibc's info documentation. The problem is a bug in the Texinfo version shipped with Ubuntu 24.04 (this went unnoticed as long as the cached version of the toolchain was used until now).
I guess we could install a fixed Texinfo version within the image, but for the moment, I'd just revert the Installers action to Ubuntu 22.04.
Aha, great finding!
Seems the bug was introduced in texinfo 7.1 and fixed later. So installers.yml should work with texinfo 7.0.3 (and lower) or 7.1.1 (and higher). Unfortunately, the ubuntu-24.04 image includes 7.1-3build2 right now.
So yes, I'll revert installers.yml to ubuntu-22.04 image which includes 6.8-4build1
I'll keep an eye on ubuntu-24.04 image, and once it includes a fixed texinfo, we can update installers.yml to it. Otherwise, if 24.04 never gets the fix, we will jump directly to ubuntu-26.04