mirror of
https://github.com/xmonad/xmonad.git
synced 2025-07-31 04:01:52 -07:00
* rename workflow to Stack * test all branches (provides feedback before opening a PR) * split into buildenv deps and stack build * make the deps list more git-friendly; tweak the deps * use stack from github environment (I've seen the curl fail intermittently) * use `*.cabal` to minimize diff between our repos Related: https://github.com/xmonad/X11/pull/75 Related: https://github.com/xmonad/xmonad/issues/283
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: Stack
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
name: CI
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
resolver: [lts-16, lts-15, lts-14, lts-12]
|
|
|
|
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: 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 }}
|