-
Notifications
You must be signed in to change notification settings - Fork 0
108 lines (103 loc) · 3.41 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
---
# yamllint disable rule:line-length
name: CI Build
# yamllint disable-line rule:truthy
on:
# Run Daily
schedule:
- cron: "0 0 * * *"
# Run on Push
push:
# Run on Tag Creation
create:
# Allow Running Manually
workflow_dispatch:
jobs:
build-stack:
name: Stack
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Cache Stack Artifacts
uses: actions/cache@v2
with:
key: stack-build-lts-${{ github.ref }}-${{ github.sha }}
path: |
~/.stack/
.stack-work/
restore-keys: |
stack-build-lts-${{ github.ref }}-
stack-build-lts-
stack-build-
- name: Install C Libs
run: sudo apt-get install libxrandr-dev libxss-dev libxpm-dev libxft-dev
- uses: haskell/actions/setup@v2
with:
enable-stack: true
stack-no-global: true
- run: stack test --fast --haddock
# Stackage Nightly - Failures Allowed
build-nightly:
name: Stackage Nightly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Get Current Date
id: date
run: echo -e "::set-output name=year::$(date +%Y)\n::set-output name=month::$(date +%m)\n::set-output name=day::$(date +%d)"
- name: Cache Stack Artifacts
uses: actions/cache@v2
with:
key: stack-build-nightly-${{ steps.date.outputs.year }}-${{ steps.date.outputs.month }}-${{ steps.date.outputs.day }}-${{ github.ref }}-${{ github.sha }}
path: |
~/.stack/
.stack-work/
restore-keys: |
stack-build-nightly-${{ steps.date.outputs.year }}-${{ steps.date.outputs.month }}-${{ steps.date.outputs.day }}-${{ github.ref }}-
stack-build-nightly-${{ steps.date.outputs.year }}-${{ steps.date.outputs.month }}-${{ steps.date.outputs.day }}-
stack-build-nightly-${{ steps.date.outputs.year }}-${{ steps.date.outputs.month }}-
stack-build-nightly-${{ steps.date.outputs.year }}-
stack-build-nightly-
- name: Install C Libs
run: sudo apt-get install libxrandr-dev libxss-dev libxpm-dev libxft-dev
- uses: haskell/actions/setup@v2
with:
enable-stack: true
stack-no-global: true
- run: stack test --fast --haddock --resolver nightly
continue-on-error: true
# Cabal Builds w/ 3 Latest GHC Versions
build-cabal:
name: GHC / Cabal
runs-on: ubuntu-latest
strategy:
matrix:
ghc: ["9.2", "9.4"]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Cache Cabal Artifacts
uses: actions/cache@v2
with:
key: cabal-build-${{ matrix.ghc }}-${{ github.ref }}-${{ github.sha }}
path: |
~/.cabal/packages/
~/.cabal/store
dist-newstyle/
restore-keys: |
cabal-build-${{ matrix.ghc }}-${{ github.ref }}-
cabal-build-${{ matrix.ghc }}-
cabal-build-
- name: Install C Libs
run: sudo apt-get install libxrandr-dev libxss-dev libxpm-dev libxft-dev
- uses: haskell/actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: latest
- run: cabal update
- run: cabal build --haddock-all