summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSebastian Thiel <sthiel@thoughtworks.com>2019-05-29 16:34:49 +0530
committerSebastian Thiel <sthiel@thoughtworks.com>2019-05-29 16:34:49 +0530
commite9a447250ba9ffd10f94f6f7d970c6da141c185d (patch)
tree1f7cef8b6c5ca783c0e37eae77251ed6e5346e63 /Makefile
First instantiation of template
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile41
1 files changed, 41 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..405efb0
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,41 @@
+docker_image = docker_developer_environment
+
+help:
+ $(info -Targets -----------------------------------------------------------------------------)
+ $(info -Development Targets -----------------------------------------------------------------)
+ $(info lint | run lints with clippy)
+ $(info benchmark | just for fun, really)
+ $(info profile | only on linux - run callgrind and annotate it)
+ $(info journey-tests | run all stateless journey test)
+ $(info continuous-journey-tests | run all stateless journey test whenever something changes)
+ $(info -- Use docker for all dependencies - run make interactively from there ----------------)
+ $(info interactive-developer-environment-in-docker | gives you everything you need to run all targets)
+
+always:
+
+interactive-developer-environment-in-docker:
+ docker build -t $(docker_image) - < etc/developer.Dockerfile
+ docker run -v $$PWD:/volume -w /volume -it $(docker_image)
+
+target/debug/dua: always
+ cargo build
+
+target/release/dua: always
+ cargo build --release
+
+lint:
+ cargo clippy
+
+profile: target/release/dua
+ valgrind --callgrind-out-file=callgrind.profile --tool=callgrind $< >/dev/null
+ callgrind_annotate --auto=yes callgrind.profile
+
+benchmark: target/release/dua
+ hyperfine '$<'
+
+journey-tests: target/debug/dua
+ ./tests/stateless-journey.sh $<
+
+continuous-journey-tests:
+ watchexec $(MAKE) journey-tests
+