Skip to content

Commit

Permalink
Run CI in an OTP versions matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
williamthome committed Aug 4, 2024
1 parent 4d9c81d commit b471242
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
51 changes: 50 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:

jobs:
ci:
name: CI
name: OTP-27

runs-on: ubuntu-24.04

Expand Down Expand Up @@ -59,3 +59,52 @@ jobs:
rebar3 unlock --all
rebar3 upgrade --all
git diff --exit-code
polyfill-ci:
name: OTP-${{matrix.otp-version}}

runs-on: ${{matrix.os}}

strategy:
matrix:
otp-version: [24, 25, 26]
os: [ubuntu-24.04]

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- uses: erlef/setup-beam@b9c58b0450cd832ccdb3c17cc156a47065d2114f # v1.18.1
id: setup-beam
with:
otp-version: ${{matrix.otp-version}}
rebar3-version: 3.23.0

- name: Restore _build
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: _build
key: "_build-cache-for\
-os-${{runner.os}}\
-otp-${{steps.setup-beam.outputs.otp-version}}\
-rebar3-${{steps.setup-beam.outputs.rebar3-version}}\
-hash-${{hashFiles('rebar.lock')}}-${{hashFiles('rebar.config')}}"

- name: Restore rebar3's cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.cache/rebar3
key: "rebar3-cache-for\
-os-${{runner.os}}\
-otp-${{steps.setup-beam.outputs.otp-version}}\
-rebar3-${{steps.setup-beam.outputs.rebar3-version}}\
-hash-${{hashFiles('rebar.lock')}}"

- name: Continuous Integration
run: |
rebar3 as polyfill, test ci
- name: Check if build left artifacts
run: |
rebar3 as polyfill unlock --all
rebar3 as polyfill upgrade --all
git diff --exit-code
3 changes: 3 additions & 0 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@
]},
{xref_checks, []}
]},
{polyfill, [
{deps, [{json_polyfill, "0.1.3"}]}
]},
{benchmark, [
{deps, [
{erlperf, "2.3.0"},
Expand Down

0 comments on commit b471242

Please sign in to comment.