Skip to content

Commit

Permalink
Work around ghcup cache woes also in our tiny CI scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikolaj committed Feb 8, 2023
1 parent 22dcb3c commit 7310c94
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/changelogs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ jobs:
with:
path: ~/.cabal/store
key: linux-store-changelogs
# See https://github.com/haskell/cabal/pull/8739
- name: Sudo chmod to permit ghcup to update its cache
run: |
if [[ "${{ runner.os }}" == "Linux" ]]; then
sudo mkdir -p /usr/local/.ghcup/cache
sudo chown -R $USER /usr/local/.ghcup
sudo chmod -R 777 /usr/local/.ghcup
fi
- name: ghcup
run: |
ghcup config set cache true
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/whitespace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ jobs:
path: "~/.local/bin"
key: fix-whitespace-${{ env.fix-whitespace-ver }}

# See https://github.com/haskell/cabal/pull/8739
- name: Sudo chmod to permit ghcup to update its cache
run: |
if [[ "${{ runner.os }}" == "Linux" ]]; then
sudo mkdir -p /usr/local/.ghcup/cache
sudo chown -R $USER /usr/local/.ghcup
sudo chmod -R 777 /usr/local/.ghcup
fi
- uses: haskell/actions/setup@v2
if: ${{ !steps.cache.outputs.cache-hit }}
with:
Expand Down

0 comments on commit 7310c94

Please sign in to comment.