Skip to content

Commit 6511e2b

Browse files
committed
update-CI: add caching of the store
1 parent 9363ac2 commit 6511e2b

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/update-haskell-ci-on-tested-with-pr.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,27 @@ jobs:
6969
- name: Set up Haskell toolchain
7070
uses: haskell-actions/setup@v2
7171

72-
- name: Install haskell-ci
72+
- name: Clone haskell-ci sources
73+
shell: bash
7374
run: |
7475
set -euxo pipefail
7576
git clone --depth 1 https://github.com/haskell-CI/haskell-ci.git .tooling/haskell-ci
77+
78+
# Cache Cabal store and haskell-ci build artifacts
79+
- name: Cache Cabal store and dist-newstyle for haskell-ci
80+
uses: actions/cache@v4
81+
with:
82+
path: |
83+
~/.cabal/store
84+
.tooling/haskell-ci/dist-newstyle
85+
key: ${{ runner.os }}-cabalstore-ghc-${{ env.GHC_VERSION }}-cabal-${{ env.CABAL_VERSION }}-${{ hashFiles('.tooling/haskell-ci/**/*.cabal', '.tooling/haskell-ci/cabal.project*') }}
86+
restore-keys: |
87+
${{ runner.os }}-cabalstore-ghc-${{ env.GHC_VERSION }}-cabal-${{ env.CABAL_VERSION }}-
88+
89+
- name: Build and install haskell-ci
90+
shell: bash
91+
run: |
92+
set -euxo pipefail
7693
cd .tooling/haskell-ci
7794
cabal update
7895
cabal build exe:haskell-ci

0 commit comments

Comments
 (0)