From 35d209f36401445c0dd1c5f83f24235d39a348c5 Mon Sep 17 00:00:00 2001 From: spring2maz Date: Thu, 13 Sep 2018 18:23:19 +0200 Subject: [PATCH] Fix travis build --- .travis.yml | 2 ++ Makefile | 11 +++++++---- rebar.config | 10 +++------- rebar.config.script | 1 - 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index e4088022d..adef0f3cd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,8 +8,10 @@ before_install: script: - make dep-vsn-check + - make rebar-compile - make rebar-eunit - make rebar-ct + - make rebar-cover - make coveralls sudo: false diff --git a/Makefile b/Makefile index 2417ad040..73438ca01 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ dep_lager_syslog = git https://github.com/basho/lager_syslog 3.0.1 NO_AUTOPATCH = cuttlefish -ERLC_OPTS += +debug_info +ERLC_OPTS += +debug_info -DAPPLICATION=emqx ERLC_OPTS += +'{parse_transform, lager_transform}' BUILD_DEPS = cuttlefish @@ -27,7 +27,7 @@ dep_cuttlefish = git https://github.com/emqx/cuttlefish emqx30 #TEST_DEPS = emqx_ct_helplers #dep_emqx_ct_helplers = git git@github.com:emqx/emqx-ct-helpers -TEST_ERLC_OPTS += +debug_info +TEST_ERLC_OPTS += +debug_info -DAPPLICATION=emqx TEST_ERLC_OPTS += +'{parse_transform, lager_transform}' EUNIT_OPTS = verbose @@ -60,7 +60,7 @@ gen-clean: @rm -f etc/gen.emqx.conf bbmustache: - $(verbose) git clone https://github.com/soranoba/bbmustache.git && pushd bbmustache && ./rebar3 compile && popd + $(verbose) git clone https://github.com/soranoba/bbmustache.git && cd bbmustache && ./rebar3 compile && cd .. # This hack is to generate a conf file for testing # relx overlay is used for release @@ -78,6 +78,9 @@ app.config: etc/gen.emqx.conf ct: cuttlefish app.config +rebar-cover: + @rebar3 cover + coveralls: @rebar3 coveralls send @@ -91,7 +94,7 @@ rebar-cuttlefish: rebar-deps rebar-deps: @rebar3 get-deps -rebar-eunit: +rebar-eunit: rebar-cuttlefish @rebar3 eunit rebar-compile: diff --git a/rebar.config b/rebar.config index d7d14c883..aa77f3a02 100644 --- a/rebar.config +++ b/rebar.config @@ -20,7 +20,8 @@ warn_unused_import, warn_obsolete_guard, debug_info, - {parse_transform, lager_transform}]}. + {parse_transform, lager_transform}, + {d, 'APPLICATION', emqx}]}. {xref_checks, [undefined_function_calls, undefined_functions, locals_not_used, deprecated_function_calls, warnings_as_errors, deprecated_functions]}. @@ -29,10 +30,5 @@ {cover_export_enabled, true}. %% rebar3_neotoma_plugin is needed to compile the .peg file for cuttlefish -{plugins, [rebar3_neotoma_plugin]}. +{plugins, [coveralls, rebar3_neotoma_plugin]}. -%% Do not include cuttlefish's dependencies as mine -%% its dependencies are only fetched to compile itself -%% they are however not needed by emqx -{overrides, [{override, cuttlefish, [{deps, []}]} - ]}. diff --git a/rebar.config.script b/rebar.config.script index 7c247ac48..0b18592f1 100644 --- a/rebar.config.script +++ b/rebar.config.script @@ -3,7 +3,6 @@ CONFIG1 = case os:getenv("TRAVIS") of "true" -> JobId = os:getenv("TRAVIS_JOB_ID"), [{coveralls_service_job_id, JobId}, - {plugins, [coveralls]}, {coveralls_coverdata, "_build/test/cover/*.coverdata"}, {coveralls_service_name , "travis-ci"} | CONFIG]; _ ->