mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-14 11:45:54 -07:00
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:9fce3805fc
Related:a5cee9bac2
Related: https://github.com/xmonad/X11/pull/75
This commit is contained in:
21
.github/workflows/stack.yml
vendored
21
.github/workflows/stack.yml
vendored
@@ -13,22 +13,34 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- resolver: lts-12
|
- resolver: lts-12
|
||||||
|
ghc: 8.4.4
|
||||||
yaml: stack.yaml
|
yaml: stack.yaml
|
||||||
- resolver: lts-12
|
- resolver: lts-12
|
||||||
|
ghc: 8.4.4
|
||||||
yaml: stack-master.yaml
|
yaml: stack-master.yaml
|
||||||
- resolver: lts-14
|
- resolver: lts-14
|
||||||
|
ghc: 8.6.5
|
||||||
yaml: stack-master.yaml
|
yaml: stack-master.yaml
|
||||||
- resolver: lts-16
|
- resolver: lts-16
|
||||||
|
ghc: 8.8.4
|
||||||
yaml: stack-master.yaml
|
yaml: stack-master.yaml
|
||||||
- resolver: lts-17
|
- resolver: lts-17
|
||||||
|
ghc: 8.10.4
|
||||||
yaml: stack.yaml
|
yaml: stack.yaml
|
||||||
- resolver: lts-17
|
- resolver: lts-17
|
||||||
|
ghc: 8.10.4
|
||||||
yaml: stack-master.yaml
|
yaml: stack-master.yaml
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone project
|
- name: Clone project
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Prepare apt sources
|
||||||
|
run: |
|
||||||
|
set -ex
|
||||||
|
sudo add-apt-repository -y ppa:hvr/ghc
|
||||||
|
sudo apt update -y
|
||||||
|
|
||||||
- name: Install C dependencies
|
- name: Install C dependencies
|
||||||
run: |
|
run: |
|
||||||
set -ex
|
set -ex
|
||||||
@@ -41,6 +53,13 @@ jobs:
|
|||||||
libxss-dev \
|
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
|
- name: Cache Haskell dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@@ -56,4 +75,4 @@ jobs:
|
|||||||
stack test \
|
stack test \
|
||||||
--fast --no-terminal \
|
--fast --no-terminal \
|
||||||
--stack-yaml=${{ matrix.yaml }} \
|
--stack-yaml=${{ matrix.yaml }} \
|
||||||
--resolver=${{ matrix.resolver }}
|
--resolver=${{ matrix.resolver }} --system-ghc
|
||||||
|
Reference in New Issue
Block a user