Merge pull request #1 from aeternity/initial_ci_integration

Initial CircleCI integration
This commit is contained in:
Hans Svensson 2019-03-18 11:01:37 +01:00 committed by GitHub
commit 527a7f077f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 38 additions and 1 deletions

37
.circleci/config.yml Normal file
View File

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

View File

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