-
Notifications
You must be signed in to change notification settings - Fork 14
83 lines (82 loc) · 2.43 KB
/
quick-jobs.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
# This file is auto-generated
#
# To regenerate it run
#
# make github-actions
#
name: Quick jobs
on:
push:
branches:
- master
pull_request:
branches:
- master
release:
types:
- created
jobs:
meta:
name: Meta checks
runs-on: ubuntu-18.04
# This job is not run in a container, any recent GHC should be fine
steps:
- name: Set PATH
run: |
echo "::add-path::$HOME/.cabal/bin"
echo "::add-path::/opt/cabal/3.2/bin"
echo "::add-path::/opt/ghc/8.6.5/bin"
- uses: actions/cache@v1
with:
path: ~/.cabal/store
key: linux-store-meta
- name: Update Hackage index
run: cabal v2-update
- name: Install alex
run: cabal v2-install alex
- uses: actions/checkout@v2
- name: Regenerate files
run: |
make lexer
make gen-extra-source-files
make spdx
make templates
make github-actions
make cabal-install-cabal
- name: Check that diff is clean
run: |
git status > /dev/null
git diff-files -p --exit-code
doctest:
name: Doctest Cabal
runs-on: ubuntu-18.04
steps:
- name: Set PATH
run: |
echo "::add-path::$HOME/.cabal/bin"
echo "::add-path::/opt/cabal/3.2/bin"
echo "::add-path::/opt/ghc/8.6.5/bin"
- name: Install cabal-env
run: |
mkdir -p $HOME/.cabal/bin
curl -sL https://github.com/phadej/cabal-extras/releases/download/preview-20191225/cabal-env-snapshot-20191225-x86_64-linux.xz > cabal-env.xz
echo "1b567d529c5f627fd8c956e57ae8f0d9f11ee66d6db34b7fb0cb1c370b4edf01 cabal-env.xz" | sha256sum -c -
xz -d < cabal-env.xz > $HOME/.cabal/bin/cabal-env
rm -f cabal-env.xz
chmod a+x $HOME/.cabal/bin/cabal-env
- uses: actions/cache@v1
with:
path: ~/.cabal/store
key: linux-store-doctest
- name: Update Hackage index
run: cabal v2-update
- name: Install doctest
run: cabal v2-install doctest
- name: Install libraries
run: |
cabal-env --transitive QuickCheck
cabal-env array bytestring containers deepseq directory filepath pretty process time binary unix text parsec mtl
cat $HOME/.ghc/*/environments/default
- uses: actions/checkout@v2
- name: Doctest
run: make doctest