diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fa55d40 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +ebin/ +*~ +/.project +/.settings/ diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..55078ab --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +language: erlang +otp_release: + - 17.1 + - 17.0 + - R16B03-1 + - R16B02 + - R16B01 + +script: + - rebar get-deps + - rebar compile + - rebar eunit -v skip_deps=true + - mkdir plt + - ./travis-dialyzer.sh +notifications: + email: false diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..06eaf5d --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +ERL=erl +REBAR=./rebar +GIT = git +REBAR_VER = 2.5.1 + +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 diff --git a/README.md b/README.md index 5f83984..7e1b097 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ tiny_pq : A priority queue based on gb_trees -- +[![Build Status](https://travis-ci.org/ChicagoBoss/tiny_pq.svg)](https://travis-ci.org/ChicagoBoss/tiny_pq) +-- tiny_pq stores values associated with a priority, and provides functions for purging low-priority items efficiently. Internally, tiny_pq uses gb_trees, diff --git a/rebar b/rebar index a62686c..f8ee085 100755 Binary files a/rebar and b/rebar differ diff --git a/travis-dialyzer.sh b/travis-dialyzer.sh new file mode 100755 index 0000000..d19e4f5 --- /dev/null +++ b/travis-dialyzer.sh @@ -0,0 +1,42 @@ +#!/bin/bash + + +PLT=plt/tinypq-$RANDOM.plt +echo "PLT File $PLT" +export PATH=$PATH:/usr/local/bin:/usr/bin +echo "Building PLT, may take a few minutes" +dialyzer --build_plt --apps kernel stdlib\ + --output_plt $PLT > /dev/null +for app in mnesia inets ssl crypto \ + erts public_key runtime_tools compiler asn1 hipe\ + syntax_tools +do + echo $app + dialyzer --add_to_plt --apps $app\ + --plt $PLT > /dev/null +done +rm -f deps/riak_*/ebin/*_pb.beam +echo "********************************************************************************" +for app in $(ls deps/) +do + echo "Adding $app" + dialyzer --add_to_plt --apps deps/$app \ + --plt $PLT > /dev/null + + +done +echo "********************************************************************************" +echo "" + +dialyzer ebin/ \ + -Werror_handling \ + -Wno_undefined_callbacks \ + -Wrace_conditions \ + --statistics -n \ + --fullpath \ + -n \ + --plt $PLT # -Wunmatched_returns +# + + +