Add Travis-CI test script.
This commit is contained in:
parent
6bf63c7331
commit
b65fd43be9
35
.travis.yml
Normal file
35
.travis.yml
Normal file
|
@ -0,0 +1,35 @@
|
|||
language: d
|
||||
|
||||
d:
|
||||
# order: latest DMD, oldest DMD, LDC/GDC, remaining DMD versions
|
||||
# this way the overall test time gets cut down (GDC/LDC are a lot
|
||||
# slower tham DMD, so they should be started early), while still
|
||||
# catching most DMD version related build failures early
|
||||
- dmd-2.071.0
|
||||
- dmd-2.067.1
|
||||
- ldc-0.17.0
|
||||
- ldc-0.16.1
|
||||
- dmd-2.070.0
|
||||
- dmd-2.069.2
|
||||
- dmd-2.068.2
|
||||
|
||||
env:
|
||||
- VIBED_DRIVER=libevent BUILD_EXAMPLE=1 RUN_TEST=1
|
||||
- VIBED_DRIVER=libasync BUILD_EXAMPLE=0 RUN_TEST=0
|
||||
|
||||
matrix:
|
||||
exclude:
|
||||
- d: dmd-2.067.1
|
||||
env: VIBED_DRIVER=libasync BUILD_EXAMPLE=0 RUN_TEST=0
|
||||
- d: ldc-0.16.1
|
||||
env: VIBED_DRIVER=libasync BUILD_EXAMPLE=0 RUN_TEST=0
|
||||
- d: ldc-0.17.0
|
||||
env: VIBED_DRIVER=libasync BUILD_EXAMPLE=0 RUN_TEST=0
|
||||
|
||||
script: ./travis-ci.sh
|
||||
|
||||
services:
|
||||
- mongodb
|
||||
- redis-server
|
||||
|
||||
sudo: false
|
26
travis-ci.sh
Executable file
26
travis-ci.sh
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e -x -o pipefail
|
||||
|
||||
# test for successful release build
|
||||
dub build --combined -b release --compiler=$DC --config=${VIBED_DRIVER=libevent}
|
||||
|
||||
# test for successful 32-bit build
|
||||
if [ "$DC" == "dmd" ]; then
|
||||
dub build --combined --arch=x86
|
||||
fi
|
||||
|
||||
dub test --combined --compiler=$DC --config=${VIBED_DRIVER=libevent}
|
||||
|
||||
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"
|
||||
(cd tests/$ex && dub --compiler=$DC && dub clean)
|
||||
done
|
||||
fi
|
Loading…
Reference in a new issue