Просмотр исходного кода

Merge branch 'danikp-master'

fixes #201
Andreas Stenius 10 лет назад
Родитель
Сommit
d1da40398e
3 измененных файлов с 33 добавлено и 18 удалено
  1. 2 0
      .gitignore
  2. 18 11
      .travis.yml
  3. 13 7
      Makefile

+ 2 - 0
.gitignore

@@ -13,3 +13,5 @@ deps
 /.edts
 /.rebar/
 /*.beam
+/.settings/
+/.project

+ 18 - 11
.travis.yml

@@ -1,20 +1,27 @@
 language: erlang
 otp_release:
 # Test on all supported releases accepted by the `require_otp_vsn` in rebar.config
-#  - 17.0 not yet available on travis!
-  - 17.3
-  - R16B03-1
-#  - R16B03 this version is broken!
-  - R16B02
-  - R16B01
-  - R16B
+   - 17.4
+   - 17.3
+   - 17.1
+   - 17.0
+   - R16B03-1
+#   - R16B03 this version is broken!
+   - R16B02
+   - R16B01
+   - R16B
 #  - R15B03-1 not available on travis
-  - R15B03
-  - R15B02
+   - R15B03
+   - R15B02
+#   - R15B01 failing with timeout
+#   - R15B failing with timeout
 
 # since Travis is naughty and calls rebar get-deps behind our backs,
 # we'll have to clean it up and build merl our selves..
-script: "make -C deps/merl && make tests"
-
+script: 
+  - "make -C deps/merl && make tests"
+  - make plt
+  - make dialyze
 notifications:
   irc: "chat.freenode.net#erlydtl"
+  email: false

+ 13 - 7
Makefile

@@ -23,18 +23,24 @@ tests: src/erlydtl_parser.erl
 
 check: tests dialyze
 
-DIALYZER_OPTS ?= -Werror_handling -Wrace_conditions -Wunmatched_returns
+## dialyzer
+PLT_FILE = ~/erlydtl.plt
+PLT_APPS ?= kernel stdlib compiler erts eunit syntax_tools
+DIALYZER_OPTS ?= -Werror_handling -Wrace_conditions -Wunmatched_returns \
+		-Wunderspecs --verbose --fullpath
+.PHONY: dialyze
 dialyze:
-	@dialyzer -nn $(DIALYZER_OPTS) ebin || [ $$? -eq 2 ];
+	@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
-PLT_APPS ?=
+.PHONY: plt
 plt:
-	@dialyzer -n -nn --build_plt --apps \
-		erts kernel stdlib sasl compiler \
-		crypto syntax_tools runtime_tools \
-		tools webtool hipe inets eunit
+# we need to remove second copy of file
+	rm -f deps/merl/priv/merl_transform.beam
+	@echo "Building PLT, may take a few minutes"
+	@dialyzer --build_plt --output_plt $(PLT_FILE) --apps \
+		$(PLT_APPS) deps/* || [ $$? -eq 2 ];
 
 clean:
 	@echo "Clean merl..." ; $(MAKE) -C deps/merl clean