Skip to content

Commit 226348f

Browse files
chore: Update Ubuntu versions from 20.04/22.04 to 24.04 in GitHub workflows (#146)
Update workflows to use ubuntu 24.04 --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent 1b3620a commit 226348f

File tree

6 files changed

+79
-32
lines changed

6 files changed

+79
-32
lines changed

.github/actions/ci/action.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,18 @@ runs:
1717
steps:
1818
- run: make compile
1919
shell: bash
20-
- uses: supercharge/redis-github-action@1.6.0
20+
- uses: supercharge/redis-github-action@ea9b21c6ecece47bd99595c532e481390ea0f044
2121
- run: make ci-tests
2222
shell: bash
2323
- uses: ./.github/actions/build-docs
2424
- run: make dialyze
2525
shell: bash
2626
- run: make build-contract-tests
2727
shell: bash
28-
- run: make start-contract-test-service-bg
28+
- name: Start contract test service
2929
shell: bash
30-
- uses: launchdarkly/gh-actions/actions/[email protected]
30+
run: make start-contract-test-service-bg
31+
- uses: launchdarkly/gh-actions/actions/[email protected]
3132
with:
3233
test_service_port: 8000
3334
token: ${{ inputs.github_token }}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: 'Install Erlang OTP and rebar3'
2+
description: 'Installs a specific version of Erlang OTP and rebar3'
3+
inputs:
4+
otp_version:
5+
description: 'The OTP version to install'
6+
required: false
7+
default: '25.3.2.19'
8+
rebar_version:
9+
description: 'The rebar3 version to install'
10+
required: false
11+
default: '174fd9070195443d693d444ecd1f2b7aa91661fe' # 3.18.0
12+
runs:
13+
using: "composite"
14+
steps:
15+
16+
- name: Install kerl
17+
shell: bash
18+
run: |
19+
curl -s https://raw.githubusercontent.com/kerl/kerl/master/kerl > /tmp/kerl
20+
chmod a+x /tmp/kerl
21+
22+
- name: Install Erlang OTP and rebar3
23+
shell: bash
24+
run: |
25+
# Build and install Erlang
26+
/tmp/kerl build ${{ inputs.otp_version }} ${{ inputs.otp_version }}
27+
/tmp/kerl install ${{ inputs.otp_version }} ~/otp/${{ inputs.otp_version }}
28+
# This will make the erlang version available to the current shell.
29+
. ~/otp/${{ inputs.otp_version }}/activate
30+
# Persist to the github actions path for use in future steps.
31+
echo "$HOME/otp/${{ inputs.otp_version }}/bin" >> "$GITHUB_PATH"
32+
33+
# Install specific rebar3 version
34+
cd ~/
35+
git clone https://github.com/erlang/rebar3.git
36+
cd rebar3
37+
git checkout ${{ matrix.versions.rebar }}
38+
./bootstrap
39+
./rebar3 local install
40+
41+
# Add to the path for use in this step.
42+
export PATH=$HOME/otp/${{ inputs.otp_version }}/.cache/rebar3/bin:$PATH
43+
# Persist to the github actions path for use in future steps.
44+
echo "$HOME/otp/${{ inputs.otp_version }}/.cache/rebar3/bin" >> "$GITHUB_PATH"
45+
46+
# Verify installation
47+
echo "Installed Erlang version:"
48+
erl -noshell -eval 'io:format("~s~n", [erlang:system_info(otp_release)]), halt().'
49+
echo "Installed rebar3 version:"
50+
rebar3 --version

.github/workflows/ci.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,24 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
versions:
21-
- {os: 'ubuntu-20.04', otp: '21.x', rebar: '3.15.2'}
22-
- {os: 'ubuntu-22.04', otp: '25.x', rebar: '3.18.0'}
23-
- {os: 'ubuntu-22.04', otp: '27.x', rebar: '3.23.0'}
21+
- { otp: "21.3.8.24", rebar: "0be8717a4ff5b4a0c3dcef5031fe9833197d861e" } # rebar 3.15.2
22+
- { otp: "25.3.2.19", rebar: "174fd9070195443d693d444ecd1f2b7aa91661fe" } # rebar 3.18.0
23+
- { otp: "27.3.2", rebar: "bde4b54248d16280b2c70a244aca3bb7566e2033" } # rebar 3.23.0
2424

25-
runs-on: ${{ matrix.versions.os }}
25+
runs-on: ubuntu-24.04
2626
name: Build and Test - ${{ matrix.versions.otp }}
2727

2828
steps:
29-
- uses: erlef/setup-beam@v1
30-
with:
31-
version-type: loose
32-
otp-version: ${{ matrix.versions.otp }}
33-
rebar3-version: ${{ matrix.versions.rebar }}
3429
- uses: actions/checkout@v3
3530
with:
3631
fetch-depth: 0
3732

33+
- name: Install Erlang and rebar3
34+
uses: ./.github/actions/install-erlang
35+
with:
36+
otp_version: ${{ matrix.versions.otp }}
37+
rebar_version: ${{ matrix.versions.rebar }}
38+
3839
- uses: ./.github/actions/ci
3940
with:
4041
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/manual-publish-docs.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,17 @@ on:
44
name: Publish Documentation
55
jobs:
66
build-publish:
7-
runs-on: ubuntu-22.04
7+
runs-on: ubuntu-24.04
88
# Needed to get tokens during publishing.
99
permissions:
1010
id-token: write
1111
contents: write # Need to publish github pages.
1212
steps:
13-
- uses: erlef/setup-beam@v1
14-
with:
15-
version-type: loose
16-
otp-version: 25.x
17-
rebar3-version: 3.18.0
1813
- uses: actions/checkout@v3
14+
15+
- name: Install Erlang and rebar3
16+
uses: ./.github/actions/install-erlang
17+
1918
- id: build
2019
name: Build Documentation
2120
uses: ./.github/actions/build-docs

.github/workflows/manual-publish.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,17 @@ on:
99

1010
jobs:
1111
manual-build-publish:
12-
runs-on: ubuntu-22.04
12+
runs-on: ubuntu-24.04
1313
# Needed to get tokens during publishing.
1414
permissions:
1515
id-token: write
1616
contents: read
1717
steps:
18-
- uses: erlef/setup-beam@v1
19-
with:
20-
version-type: loose
21-
otp-version: 25.x
22-
rebar3-version: 3.18.0
2318
- uses: actions/checkout@v3
19+
20+
- name: Install Erlang and rebar3
21+
uses: ./.github/actions/install-erlang
22+
2423
- id: build-and-test
2524
# Build using the same steps from CI.
2625
name: Build and Test

.github/workflows/release-please.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
release-package:
10-
runs-on: ubuntu-latest
10+
runs-on: ubuntu-24.04
1111
permissions:
1212
id-token: write # Needed if using OIDC to get release secrets.
1313
contents: write # Contents and pull-requests are for release-please to make releases.
@@ -21,18 +21,15 @@ jobs:
2121
token: ${{secrets.GITHUB_TOKEN}}
2222
default-branch: main
2323

24-
- uses: erlef/setup-beam@v1
25-
if: ${{ steps.release.outputs.releases_created }}
26-
with:
27-
version-type: loose
28-
otp-version: 25.x
29-
rebar3-version: 3.18.0
30-
3124
- uses: actions/checkout@v3
3225
if: ${{ steps.release.outputs.releases_created }}
3326
with:
3427
fetch-depth: 0 #If you only need the current version keep this.
3528

29+
- name: Install Erlang and rebar3
30+
if: ${{ steps.release.outputs.releases_created }}
31+
uses: ./.github/actions/install-erlang
32+
3633
- uses: ./.github/actions/configure-rebar
3734
with:
3835
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}

0 commit comments

Comments
 (0)