From 7a14e864fc64d1d5ddc293bb7e38bee6f2b65d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Thu, 11 Feb 2021 13:08:33 +0100 Subject: [PATCH] Fix vibe-http overrides to be selective. --- travis-ci.sh | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/travis-ci.sh b/travis-ci.sh index b3d08e6f0d..7922297f9c 100755 --- a/travis-ci.sh +++ b/travis-ci.sh @@ -9,13 +9,16 @@ DUB_ARGS="--build-mode=${DUB_BUILD_MODE:-separate} ${DUB_ARGS:-}" # default to run all parts : ${PARTS:=lint,builds,unittests,examples,tests,meson} +DUB_ARGS_HTTP=$DUB_ARGS + if [[ $PARTS =~ (^|,)vibe-http(,|$) ]]; then - DUB_ARGS="${DUB_ARGS} --override-config vibe-d:http/experimental" + DUB_ARGS_HTTP="${DUB_ARGS} --override-config vibe-d:http/experimental" fi -if [[ $PARTS =~ (^|,)coverage(,|$) ]]; then - DFLAGS="-g -debug -cov -version=VibedSetCoverageMerge" -fi +# TODO: support coverage builds! +#if [[ $PARTS =~ (^|,)coverage(,|$) ]]; then +# DFLAGS="-g -debug -cov -version=VibedSetCoverageMerge" +#fi if [[ $PARTS =~ (^|,)lint(,|$) ]]; then ./scripts/test_version.sh @@ -38,10 +41,10 @@ fi if [[ $PARTS =~ (^|,)unittests(,|$) ]]; then dub test :data --compiler=$DC $DUB_ARGS dub test :mongodb --compiler=$DC $DUB_ARGS - dub test :redis --compiler=$DC $DUB_ARGS - dub test :web --compiler=$DC $DUB_ARGS + dub test :redis --compiler=$DC $DUB_ARGS_HTTP + dub test :web --compiler=$DC $DUB_ARGS_HTTP dub test :utils --compiler=$DC $DUB_ARGS - dub test :http --compiler=$DC $DUB_ARGS + dub test :http --compiler=$DC $DUB_ARGS_HTTP dub test :mail --compiler=$DC $DUB_ARGS dub test :stream --compiler=$DC $DUB_ARGS dub test :crypto --compiler=$DC $DUB_ARGS @@ -54,7 +57,16 @@ fi if [[ $PARTS =~ (^|,)examples(,|$) ]]; then for ex in $(\ls -1 examples/); do echo "[INFO] Building example $ex" - (cd examples/$ex && dub build --compiler=$DC $DUB_ARGS && dub clean) + + #determine whether vibe-d:http is involved + if [[ "`dub describe --root=examples/$ex --data=versions`" == *Have_vibe_d_http* ]] + then + ARGS=$DUB_ARGS_HTTP + else + ARGS=$DUB_ARGS + endif + + (cd examples/$ex && dub build --compiler=$DC $ARGS && dub clean) done fi @@ -68,7 +80,16 @@ if [[ $PARTS =~ (^|,)tests(,|$) ]]; then echo "[WARNING] Skipping test $ex due to TravisCI incompatibility". else echo "[INFO] Running test $ex" - (cd tests/$ex && dub --compiler=$DC $DUB_ARGS && dub clean) + + #determine whether vibe-d:http is involved + if [[ "`dub describe --root=tests/$ex --data=versions`" == *Have_vibe_d_http* ]] + then + ARGS=$DUB_ARGS_HTTP + else + ARGS=$DUB_ARGS + endif + + (cd tests/$ex && dub --compiler=$DC $ARGS && dub clean) fi fi done