From 8af4d27c75a9f22c7c3a267a1659507c82afaa72 Mon Sep 17 00:00:00 2001 From: Dincho Todorov Date: Tue, 26 Feb 2019 12:43:27 +0200 Subject: [PATCH 1/2] Initial CircleCI integration --- .circleci/config.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..851d864 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,37 @@ +version: 2.1 + +executors: + aebuilder: + docker: + - image: aeternity/builder + user: builder + working_directory: ~/src + +jobs: + build: + executor: aebuilder + steps: + - checkout + - restore_cache: + keys: + - dialyzer-cache-v1-{{ .Branch }}-{{ .Revision }} + - dialyzer-cache-v1-{{ .Branch }}- + - dialyzer-cache-v1- + - run: + name: Build + command: rebar3 compile + - run: + name: Static Analysis + command: rebar3 dialyzer + - run: + name: Eunit + command: rebar3 eunit + - run: + name: Common Tests + command: rebar3 ct + - save_cache: + key: dialyzer-cache-v1-{{ .Branch }}-{{ .Revision }} + paths: + - _build/default/rebar3_20.3.8_plt + - store_artifacts: + path: _build/test/logs From d75e141f54156ed4f2aa674dc3f76128af69e556 Mon Sep 17 00:00:00 2001 From: Tobias Lindahl Date: Tue, 26 Feb 2019 12:01:33 +0100 Subject: [PATCH 2/2] Fix type spec --- src/eblake2.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eblake2.erl b/src/eblake2.erl index 1340801..14ac974 100644 --- a/src/eblake2.erl +++ b/src/eblake2.erl @@ -60,7 +60,7 @@ blake2s(HashLen, Msg0, Key) -> %% Just return the requested part of the hash {ok, binary_part(to_little_endian(32, State), {0, HashLen})}. --spec hmac(Hash :: blake2b | blake2s, Key :: binary(), Data :: binary()) -> {ok, binary()}. +-spec hmac(Hash :: blake2b | blake2s, Key :: binary(), Data :: binary()) -> binary(). hmac(blake2b, Key, Data) -> hmac(128, fun(D) -> {ok, H} = blake2b(64, D), H end, Key, Data); hmac(blake2s, Key, Data) ->