From 7ba3202460aaf3be39a2db7aea0492635601b26e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Fri, 7 Oct 2016 20:36:09 +0200 Subject: [PATCH] Make all examples/tests single-file packages. --- .../source/app.d => http-server-fibers.d} | 6 ++++++ examples/http-server-fibers/dub.sdl | 4 ---- examples/{http-server/source/app.d => http-server.d} | 6 ++++++ examples/http-server/dub.sdl | 4 ---- travis-ci.sh | 10 ++++++---- 5 files changed, 18 insertions(+), 12 deletions(-) rename examples/{http-server-fibers/source/app.d => http-server-fibers.d} (96%) delete mode 100644 examples/http-server-fibers/dub.sdl rename examples/{http-server/source/app.d => http-server.d} (94%) delete mode 100644 examples/http-server/dub.sdl diff --git a/examples/http-server-fibers/source/app.d b/examples/http-server-fibers.d similarity index 96% rename from examples/http-server-fibers/source/app.d rename to examples/http-server-fibers.d index 1362f68..b61a96e 100644 --- a/examples/http-server-fibers/source/app.d +++ b/examples/http-server-fibers.d @@ -1,3 +1,9 @@ +/++ dub.sdl: + name "http-server-fibers-example" + description "Simple fiber based pseudo HTTP server suitable for benchmarking" + dependency "eventcore" path=".." ++/ +module http_server_fibers_example; import eventcore.core; import eventcore.internal.utils; diff --git a/examples/http-server-fibers/dub.sdl b/examples/http-server-fibers/dub.sdl deleted file mode 100644 index 774b915..0000000 --- a/examples/http-server-fibers/dub.sdl +++ /dev/null @@ -1,4 +0,0 @@ -name "http-server-example" -description "Simple pseudo HTTP server suitable for benchmarking" -dependency "eventcore" path="../.." - diff --git a/examples/http-server/source/app.d b/examples/http-server.d similarity index 94% rename from examples/http-server/source/app.d rename to examples/http-server.d index e7b00c1..3a643fc 100644 --- a/examples/http-server/source/app.d +++ b/examples/http-server.d @@ -1,3 +1,9 @@ +/++ dub.sdl: + name "http-server-example" + description "Simple pseudo HTTP server suitable for benchmarking" + dependency "eventcore" path=".." ++/ +module http_server_example; import eventcore.core; import eventcore.internal.utils; diff --git a/examples/http-server/dub.sdl b/examples/http-server/dub.sdl deleted file mode 100644 index 774b915..0000000 --- a/examples/http-server/dub.sdl +++ /dev/null @@ -1,4 +0,0 @@ -name "http-server-example" -description "Simple pseudo HTTP server suitable for benchmarking" -dependency "eventcore" path="../.." - diff --git a/travis-ci.sh b/travis-ci.sh index ee3ffb9..a4a04cd 100755 --- a/travis-ci.sh +++ b/travis-ci.sh @@ -13,14 +13,16 @@ fi dub test --combined --compiler=$DC if [ ${BUILD_EXAMPLE=1} -eq 1 ]; then - for ex in $(\ls -1 examples/); do + for ex in $(\ls -1 examples/*.d); do echo "[INFO] Building example $ex" - (cd examples/$ex && dub build --compiler=$DC && dub clean) + dub build --compiler=$DC --single $ex done + rm -rf examples/.dub/ + rm examples/*-example fi if [ ${RUN_TEST=1} -eq 1 ]; then - for ex in `\ls -1 tests/`; do + for ex in `\ls -1 tests/*.d`; do echo "[INFO] Running test $ex" - (cd tests/$ex && dub --compiler=$DC && dub clean) + dub --temp-build --compiler=$DC --single $ex done fi