Skip to content

Commit

Permalink
Merge pull request #8758 from haskell/mergify/bp/3.10/pr-8739
Browse files Browse the repository at this point in the history
Hack around CI problems by sudo chown and disabling cache for Windows validate (backport #8739)
  • Loading branch information
mergify[bot] authored Feb 13, 2023
2 parents ebfb302 + 9eed20d commit 1b0c8bc
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/workflows/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,20 @@ jobs:
restore-keys: bootstrap-${{ runner.os }}-${{ matrix.ghc }}-20221115-

- uses: actions/checkout@v3
# 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 ls -lah /usr/local/.ghcup/cache
sudo mkdir -p /usr/local/.ghcup/cache
sudo ls -lah /usr/local/.ghcup/cache
sudo chown -R $USER /usr/local/.ghcup
sudo chmod -R 777 /usr/local/.ghcup
fi
- name: bootstrap.py
run: |
GHC_VERSION=${{ matrix.ghc }}
ghcup --version
ghcup config set cache true
ghcup install ghc $GHC_VERSION
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/quick-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,19 @@ jobs:
with:
path: ~/.cabal/store
key: linux-store-meta
# 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 ls -lah /usr/local/.ghcup/cache
sudo mkdir -p /usr/local/.ghcup/cache
sudo ls -lah /usr/local/.ghcup/cache
sudo chown -R $USER /usr/local/.ghcup
sudo chmod -R 777 /usr/local/.ghcup
fi
- name: ghcup
run: |
ghcup --version
ghcup config set cache true
ghcup install ghc recommended
ghcup set ghc recommended
Expand Down Expand Up @@ -66,8 +77,19 @@ jobs:
with:
path: ~/.cabal/store
key: linux-store-doctest
# 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 ls -lah /usr/local/.ghcup/cache
sudo mkdir -p /usr/local/.ghcup/cache
sudo ls -lah /usr/local/.ghcup/cache
sudo chown -R $USER /usr/local/.ghcup
sudo chmod -R 777 /usr/local/.ghcup
fi
- name: ghcup
run: |
ghcup --version
ghcup config set cache true
ghcup install ghc recommended
ghcup set ghc recommended
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ jobs:

- uses: actions/checkout@v3

# 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 ls -lah /usr/local/.ghcup/cache
sudo mkdir -p /usr/local/.ghcup/cache
sudo ls -lah /usr/local/.ghcup/cache
sudo chown -R $USER /usr/local/.ghcup
sudo chmod -R 777 /usr/local/.ghcup
fi
- uses: haskell/actions/setup@v2
id: setup-haskell
with:
Expand All @@ -65,7 +75,10 @@ jobs:

# See the following link for a breakdown of the following step
# https://github.com/haskell/actions/issues/7#issuecomment-745697160
- uses: actions/cache@v2
#
# See https://github.com/haskell/cabal/pull/8739 for why Windows is excluded
- if: ${{ runner.os != 'Windows' }}
uses: actions/cache@v2
with:
# validate.sh uses a special build dir
path: |
Expand Down

0 comments on commit 1b0c8bc

Please sign in to comment.