-
Notifications
You must be signed in to change notification settings - Fork 10
246 lines (206 loc) · 6.31 KB
/
pipeline.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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
name: pipeline
on:
- push
- pull_request
jobs:
nix:
name: nix-${{ matrix.os }}-${{ matrix.ghc }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-11
ghc:
- ghc8107
- ghc884
- ghc865
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup-nix
uses: cachix/install-nix-action@v14.1
with:
extra_nix_config: |
substituters = https://cache.nixos.org https://hydra.iohk.io
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
- name: setup-cachix
uses: cachix/cachix-action@v10
with:
name: asterius
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- name: cachix-watch-store
run: |
cachix watch-store -c9 asterius &
- name: test
run: |
nix-build --keep-going --no-out-link --arg ghcs '["${{ matrix.ghc }}"]' nix/ci.nix
cabal:
name: cabal-${{ matrix.os }}-${{ matrix.ghc }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- windows-2022
ghc:
- 9.0.1
- 8.10.7
- 8.8.4
- 8.6.5
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup-haskell
id: setup-haskell
uses: haskell/actions/setup@v1
with:
ghc-version: ${{ matrix.ghc }}
- name: cache
uses: actions/cache@v2
with:
key: cabal-${{ matrix.os }}-${{ matrix.ghc }}-${{ github.run_id }}
restore-keys: cabal-${{ matrix.os }}-${{ matrix.ghc }}-
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
dist-newstyle
- name: build
run: |
C:\msys64\msys2_shell.cmd -mingw64 -defterm -full-path -here -no-start -c "cabal v2-build all"
- name: setup-node-16
uses: actions/setup-node@v2
with:
node-version: 16
check-latest: true
- name: test-node-16
run: |
node --version
C:\msys64\msys2_shell.cmd -mingw64 -defterm -full-path -here -no-start -c "cabal v2-run inline-js-tests -- -j2"
- name: setup-node-15
uses: actions/setup-node@v2
with:
node-version: 15
check-latest: true
- name: test-node-15
run: |
node --version
C:\msys64\msys2_shell.cmd -mingw64 -defterm -full-path -here -no-start -c "cabal v2-run inline-js-tests -- -j2"
- name: setup-node-14
uses: actions/setup-node@v2
with:
node-version: 14
check-latest: true
- name: test-node-14
run: |
node --version
C:\msys64\msys2_shell.cmd -mingw64 -defterm -full-path -here -no-start -c "cabal v2-run inline-js-tests -- -j2"
- name: setup-node-13
uses: actions/setup-node@v2
with:
node-version: 13
check-latest: true
- name: test-node-13
run: |
node --version
C:\msys64\msys2_shell.cmd -mingw64 -defterm -full-path -here -no-start -c "cabal v2-run inline-js-tests -- -j2"
- name: setup-node-12
uses: actions/setup-node@v2
with:
node-version: 12
check-latest: true
- name: test-node-12
run: |
node --version
C:\msys64\msys2_shell.cmd -mingw64 -defterm -full-path -here -no-start -c "cabal v2-run inline-js-tests -- -j2"
- name: setup-node-10
uses: actions/setup-node@v2
with:
node-version: 10
check-latest: true
- name: test-node-10
run: |
node --version
C:\msys64\msys2_shell.cmd -mingw64 -defterm -full-path -here -no-start -c "cabal v2-run inline-js-tests -- -j2"
sdist-haddock:
name: sdist-haddock
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup-haskell
id: setup-haskell
uses: haskell/actions/setup@v1
with:
ghc-version: 8.10.7
- name: cache
uses: actions/cache@v2
with:
key: sdist-haddock-${{ github.run_id }}
restore-keys: sdist-haddock-
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
dist-newstyle
- name: check
run: |
for pkg in inline-js inline-js-core inline-js-examples inline-js-tests; do
pushd $pkg
cabal check
popd
done
- name: sdist
run: |
cabal v2-sdist all
- name: sdist-artifact
uses: actions/upload-artifact@v2
with:
name: sdist
path: dist-newstyle/sdist/*.tar.gz
- name: haddock
run: |
cabal v2-haddock \
--enable-documentation \
--haddock-for-hackage \
--haddock-hyperlink-source \
--haddock-quickjump \
all
- name: haddock-artifact
uses: actions/upload-artifact@v2
with:
name: haddock
path: dist-newstyle/*-docs.tar.gz
docs:
name: docs
runs-on: ubuntu-latest
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup-haskell
id: setup-haskell
uses: haskell/actions/setup@v1
with:
enable-stack: true
stack-no-global: true
- name: cache
uses: actions/cache@v2
with:
key: docs-${{ github.run_id }}
restore-keys: docs-
path: |
${{ steps.setup-haskell.outputs.stack-root }}
**/.stack-work
- name: build
run: |
stack build --haddock
if [ ! -z "$NETLIFY_AUTH_TOKEN" ]
then
if [ $(git rev-parse --abbrev-ref HEAD) = "master" ]
then
netlify deploy --dir $(stack path --local-doc-root) --message "$GITHUB_REF-$GITHUB_SHA" --prod
else
netlify deploy --dir $(stack path --local-doc-root) --message "$GITHUB_REF-$GITHUB_SHA"
fi
fi