From c6bd4d06aaa25c91d047d862ac830fa1c89aecfc Mon Sep 17 00:00:00 2001 From: Luca Favatella Date: Fri, 7 Apr 2017 17:11:57 +0100 Subject: [PATCH 1/2] Test rebar3 - in addition to the already tested rebar 2 Also test recent OTP. --- .travis.yml | 10 ++++++++++ ci | 30 ++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100755 ci diff --git a/.travis.yml b/.travis.yml index 955c0d8..c1beab2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,16 @@ notifications: webhooks: http://basho-engbot.herokuapp.com/travis?key=92c392ada1e45ef632b5df7cf7104e914a3fa999 email: eng@basho.com otp_release: + - 19.2 - R16B02 - R15B01 - R15B +env: + - REBAR_V=2 + - REBAR_V=3 +before_install: + - ./ci before_install "${REBAR_V:?}" +install: + - ./ci install "${REBAR_V:?}" +script: + - ./ci script "${REBAR_V:?}" diff --git a/ci b/ci new file mode 100755 index 0000000..4ff3435 --- /dev/null +++ b/ci @@ -0,0 +1,30 @@ +#!/bin/bash + +set -ev # Ref https://docs.travis-ci.com/user/customizing-the-build/#Implementing-Complex-Build-Steps + +case "${1:?}-${2:?}" in + before_install-2) + rebar version + ;; + before_install-3) + ## Travis CI does not support rebar3 yet. See https://github.com/travis-ci/travis-ci/issues/6506#issuecomment-275189490 + curl -f -L -o ./rebar3 https://github.com/erlang/rebar3/releases/download/3.3.6/rebar3 + chmod +x ./rebar3 + ./rebar3 version + ;; + install-2) + rebar get-deps + ;; + install-3) + ./rebar3 deps + ;; + script-2) + rebar compile + rebar eunit + ;; + script-3) + ./rebar3 compile + ./rebar3 eunit + ./rebar3 dialyzer + ;; +esac From 0b105b64dea37a794b0bb1ed73205199f5e0858c Mon Sep 17 00:00:00 2001 From: Luca Favatella Date: Wed, 12 Apr 2017 11:02:11 +0100 Subject: [PATCH 2/2] Show issue with native code compilation in rebar3 See also https://github.com/esl/MongooseIM/blob/2.1.0beta1/rebar.config#L117-L120 --- ci | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci b/ci index 4ff3435..f636e23 100755 --- a/ci +++ b/ci @@ -20,10 +20,12 @@ case "${1:?}-${2:?}" in ;; script-2) rebar compile + test 1 -le $(find . -name syslog_drv.so | wc -l) rebar eunit ;; script-3) ./rebar3 compile + test 1 -le $(find . -name syslog_drv.so | wc -l) ./rebar3 eunit ./rebar3 dialyzer ;;