-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
154 lines (133 loc) · 3.74 KB
/
.gitlab-ci.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
image: haskell:8.6.3
.variables: &stack_vars
STACK_ROOT: ${CI_PROJECT_DIR}/.stack-root
STACK_WORK: ${PACKAGE}/.stack-work
STACK: >-
stack
--resolver=${RESOLVER}
--no-terminal
--stack-root ${CI_PROJECT_DIR}/.stack-root
--work-dir .stack-work
COVERAGE_DIR: ${CI_PROJECT_DIR}/coverage/${PACKAGE}
.stack_build: &stack_build
before_script:
- mkdir -p ${STACK_ROOT}
- cd ${PACKAGE}
- ${STACK} --install-ghc test --only-dependencies
script:
- ${STACK} test --coverage
after_script:
- mkdir -p ${COVERAGE_DIR} ${BIN_DIR}
- cd ${PACKAGE}
- mv `${STACK} path --local-hpc-root`/* ${COVERAGE_DIR}
cache:
key: ${RESOLVER}
paths:
- ${STACK_ROOT}
- ${STACK_WORK}
artifacts:
paths:
- ${COVERAGE_DIR}
.cabal_build: &cabal_build
before_script:
- apt-get update && apt-get install -y --no-install-recommends software-properties-common
- apt-add-repository ppa:hvr/ghc
- apt-get update && apt-get install -y --no-install-recommends ghc-${GHC_VERSION}
- PATH="/opt/cabal/bin:$PATH"
- PATH="/opt/ghc/${GHC_VERSION}/bin:$PATH"
- cabal update
- cd ${PACKAGE}
- cabal check
- (cd ../${TEST_DEP}; cabal install)
- cabal install --enable-tests --only-dependencies
script:
- cabal test --show-details=always
- cabal sdist
after_script:
- rm -fv ${HOME}/.cabal/packages/hackage.haskell.org/build-reports.log
# remove files that are regenerated by 'cabal update'
- rm -fv ${HOME}/.cabal/packages/hackage.haskell.org/00-index.*
- rm -fv ${HOME}/.cabal/packages/hackage.haskell.org/*.json
- rm -fv ${HOME}/.cabal/packages/hackage.haskell.org/01-index.cache
- rm -fv ${HOME}/.cabal/packages/hackage.haskell.org/01-index.tar
- rm -fv ${HOME}/.cabal/packages/hackage.haskell.org/01-index.tar.idx
- rm -rfv ${HOME}/.cabal/packages/head.hackage
cache:
key: ${GHC_VERSION}
paths:
- ${HOME}/.cabal/packages
- ${HOME}/.cabal/store
lts-9.19_attoparsec-varword:
<<: *stack_build
variables:
PACKAGE: attoparsec-varword
RESOLVER: lts-9.19
<<: *stack_vars
lts-9.19_bytestring-builder-varword:
<<: *stack_build
variables:
PACKAGE: bytestring-builder-varword
RESOLVER: lts-9.19
<<: *stack_vars
lts-12.11_attoparsec-varword:
<<: *stack_build
variables:
PACKAGE: attoparsec-varword
RESOLVER: lts-12.11
<<: *stack_vars
lts-12.11_bytestring-builder-varword:
<<: *stack_build
variables:
PACKAGE: bytestring-builder-varword
RESOLVER: lts-12.11
<<: *stack_vars
ghc-8.0.2_attoparsec-varword:
<<: *cabal_build
variables:
PACKAGE: attoparsec-varword
GHC_VERSION: 8.0.2
TEST_DEP: bytestring-builder-varword
ghc-8.0.2_bytestring-builder-varword:
<<: *cabal_build
variables:
PACKAGE: bytestring-builder-varword
GHC_VERSION: 8.0.2
TEST_DEP: attoparsec-varword
ghc-8.2.2_attoparsec-varword:
<<: *cabal_build
variables:
PACKAGE: attoparsec-varword
GHC_VERSION: 8.2.2
TEST_DEP: bytestring-builder-varword
ghc-8.2.2_bytestring-builder-varword:
<<: *cabal_build
variables:
PACKAGE: bytestring-builder-varword
GHC_VERSION: 8.2.2
TEST_DEP: attoparsec-varword
ghc-8.4.2_attoparsec-varword:
<<: *cabal_build
variables:
PACKAGE: attoparsec-varword
GHC_VERSION: 8.4.2
TEST_DEP: bytestring-builder-varword
ghc-8.4.2_bytestring-builder-varword:
<<: *cabal_build
variables:
PACKAGE: bytestring-builder-varword
GHC_VERSION: 8.4.2
TEST_DEP: attoparsec-varword
pages:
stage: deploy
dependencies:
- lts-12.11_attoparsec-varword
- lts-12.11_bytestring-builder-varword
script:
- mv coverage/ public/
- cp index.html public/
artifacts:
paths:
- public
expire_in: 3 hours
only:
- master