Skip to content

Commit

Permalink
Merge pull request #17 from danikp/ChicagoBoss-master
Browse files Browse the repository at this point in the history
update for Erlang 18
  • Loading branch information
danikp committed Aug 9, 2015
2 parents 4a9ffe0 + 1b78efb commit f0c3504
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 54 deletions.
21 changes: 16 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
language: erlang
sudo: false
otp_release:
# Test on all supported releases
- 18.0
- 17.5
- 17.4
- 17.3
- 17.1
- 17.0
- R16B03-1
- R16B03
- R16B02
- R16B01
- R16B
- R15B03
# - R15B02 #fails
- R15B01
- R15B

script:
- rebar get-deps
- rebar compile
- make
- rebar eunit -v skip_deps=true
- make test
- mkdir plt
- ./travis-dialyzer.sh
- make plt
- make dialyze
notifications:
email: false
email: false
37 changes: 32 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
ERL=erl
REBAR=./rebar
GIT = git
REBAR_VER = 2.5.1
REBAR_VER = 2.6.0

.PHONY: get-deps

all: compile

Expand All @@ -17,14 +19,39 @@ test: compile compile_test
$(ERL) -noshell -pa ebin -pa ebintest -pa deps/tiny_pq/ebin \
-s tinymq_test run_tests \
-s init stop

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 deps/*
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 rebar.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{erl_opts, [debug_info]}.
{deps, [
{tiny_pq, ".*", {git, "git://github.com/ChicagoBoss/tiny_pq.git", {tag, "v0.8.14"}}}
{tiny_pq, ".*", {git, "git://github.com/ChicagoBoss/tiny_pq.git", {tag, "v0.8.15"}}}
]}.
2 changes: 1 addition & 1 deletion src/tinymq.app.src
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{application, tinymq,
[
{description, "TinyMQ: a diminutive message queue"},
{vsn, "0.1.2"},
{vsn, "0.8.15"},
{registered, [tinymq]},
{modules, []},
{applications, [
Expand Down
42 changes: 0 additions & 42 deletions travis-dialyzer.sh

This file was deleted.

0 comments on commit f0c3504

Please sign in to comment.