From b81fa6f0d6ee1584b7f7667eb6bda2af5f129461 Mon Sep 17 00:00:00 2001 From: Paulo Oliveira Date: Fri, 18 Jun 2021 18:35:19 +0100 Subject: [PATCH] Allow for more flexibility in rebar3 version --- .github/workflows/ci.cue | 14 +++++++++++--- .github/workflows/ci.yaml | 7 +++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.cue b/.github/workflows/ci.cue index 4aeba42..0487bb0 100644 --- a/.github/workflows/ci.cue +++ b/.github/workflows/ci.cue @@ -5,6 +5,7 @@ _versions: { // In turn, we can't compile for the newer libsodium functions on this image, // and it fails. Hence these versions. all: ["22.3", "23.3", "24.0"] + rebar3: "3.16.1" } #Name: string @@ -17,9 +18,11 @@ _versions: { page_build?: #Branches } -#Action: "actions/checkout@v2" +#Action: "actions/checkout@v2" | "actions/setup-beam@v1" #Steps: { uses: #Action + with: + _: string } | { name: string run: string @@ -30,7 +33,6 @@ _versions: { #Jobs: ci: { name: string "runs-on": string - container: image: string strategy: matrix: { otp_vsn: [...string] @@ -52,7 +54,6 @@ jobs: #Jobs & { ci: { name: "Run checks and tests over ${{matrix.otp_vsn}} and ${{matrix.os}}" "runs-on": "${{matrix.os}}" - container: image: "erlang:${{matrix.otp_vsn}}" strategy: matrix: { otp_vsn: _versions.all // This entry is a lie. The container images are Debian containers, but @@ -65,6 +66,13 @@ jobs: #Jobs & { name: "Update apt-get database" run: "apt-get update" }, + { + uses: "actions/setup-beam@v1" + with: { + "otp-version": "${{matrix.otp_vsn}}" + "rebar3-version": _versions.rebar3 + } + }, { name: "Install libsodium" run: "apt-get install -y libsodium-dev" diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 268479c..31c96c7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,8 +10,6 @@ jobs: ci: name: Run checks and tests over ${{matrix.otp_vsn}} and ${{matrix.os}} runs-on: ${{matrix.os}} - container: - image: erlang:${{matrix.otp_vsn}} strategy: matrix: otp_vsn: @@ -22,8 +20,13 @@ jobs: - ubuntu-latest steps: - uses: actions/checkout@v2 + with: {} - name: Update apt-get database run: apt-get update + - uses: actions/setup-beam@v1 + with: + otp-version: ${{matrix.otp_vsn}} + rebar3-version: 3.16.1 - name: Install libsodium run: apt-get install -y libsodium-dev - name: Compile source code