From f01677241724a98b9f2ea45848728340cba65c93 Mon Sep 17 00:00:00 2001 From: Sebastian Weddmark Olsson Date: Fri, 20 Dec 2024 08:47:30 +0100 Subject: [PATCH 1/5] Compatibility matrix strategy Example on how one can maintain a compatibility matrix --- README.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/README.md b/README.md index b073f508..c41244ea 100644 --- a/README.md +++ b/README.md @@ -262,6 +262,59 @@ jobs: - run: rebar3 ct ``` +### Compatibility + +One can run matrix-style testing but with pinned compatible versions in the following manner: + +```yaml + test: + runs-on: ${{matrix.erlang.os}} + name: Erlang/OTP ${{matrix.erlang.otp}} / rebar3 ${{matrix.erlang.rebar3}} + strategy: + matrix: + erlang: + - otp: "17" + rebar3: "3.10.0" + os: ubuntu-18.04 + - otp: "18" + rebar3: "3.11.1" + os: ubuntu-18.04 + - otp: "19" + rebar3: "3.15.2" + os: ubuntu-18.04 + - otp: "20.3.8.26" + rebar3: "3.15.2" + os: ubuntu-18.04 + - otp: "21.3.8.17" + rebar3: "3.15.2" + os: ubuntu-20.04 + - otp: "22.3.4.9" + rebar3: "3.16.1" + os: ubuntu-20.04 + - otp: "23.3.4.5" + rebar3: "3.16.1" + os: ubuntu-22.04 + - otp: "24.3.4.17" + rebar3: "3.16.1" + os: ubuntu-22.04 + - otp: "25.3.2.15" + rebar3: "3.22.1" + os: ubuntu-24.04 + - otp: "26.2.5.5" + rebar3: "3.22.1" + os: ubuntu-24.04 + - otp: "27.1.2" + rebar3: "3.22.1" + os: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: erlef/setup-beam@v1 + with: + otp-version: ${{matrix.erlang.otp}} + rebar3-version: ${{matrix.erlang.rebar3}} + - run: rebar3 eunit +``` + ### Erlang/OTP + `rebar3`, on Windows ```yaml From d98502643a4b6581d93713ee18de486083884ee8 Mon Sep 17 00:00:00 2001 From: Sebastian Weddmark Olsson Date: Fri, 14 Feb 2025 23:26:17 +0100 Subject: [PATCH 2/5] v2 -> v4 Co-authored-by: Kian-Meng Ang --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c41244ea..f58012b1 100644 --- a/README.md +++ b/README.md @@ -307,7 +307,7 @@ One can run matrix-style testing but with pinned compatible versions in the foll rebar3: "3.22.1" os: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: otp-version: ${{matrix.erlang.otp}} From 45a8d0e06343462af261cccdf724275006bc184d Mon Sep 17 00:00:00 2001 From: Sebastian Weddmark Olsson Date: Fri, 14 Feb 2025 23:28:23 +0100 Subject: [PATCH 3/5] ubuntu-18 not longer available --- README.md | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/README.md b/README.md index f58012b1..8ffae19e 100644 --- a/README.md +++ b/README.md @@ -273,18 +273,6 @@ One can run matrix-style testing but with pinned compatible versions in the foll strategy: matrix: erlang: - - otp: "17" - rebar3: "3.10.0" - os: ubuntu-18.04 - - otp: "18" - rebar3: "3.11.1" - os: ubuntu-18.04 - - otp: "19" - rebar3: "3.15.2" - os: ubuntu-18.04 - - otp: "20.3.8.26" - rebar3: "3.15.2" - os: ubuntu-18.04 - otp: "21.3.8.17" rebar3: "3.15.2" os: ubuntu-20.04 From 94ac6c632b83c5b83903194ae5e365466efc4fdf Mon Sep 17 00:00:00 2001 From: Sebastian Weddmark Olsson Date: Thu, 2 Oct 2025 08:00:11 +0200 Subject: [PATCH 4/5] Update README.md after review suggestions --- README.md | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 8ffae19e..3fa37cd7 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,16 @@ and Erlang/OTP. **Note** \*: prior to 23, Windows builds are only available for minor versions, e.g. 21.0, 21.3, 22.0, etc. +### Compatibility between Erlang/OTP and rebar3 + +| rebar3 | Erlang/OTP | +|- |- | +| 3.10.0 | 17 | +| 3.11.1 | 18 | +| 3.15.2 | 19 - 21 | +| 3.16.1 | 22 - 24 | +| 3.22.1 | 25 - 27 | + ### Self-hosted runners Self-hosted runners need to set env. variable `ImageOS` to one of the following, since the action @@ -264,30 +274,15 @@ jobs: ### Compatibility -One can run matrix-style testing but with pinned compatible versions in the following manner: +Matrix-style testing can be executed using pinned, compatible dependency versions by configuring the test matrix accordingly: ```yaml test: - runs-on: ${{matrix.erlang.os}} - name: Erlang/OTP ${{matrix.erlang.otp}} / rebar3 ${{matrix.erlang.rebar3}} + runs-on: ${{matrix.compat.os}} + name: Erlang/OTP ${{matrix.compat.otp}} / rebar3 ${{matrix.compat.rebar3}} strategy: matrix: - erlang: - - otp: "21.3.8.17" - rebar3: "3.15.2" - os: ubuntu-20.04 - - otp: "22.3.4.9" - rebar3: "3.16.1" - os: ubuntu-20.04 - - otp: "23.3.4.5" - rebar3: "3.16.1" - os: ubuntu-22.04 - - otp: "24.3.4.17" - rebar3: "3.16.1" - os: ubuntu-22.04 - - otp: "25.3.2.15" - rebar3: "3.22.1" - os: ubuntu-24.04 + compat: - otp: "26.2.5.5" rebar3: "3.22.1" os: ubuntu-24.04 @@ -298,8 +293,9 @@ One can run matrix-style testing but with pinned compatible versions in the foll - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: - otp-version: ${{matrix.erlang.otp}} - rebar3-version: ${{matrix.erlang.rebar3}} + otp-version: ${{matrix.compat.otp}} + rebar3-version: ${{matrix.compat.rebar3}} + version-type: strict - run: rebar3 eunit ``` From 4230b5e7c92c391d9ec43644f0e41f1c4cb65804 Mon Sep 17 00:00:00 2001 From: Sebastian Weddmark Olsson Date: Thu, 2 Oct 2025 08:14:54 +0200 Subject: [PATCH 5/5] Link rebar3 compat Apparently rebar3 has started to maintain a version compatability table themselves. Missing older versions though | 3.10.0 | 17 | | 3.11.1 | 18 | --- README.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/README.md b/README.md index 3fa37cd7..a2e79ca5 100644 --- a/README.md +++ b/README.md @@ -85,13 +85,7 @@ and Erlang/OTP. ### Compatibility between Erlang/OTP and rebar3 -| rebar3 | Erlang/OTP | -|- |- | -| 3.10.0 | 17 | -| 3.11.1 | 18 | -| 3.15.2 | 19 - 21 | -| 3.16.1 | 22 - 24 | -| 3.22.1 | 25 - 27 | +See [compatable versions](https://github.com/erlang/rebar3?tab=readme-ov-file#compatibility-between-rebar3-and-erlangotp) in rebar3 repo ### Self-hosted runners