mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-30 02:23:46 -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:
|
on:
|
||||||
pull_request:
|
push:
|
||||||
push:
|
pull_request:
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -20,20 +18,29 @@ jobs:
|
|||||||
- name: Clone project
|
- name: Clone project
|
||||||
uses: actions/checkout@v2
|
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
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.stack
|
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: |
|
restore-keys: |
|
||||||
${{ runner.os }}-${{ matrix.resolver }}-${{ hashFiles('stack.yaml') }}-
|
${{ runner.os }}-${{ matrix.resolver }}-${{ hashFiles('stack.yaml') }}-
|
||||||
${{ runner.os }}-${{ matrix.resolver }}-
|
${{ runner.os }}-${{ matrix.resolver }}-
|
||||||
|
|
||||||
- name: Build and run tests
|
- name: Build and test
|
||||||
shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
set -ex
|
set -ex
|
||||||
curl -sSL https://get.haskellstack.org/ | sh -s - -f
|
stack test \
|
||||||
sudo apt install -y libasound2 libasound2-dev libxrandr-dev libtinfo-dev
|
--fast --no-terminal \
|
||||||
sudo apt install -y libx11-dev libgmp-dev libxss-dev libxft-dev
|
--resolver=${{ matrix.resolver }}
|
||||||
stack test --fast --no-terminal --resolver=${{ matrix.resolver }}
|
|
Reference in New Issue
Block a user