mirror of
https://github.com/xmonad/xmonad.git
synced 2025-07-26 17:51:51 -07:00
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
61 lines
1.5 KiB
YAML
61 lines
1.5 KiB
YAML
name: Stack
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
name: Stack CI - Linux - ${{ matrix.resolver }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
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
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install C dependencies
|
|
run: |
|
|
set -ex
|
|
sudo apt install -y \
|
|
libx11-dev \
|
|
libxext-dev \
|
|
libxinerama-dev \
|
|
libxrandr-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
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.stack
|
|
key: ${{ runner.os }}-${{ matrix.resolver }}-${{ hashFiles('stack.yaml') }}-${{ hashFiles('*.cabal') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-${{ matrix.resolver }}-${{ hashFiles('stack.yaml') }}-
|
|
${{ runner.os }}-${{ matrix.resolver }}-
|
|
|
|
- name: Build and test
|
|
run: |
|
|
set -ex
|
|
stack test \
|
|
--fast --no-terminal \
|
|
--resolver=${{ matrix.resolver }} --system-ghc
|