From 868b8c61e3a79bddb9ab054073e81cd07591bb85 Mon Sep 17 00:00:00 2001 From: Evan Rutledge Borden Date: Sun, 3 Nov 2019 19:57:06 -0600 Subject: [PATCH] Add a Makefile for easy testing many version The `Makefile` includes `stack test` configurations to support building versions of `brittany` with supported versions of `ghc`. Each version uses a separate `.stack-work` directory to allow minimal compilation on each change. --- .gitignore | 3 ++- Makefile | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index 4393459..4cdb828 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,5 @@ local/ cabal.sandbox.config cabal.project.local .ghc.environment.* -result \ No newline at end of file +result +.stack-work* diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e0213ab --- /dev/null +++ b/Makefile @@ -0,0 +1,28 @@ +.PHONY: test +test: + echo "test" + stack test + +.PHONY: test-all +test-all: + $(MAKE) test test-8.6.5 test-8.4.3 test-8.2.2 test-8.0.2 + +.PHONY: test-8.6.5 +test-8.6.5: + echo "test 8.6.5" + stack test --stack-yaml stack-8.6.5.yaml --work-dir .stack-work-8.6.5 + +.PHONY: test-8.4.3 +test-8.4.3: + echo "test 8.4.3" + stack test --stack-yaml stack-8.4.3.yaml --work-dir .stack-work-8.4.3 + +.PHONY: test-8.2.2 +test-8.2.2: + echo "test 8.2.2" + stack test --stack-yaml stack-8.2.2.yaml --work-dir .stack-work-8.2.2 + +.PHONY: test-8.0.2 +test-8.0.2: + echo "test 8.0.2" + stack test --stack-yaml stack-8.0.2.yaml --work-dir .stack-work-8.0.2