vibe-core/travis-ci.sh

28 lines
712 B
Bash
Raw Normal View History

2016-06-18 05:01:08 +00:00
#!/bin/bash
set -e -x -o pipefail
# test for successful release build
dub build -b release --compiler=$DC -c $CONFIG
2016-06-18 05:01:08 +00:00
# test for successful 32-bit build
if [ "$DC" == "dmd" ]; then
dub build --arch=x86 -c $CONFIG
2016-06-18 05:01:08 +00:00
fi
dub test --compiler=$DC -c $CONFIG
2016-06-18 05:01:08 +00:00
if [ ${BUILD_EXAMPLE=1} -eq 1 ]; then
for ex in $(\ls -1 examples/); do
echo "[INFO] Building example $ex"
# --override-config vibe-core/$CONFIG
2016-06-18 05:01:08 +00:00
(cd examples/$ex && dub build --compiler=$DC && dub clean)
done
fi
if [ ${RUN_TEST=1} -eq 1 ]; then
2016-10-24 07:21:11 +00:00
for ex in `\ls -1 tests/*.d`; do
2016-06-18 05:01:08 +00:00
echo "[INFO] Running test $ex"
dub --temp-build --compiler=$DC --single $ex # --override-config vibe-core/$CONFIG
2016-06-18 05:01:08 +00:00
done
fi