Merge pull request #58 from paulo-ferraz-oliveira/feature/setup-beam

Allow for more flexibility in rebar3 version
This commit is contained in:
Jesper Louis Andersen 2021-06-18 23:57:14 +02:00 committed by GitHub
commit bb1334d82f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 7 deletions

View File

@ -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"

View File

@ -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,10 +20,15 @@ jobs:
- ubuntu-latest
steps:
- uses: actions/checkout@v2
with: {}
- name: Update apt-get database
run: apt-get update
run: sudo apt-get update
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp_vsn}}
rebar3-version: 3.16.1
- name: Install libsodium
run: apt-get install -y libsodium-dev
run: sudo apt-get install -y libsodium-dev
- name: Compile source code
run: make compile
- name: Run the tests