ci: Use system GHC in Stack to not waste GH Actions cache space

Stack installation of GHC takes more than a gigabyte, so caching it
wastes space (GitHub docs say it will be aggressively evicted after
reaching the 5G limit) and also time (compression, decompression).

Related: https://github.com/xmonad/X11/pull/75
Related: https://github.com/xmonad/xmonad/issues/283
This commit is contained in:
Tomas Janousek
2021-03-28 11:25:21 +01:00
parent fd243ca1c1
commit 9fce3805fc

View File

@@ -13,9 +13,13 @@ jobs:
matrix:
include:
- resolver: lts-12
ghc: 8.4.4
- resolver: lts-14
ghc: 8.6.5
- resolver: lts-16
ghc: 8.8.4
- resolver: lts-17
ghc: 8.10.4
steps:
- name: Clone project
@@ -32,6 +36,13 @@ jobs:
libxss-dev \
#
- name: Install GHC
# use system ghc in stack, don't waste GH Actions cache space
run: |
set -ex
sudo apt install -y ghc-${{ matrix.ghc }}
echo /opt/ghc/${{ matrix.ghc }}/bin >> $GITHUB_PATH
- name: Cache Haskell dependencies
uses: actions/cache@v2
with:
@@ -46,4 +57,4 @@ jobs:
set -ex
stack test \
--fast --no-terminal \
--resolver=${{ matrix.resolver }}
--resolver=${{ matrix.resolver }} --system-ghc