Skip to content

Commit

Permalink
Fix vibe-http overrides to be selective.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed Feb 11, 2021
1 parent 681f8f4 commit cf645e9
Showing 1 changed file with 30 additions and 9 deletions.
39 changes: 30 additions & 9 deletions travis-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
fi

(cd examples/$ex && dub build --compiler=$DC $ARGS && dub clean)
done
fi

Expand All @@ -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
fi

(cd tests/$ex && dub --compiler=$DC $ARGS && dub clean)
fi
fi
done
Expand Down

0 comments on commit cf645e9

Please sign in to comment.