mirror of
https://github.com/xmonad/xmonad.git
synced 2025-07-25 17:21:52 -07:00
ci: Minor cleanup
* 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
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
name: Tests
|
||||
name: Stack
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -20,20 +18,29 @@ jobs:
|
||||
- name: Clone project
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Cache dependencies
|
||||
- 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('xmonad.cabal') }}
|
||||
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 run tests
|
||||
shell: bash
|
||||
- name: Build and test
|
||||
run: |
|
||||
set -ex
|
||||
curl -sSL https://get.haskellstack.org/ | sh -s - -f
|
||||
sudo apt install -y libasound2 libasound2-dev libxrandr-dev libtinfo-dev
|
||||
sudo apt install -y libx11-dev libgmp-dev libxss-dev libxft-dev
|
||||
stack test --fast --no-terminal --resolver=${{ matrix.resolver }}
|
||||
set -ex
|
||||
stack test \
|
||||
--fast --no-terminal \
|
||||
--resolver=${{ matrix.resolver }}
|
Reference in New Issue
Block a user