Skip to content

Commit 897109e

Browse files
jneirapepeiborra
andauthored
Remove .stack-work from circleci cache (#2044)
* Remove .stack-work from cache * Deps cache only depends on resolver * Disable executable dynamic * Update circleci cache key * Remove superflous test build 🤦 Co-authored-by: Pepe Iborra <[email protected]>
1 parent 868e476 commit 897109e

10 files changed

+5
-40
lines changed

.circleci/config.yml

+5-22
Original file line numberDiff line numberDiff line change
@@ -12,54 +12,37 @@ defaults: &defaults
1212
name: Figure out resolver for better caching
1313
command: grep '^resolver:' stack-build.txt > resolver.txt
1414

15-
- run:
16-
name: Create a composite cabal file for changes detection
17-
command: find . -name "*.cabal" | grep -v -e "stack-work" -e "dist-newstyle" -e "submodules" -e "testdata" | sort | xargs cat > all-cabal.txt
18-
1915
- restore_cache:
2016
keys:
21-
- v2-stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}-{{ checksum "all-cabal.txt" }}
22-
- v2-stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}
23-
- v2-stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }}
17+
- v4-stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }}
2418

2519
- run:
2620
name: Stack upgrade
2721
command: stack upgrade
2822

2923
- run:
3024
name: Stack setup
31-
command: stack -j 2 --stack-yaml=${STACK_FILE} setup
25+
command: stack -j2 --stack-yaml=${STACK_FILE} setup
3226

3327
- run:
3428
name: Build (we need the exe for tests)
3529
# need j1, else ghc-lib-parser triggers OOM
36-
command: stack -j 1 --stack-yaml=${STACK_FILE} install --no-terminal
30+
command: stack -j1 --stack-yaml=${STACK_FILE} install --no-terminal
3731
no_output_timeout: 30m
3832

3933
- run:
4034
name: Build Testsuite without running it
41-
command: stack -j 1 --stack-yaml=${STACK_FILE} build --test --no-run-tests --no-terminal
35+
command: stack -j1 --stack-yaml=${STACK_FILE} build --test --no-run-tests --no-terminal
4236
no_output_timeout: 30m
4337

4438
- store_artifacts:
4539
path: ~/.local/bin
4640
destination: bin
4741

4842
- save_cache:
49-
key: v2-stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }}
43+
key: v4-stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }}
5044
paths: &cache_paths
5145
- ~/.stack
52-
- ~/build/.stack-work
53-
- ~/build/ghcide/.stack-work
54-
55-
- run:
56-
name: Build including tests
57-
command: stack --stack-yaml=${STACK_FILE} test --no-run-tests --no-terminal
58-
no_output_timeout: 120m
59-
60-
- save_cache:
61-
key: v2-stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}-{{ checksum "all-cabal.txt" }}
62-
paths: *cache_paths
6346

6447
version: 2
6548
jobs:

stack-8.10.2.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ extra-deps:
7575
# https://github.com/haskell/lsp/pull/332
7676

7777
configure-options:
78-
$targets:
79-
- --enable-executable-dynamic
8078
ghcide:
8179
- --disable-library-for-ghci
8280
haskell-language-server:

stack-8.10.3.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ extra-deps:
7575
# https://github.com/haskell/lsp/pull/332
7676

7777
configure-options:
78-
$targets:
79-
- --enable-executable-dynamic
8078
ghcide:
8179
- --disable-library-for-ghci
8280
haskell-language-server:

stack-8.10.4.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ extra-deps:
7777
# - hlint-3.3@sha256:4218ad6e03050f5d68aeba0e025f5f05e366c8fd49657f2a19df04ee31b2bb23,4154
7878

7979
configure-options:
80-
$targets:
81-
- --enable-executable-dynamic
8280
ghcide:
8381
- --disable-library-for-ghci
8482
haskell-language-server:

stack-8.10.5.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ extra-deps:
7979
# - hlint-3.3@sha256:4218ad6e03050f5d68aeba0e025f5f05e366c8fd49657f2a19df04ee31b2bb23,4154
8080

8181
configure-options:
82-
$targets:
83-
- --enable-executable-dynamic
8482
ghcide:
8583
- --disable-library-for-ghci
8684
haskell-language-server:

stack-8.6.4.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@ flags:
124124

125125

126126
configure-options:
127-
$targets:
128-
- --enable-executable-dynamic
129127
ghcide:
130128
- --disable-library-for-ghci
131129
haskell-language-server:

stack-8.6.5.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ extra-deps:
113113
# https://github.com/haskell/lsp/pull/332
114114

115115
configure-options:
116-
$targets:
117-
- --enable-executable-dynamic
118116
ghcide:
119117
- --disable-library-for-ghci
120118
haskell-language-server:

stack-8.8.3.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ extra-deps:
9292
# https://github.com/haskell/lsp/pull/332
9393

9494
configure-options:
95-
$targets:
96-
- --enable-executable-dynamic
9795
ghcide:
9896
- --disable-library-for-ghci
9997
haskell-language-server:

stack-8.8.4.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ extra-deps:
8989
# https://github.com/haskell/lsp/pull/332
9090

9191
configure-options:
92-
$targets:
93-
- --enable-executable-dynamic
9492
ghcide:
9593
- --disable-library-for-ghci
9694
haskell-language-server:

stack-9.0.1.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@ extra-deps:
102102
commit: 16e19aaf34e286f3d27b3988c61040823ec66537
103103

104104
configure-options:
105-
$targets:
106-
- --enable-executable-dynamic
107105
ghcide:
108106
- --disable-library-for-ghci
109107
haskell-language-server:

0 commit comments

Comments
 (0)