CI: employ caching

This commit is contained in:
Andrey Mayorov 2016-02-04 18:17:58 +03:00
parent 2cee52feb3
commit 66db7fe296
5 changed files with 16 additions and 1 deletions

1
.gitignore vendored
View File

@ -16,3 +16,4 @@ dev.config
/_projects/
/_steps/
/_temp/
ci/rebar.config

View File

@ -19,3 +19,11 @@ distclean:
dialyze:
$(REBAR) dialyzer
CI_CONFIG := ci/rebar.config
%-ci: $(CI_CONFIG)
$(MAKE) REBAR_CONFIG=$(CI_CONFIG) $*
$(CI_CONFIG): %: %.template
$(CURDIR)/template.sh "$<" >> "$@"

1
ci/rebar.config.template Normal file
View File

@ -0,0 +1 @@
{dialyzer, [{base_plt_location, "${WERCKER_CACHE_DIR}"}]}.

5
template.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
eval "cat <<EOF
$(<$1)
EOF"

View File

@ -10,7 +10,7 @@ build:
code: make test
- script:
name: run dialyzer
code: make dialyze
code: make dialyze-ci
after-steps:
- slack-notifier:
url: ${SLACK_WEBHOOK_URL}