2016-06-18 05:23:04 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e -x -o pipefail
|
|
|
|
|
|
|
|
# test for successful release build
|
2016-12-19 21:30:15 +00:00
|
|
|
dub build -b release --compiler=$DC -c $CONFIG
|
2016-06-18 05:23:04 +00:00
|
|
|
|
|
|
|
# test for successful 32-bit build
|
|
|
|
if [ "$DC" == "dmd" ]; then
|
2016-12-19 21:30:15 +00:00
|
|
|
dub build --arch=x86 -c $CONFIG
|
2016-06-18 05:23:04 +00:00
|
|
|
fi
|
|
|
|
|
2016-12-19 21:30:15 +00:00
|
|
|
dub test --compiler=$DC -c $CONFIG
|
2016-06-18 05:23:04 +00:00
|
|
|
|
|
|
|
if [ ${BUILD_EXAMPLE=1} -eq 1 ]; then
|
2016-10-07 18:36:09 +00:00
|
|
|
for ex in $(\ls -1 examples/*.d); do
|
2016-06-18 05:23:04 +00:00
|
|
|
echo "[INFO] Building example $ex"
|
2016-12-19 21:30:15 +00:00
|
|
|
dub build --compiler=$DC --single $ex # --override-config eventcore/$CONFIG
|
2016-06-18 05:23:04 +00:00
|
|
|
done
|
2016-10-07 18:36:09 +00:00
|
|
|
rm -rf examples/.dub/
|
|
|
|
rm examples/*-example
|
2016-06-18 05:23:04 +00:00
|
|
|
fi
|
|
|
|
if [ ${RUN_TEST=1} -eq 1 ]; then
|
2016-10-07 18:36:09 +00:00
|
|
|
for ex in `\ls -1 tests/*.d`; do
|
2016-06-18 05:23:04 +00:00
|
|
|
echo "[INFO] Running test $ex"
|
2016-12-19 21:30:15 +00:00
|
|
|
dub --temp-build --compiler=$DC --single $ex # --override-config eventcore/$CONFIG
|
2016-06-18 05:23:04 +00:00
|
|
|
done
|
|
|
|
fi
|