Skip to content

Commit 7310c94

Browse files
committed
Work around ghcup cache woes also in our tiny CI scripts
1 parent 22dcb3c commit 7310c94

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

.github/workflows/changelogs.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ jobs:
3333
with:
3434
path: ~/.cabal/store
3535
key: linux-store-changelogs
36+
# See https://github.com/haskell/cabal/pull/8739
37+
- name: Sudo chmod to permit ghcup to update its cache
38+
run: |
39+
if [[ "${{ runner.os }}" == "Linux" ]]; then
40+
sudo mkdir -p /usr/local/.ghcup/cache
41+
sudo chown -R $USER /usr/local/.ghcup
42+
sudo chmod -R 777 /usr/local/.ghcup
43+
fi
3644
- name: ghcup
3745
run: |
3846
ghcup config set cache true

.github/workflows/whitespace.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ jobs:
3131
path: "~/.local/bin"
3232
key: fix-whitespace-${{ env.fix-whitespace-ver }}
3333

34+
# See https://github.com/haskell/cabal/pull/8739
35+
- name: Sudo chmod to permit ghcup to update its cache
36+
run: |
37+
if [[ "${{ runner.os }}" == "Linux" ]]; then
38+
sudo mkdir -p /usr/local/.ghcup/cache
39+
sudo chown -R $USER /usr/local/.ghcup
40+
sudo chmod -R 777 /usr/local/.ghcup
41+
fi
42+
3443
- uses: haskell/actions/setup@v2
3544
if: ${{ !steps.cache.outputs.cache-hit }}
3645
with:

0 commit comments

Comments
 (0)