diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index d16fcd241..db39436d6 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -148,16 +148,27 @@ jobs: # uses: mxschmitt/action-tmate@v3 # with: # limit-access-to-actor: true + - name: Install Nix with good defaults + if: runner.os == 'Linux' && (matrix.ghc == '8.10.7' || matrix.ghc == '9.6.2') + uses: cachix/install-nix-action@v26 + with: + extra_nix_config: | + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk= + substituters = https://cache.iog.io/ https://cache.zw3rk.com/ https://cache.nixos.org/ + nix_path: nixpkgs=channel:nixos-unstable" + github_access_token: ${{ secrets.GITHUB_TOKEN }} - name: Force Cabal and HLS to populate their caches if: runner.os == 'Linux' && (matrix.ghc == '8.10.7' || matrix.ghc == '9.6.2') run: | - timeout 15m bash -c "nix develop github:input-output-hk/devx#${{ matrix.ghc == '8.10.7' && 'ghc810' || matrix.ghc == '9.6.2' && 'ghc96' }} --command bash -c 'cabal update; haskell-language-server --project-ghc-version'" + timeout 15m bash -c \ + "nix develop github:input-output-hk/devx#${{ matrix.ghc == '8.10.7' && 'ghc810' || matrix.ghc == '9.6.2' && 'ghc96' }} --command \ + bash -c 'cabal update; haskell-language-server --project-ghc-version'" shell: bash - name: Cache build artifacts (used to speed up GitHub Codespaces bootstrapping) if: runner.os == 'Linux' && (matrix.ghc == '8.10.7' || matrix.ghc == '9.6.2') - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: cache-${{ github.sha }}-${{ matrix.ghc == '8.10.7' && 'ghc810' || matrix.ghc == '9.6.2' && 'ghc96' }} path: |