From 0b8abb95d56f2d9c684300f3a79b0c10a9dd5a26 Mon Sep 17 00:00:00 2001 From: Jesper Louis Andersen Date: Tue, 15 Jun 2021 14:24:45 +0200 Subject: [PATCH] Actions. --- .github/workflows/Makefile | 3 +++ .github/workflows/ci.cue | 23 +++++++++++++++++++++++ .github/workflows/ci.yaml | 31 +++++++++++++++++++++++++++++++ Makefile | 3 +++ 4 files changed, 60 insertions(+) create mode 100644 .github/workflows/Makefile create mode 100644 .github/workflows/ci.cue create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/Makefile b/.github/workflows/Makefile new file mode 100644 index 0000000..663cd71 --- /dev/null +++ b/.github/workflows/Makefile @@ -0,0 +1,3 @@ +all: + cue export --out yaml ci.cue > ci.yaml + diff --git a/.github/workflows/ci.cue b/.github/workflows/ci.cue new file mode 100644 index 0000000..73c934c --- /dev/null +++ b/.github/workflows/ci.cue @@ -0,0 +1,23 @@ +name: "build" +on: { + push: branches: [ + "master", + ] + pull_request: branches: [ + "master", + ] +} +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: [18.3, 19.3, 20.3, 21.3, 22.3, 23.3, 24.0] + os: ["ubuntu-latest"] + } + steps: [ + {uses: "actions/checkout@v2"}, + {run: "sudo apt get instal libsodium-dev"}, + {run: "make compile"}, + {run: "make tests"}] +} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..951b4f3 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,31 @@ +name: build +on: + push: + branches: + - master + pull_request: + branches: + - master +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: + - 18.3 + - 19.3 + - 20.3 + - 21.3 + - 22.3 + - 23.3 + - 24.0 + os: + - ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: sudo apt get instal libsodium-dev + - run: make compile + - run: make tests diff --git a/Makefile b/Makefile index 481ed00..a9db92e 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,9 @@ RUN_EQC=erl -pa _build/default/lib/enacl/ebin -noshell -s enacl_eqc -s init stop compile: $(REBAR) compile +.PHONY: tests + $(REBAR) ct + eqc_compile: compile erlc -o _build/default/lib/enacl/ebin eqc_test/enacl_eqc.erl