Skip to content

Commit

Permalink
Merge pull request #3 from danikp/master
Browse files Browse the repository at this point in the history
Cleanups
  • Loading branch information
danikp committed Aug 9, 2015
2 parents bb0ba43 + 912c6c3 commit f3d6b4d
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 46 deletions.
11 changes: 7 additions & 4 deletions .travis.yml
@@ -1,5 +1,9 @@
language: erlang
sudo: false
otp_release:
# Test on all supported releases
- 18.0
- 17.5
- 17.4
- 17.3
- 17.1
Expand All @@ -15,10 +19,9 @@ otp_release:
- R15B

script:
- rebar get-deps
- rebar compile
- make
- rebar eunit -v skip_deps=true
- mkdir plt
- ./travis-dialyzer.sh
- make plt
- make dialyze
notifications:
email: false
35 changes: 31 additions & 4 deletions Makefile
@@ -1,21 +1,48 @@
ERL=erl
REBAR=./rebar
GIT = git
REBAR_VER = 2.5.1
REBAR_VER = 2.6.0

.PHONY: get-deps

all: compile

compile:
@$(REBAR) get-deps
@$(REBAR) compile

clean:
@$(REBAR) clean

rebar_src:
@rm -rf $(PWD)/rebar_src
@$(GIT) clone git://github.com/rebar/rebar.git rebar_src
@$(GIT) -C rebar_src checkout tags/$(REBAR_VER)
@cd $(PWD)/rebar_src/; ./bootstrap
@cp $(PWD)/rebar_src/rebar $(PWD)
@rm -rf $(PWD)/rebar_src

get-deps:
@$(REBAR) get-deps

## dialyzer
PLT_FILE = ~/tiny_pq.plt
PLT_APPS ?= kernel stdlib erts compiler
DIALYZER_OPTS ?= -Werror_handling -Wrace_conditions -Wunmatched_returns \
-Wunderspecs --verbose --fullpath -n

.PHONY: dialyze
dialyze: all
@[ -f $(PLT_FILE) ] || $(MAKE) plt
@dialyzer --plt $(PLT_FILE) $(DIALYZER_OPTS) ebin || [ $$? -eq 2 ];

## In case you are missing a plt file for dialyzer,
## you can run/adapt this command
.PHONY: plt
plt:
@echo "Building PLT, may take a few minutes"
@dialyzer --build_plt --output_plt $(PLT_FILE) --apps \
$(PLT_APPS) || [ $$? -eq 2 ];

clean:
@$(REBAR) clean
rm -fv erl_crash.dump
rm -f $(PLT_FILE)

2 changes: 1 addition & 1 deletion src/tiny_pq.app.src
@@ -1,7 +1,7 @@
{application, tiny_pq,
[
{description, "TinyPQ: A simple priority queue based on gb_trees"},
{vsn, "0.1.0"},
{vsn, "0.8.15"},
{registered, [
]},
{modules, []},
Expand Down
37 changes: 0 additions & 37 deletions travis-dialyzer.sh

This file was deleted.

0 comments on commit f3d6b4d

Please sign in to comment.