diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml index 885b1916bc8..b404cacfb08 100644 --- a/.github/workflows/bootstrap.yml +++ b/.github/workflows/bootstrap.yml @@ -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 diff --git a/.github/workflows/quick-jobs.yml b/.github/workflows/quick-jobs.yml index 7d39d431cb9..466ec4d57dc 100644 --- a/.github/workflows/quick-jobs.yml +++ b/.github/workflows/quick-jobs.yml @@ -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 @@ -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 diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 9c9ac2f4a3e..658101b5aec 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -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: @@ -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: |