Skip to content

Commit 838e01d

Browse files
committed
CI: {test,bench}: stop creating & using *-bench-* storage
As we see - `bench` stored the: ``` path: | ~/.cabal/packages ~/.cabal/store ``` Which means it stored just dependencies again, but now with `bench` deps aslo. That duplication alse depleated the cache pool quick & created a complexity in the cache key hitting for restoration. `cache-deps` now going to already build deps for tests & bench.
1 parent e1245aa commit 838e01d

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

.github/workflows/bench.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,9 @@ jobs:
5050
path: |
5151
~/.cabal/packages
5252
~/.cabal/store
53-
key: v2-${{ runner.os }}-${{ matrix.ghc }}-bench-${{ hashFiles('cabal.project') }}
5453
restore-keys: |
5554
v2-${{ runner.os }}-${{ matrix.ghc }}-build-${{ hashFiles('cabal.project') }}
56-
v2-${{ runner.os }}-${{ matrix.ghc }}-bench-
55+
v2-${{ runner.os }}-${{ matrix.ghc }}-build-
5756
v2-${{ runner.os }}-${{ matrix.ghc }}
5857
5958
- run: cabal update

.github/workflows/cache-deps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,4 @@ jobs:
118118
119119
# repeating builds to workaround segfaults in windows and ghc-8.8.4
120120
- name: Build
121-
run: cabal build --only-dependencies || cabal build --only-dependencies || cabal build --only-dependencies
121+
run: cabal v2-build --enable-tests --enable-benchmarks --only-dependencies || cabal v2-build --enable-tests --enable-benchmarks --only-dependencies || cabal v2-build --enable-tests --enable-benchmarks --only-dependencies

.github/workflows/test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ jobs:
124124
${{ env.CABAL_STORE_DIR }}
125125
key: v2-${{ runner.os }}-${{ matrix.ghc }}-build-${{ hashFiles('cabal.project') }}
126126
restore-keys: |
127-
v2-${{ runner.os }}-${{ matrix.ghc }}-bench-${{ hashFiles('cabal.project') }}
128127
v2-${{ runner.os }}-${{ matrix.ghc }}-build-
129128
v2-${{ runner.os }}-${{ matrix.ghc }}
130129

0 commit comments

Comments
 (0)