Skip to content

chore: Update Ubuntu versions from 20.04/22.04 to 24.04 in GitHub workflows #178

chore: Update Ubuntu versions from 20.04/22.04 to 24.04 in GitHub workflows

chore: Update Ubuntu versions from 20.04/22.04 to 24.04 in GitHub workflows #178

Workflow file for this run

name: Build and Test
on:
push:
branches: [main]
paths-ignore:
- '**.md' #Do not need to run CI for markdown changes.
pull_request:
branches: [main]
paths-ignore:
- '**.md'
workflow_dispatch:
jobs:
build-test:
strategy:
# We want to know the status of all OTP versions, not just if one of them fails.
fail-fast: false
matrix:
versions:
- { otp: "21.x", rebar: "0be8717a4ff5b4a0c3dcef5031fe9833197d861e" } # rebar 3.15.2
- { otp: "25.x", rebar: "174fd9070195443d693d444ecd1f2b7aa91661fe" } # rebar 3.18.0
- { otp: "27.x", rebar: "bde4b54248d16280b2c70a244aca3bb7566e2033" } # rebar 3.23.0
runs-on: ubuntu-24.04
name: Build and Test - ${{ matrix.versions.otp }}
steps:
- name: Install kerl
run: |
curl -s https://raw.githubusercontent.com/kerl/kerl/master/kerl > /tmp/kerl
chmod a+x /tmp/kerl
- name: Install Erlang OTP and rebar3
run: |
# Map OTP version patterns to specific versions
if [[ "${{ matrix.versions.otp }}" == "21.x" ]]; then
OTP_VERSION="21.3.8.24"
elif [[ "${{ matrix.versions.otp }}" == "25.x" ]]; then
OTP_VERSION="25.3.2.19"
elif [[ "${{ matrix.versions.otp }}" == "27.x" ]]; then
OTP_VERSION="27.3.2"
else
echo "Unsupported OTP version: ${{ matrix.versions.otp }}"
exit 1
fi
# Build and install Erlang
/tmp/kerl build $OTP_VERSION $OTP_VERSION
/tmp/kerl install $OTP_VERSION ~/otp/$OTP_VERSION
. ~/otp/$OTP_VERSION/activate
# Install specific rebar3 version
pushd .
cd ~/
git clone https://github.com/erlang/rebar3.git
cd rebar3
git checkout ${{ matrix.versions.rebar }}
./bootstrap
./rebar3 local install
export PATH=$HOME/otp/${{ matrix.versions.otp }}/.cache/rebar3/bin:$PATH
echo "$HOME/otp/${{ matrix.versions.otp }}/.cache/rebar3/bin" >> "$GITHUB_PATH"
popd
# Verify installation
echo "Installed Erlang version:"
erl -noshell -eval 'io:format("~s~n", [erlang:system_info(otp_release)]), halt().'
echo "Installed rebar3 version:"
rebar3 --version
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/ci
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
env:
OTP_VER: ${{ matrix.versions.otp }}