Skip to content

Commit

Permalink
Update haskell.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
yvan-sraka committed Apr 2, 2024
1 parent f59f468 commit c5165e5
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down

0 comments on commit c5165e5

Please sign in to comment.