2016-06-18 05:01:08 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e -x -o pipefail
|
|
|
|
|
|
|
|
# test for successful release build
|
2016-06-18 05:29:05 +00:00
|
|
|
dub build --combined -b release --compiler=$DC
|
2016-06-18 05:01:08 +00:00
|
|
|
|
|
|
|
# test for successful 32-bit build
|
|
|
|
if [ "$DC" == "dmd" ]; then
|
|
|
|
dub build --combined --arch=x86
|
|
|
|
fi
|
|
|
|
|
2016-06-18 05:29:05 +00:00
|
|
|
dub test --combined --compiler=$DC
|
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"
|
|
|
|
(cd examples/$ex && dub build --compiler=$DC && dub clean)
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
if [ ${RUN_TEST=1} -eq 1 ]; then
|
|
|
|
for ex in `\ls -1 tests/`; do
|
|
|
|
echo "[INFO] Running test $ex"
|
2016-10-24 06:32:16 +00:00
|
|
|
(cd tests && dub --compiler=$DC --single $ex && dub clean)
|
2016-06-18 05:01:08 +00:00
|
|
|
done
|
|
|
|
fi
|