summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Radul <axch@google.com>2022-05-21 21:58:11 -0700
committeraxch <233710+axch@users.noreply.github.com>2022-05-24 14:17:01 -0400
commit173bc5f571bc5c9ab20f9f95a79479900af1ae53 (patch)
tree8ec3de50ce0ac1e9249f16bfdc2f1bf50baef116
parentd3fe94b3860fb834577a29285b6898f1c812b435 (diff)
Separate `stack test` work space from `stack build` work space, because they evict each other's caches.
-rw-r--r--.github/workflows/haskell-ci.yaml1
-rw-r--r--.gitignore1
-rw-r--r--makefile4
3 files changed, 5 insertions, 1 deletions
diff --git a/.github/workflows/haskell-ci.yaml b/.github/workflows/haskell-ci.yaml
index d70816cc..2ad857fd 100644
--- a/.github/workflows/haskell-ci.yaml
+++ b/.github/workflows/haskell-ci.yaml
@@ -45,6 +45,7 @@ jobs:
path: |
~/.stack
$GITHUB_WORKSPACE/.stack-work
+ $GITHUB_WORKSPACE/.stack-work-test
$GITHUB_WORKSPACE/examples/t10k-images-idx3-ubyte
$GITHUB_WORKSPACE/examples/t10k-labels-idx1-ubyte
diff --git a/.gitignore b/.gitignore
index bf15d6e0..feb556c1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,7 @@ test-script.cd
.stack-work-opt
.stack-work-dbg
.stack-work-prof
+.stack-work-test
.stack-work-ffis
garbage.hs
*.lock
diff --git a/makefile b/makefile
index 27af21c1..0bb646ef 100644
--- a/makefile
+++ b/makefile
@@ -221,8 +221,10 @@ doc-lib-names = $(lib-names:%=doc/lib/%.html)
tests: unit-tests quine-tests repl-test module-tests
+# Keep the unit tests in their own working directory too, due to
+# https://github.com/commercialhaskell/stack/issues/4977
unit-tests:
- $(STACK) test $(STACK_FLAGS)
+ $(STACK) test --work-dir .stack-work-test $(STACK_FLAGS)
quine-tests: $(quine-test-targets)