diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02678c2..cffea48 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ concurrency: jobs: ci: - name: CI + name: OTP-27 runs-on: ubuntu-24.04 @@ -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 diff --git a/rebar.config b/rebar.config index b308a8a..4861d2b 100644 --- a/rebar.config +++ b/rebar.config @@ -94,6 +94,9 @@ ]}, {xref_checks, []} ]}, + {polyfill, [ + {deps, [{json_polyfill, "0.1.3"}]} + ]}, {benchmark, [ {deps, [ {erlperf, "2.3.0"},