@@ -13,182 +13,209 @@ jobs:
13
13
fail-fast : false
14
14
matrix :
15
15
os :
16
- - ubuntu-20.04
17
- - macos-10.15
16
+ - ubuntu-latest
17
+ - macos-latest
18
18
ghc :
19
- - ghc8102
19
+ - ghc8104
20
20
- ghc884
21
21
- ghc865
22
- env :
23
- ghc : ${{ matrix.ghc }}
24
22
steps :
25
23
26
24
- name : checkout
27
25
uses : actions/checkout@v2
28
26
29
27
- name : setup-nix
30
- uses : cachix/install-nix-action@v12
28
+ uses : cachix/install-nix-action@v13
31
29
with :
32
- nix_path : nixpkgs=./nix/nixpkgs.nix
30
+ nix_path : nixpkgs=channel:nixpkgs-unstable
31
+ extra_nix_config : |
32
+ substituters = https://cache.nixos.org https://hydra.iohk.io
33
+ trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
33
34
34
35
- name : setup-cachix
35
- uses : cachix/cachix-action@v7
36
+ uses : cachix/cachix-action@v10
36
37
with :
37
38
name : asterius
39
+ extraPullNames : niv
38
40
signingKey : ' ${{ secrets.CACHIX_SIGNING_KEY }}'
39
41
40
42
- name : test
41
43
run : |
42
- for node in nodejs-14_x nodejs-12_x nodejs-10_x; do
43
- nix run -f . -i --argstr ghc $ghc --argstr node $node inline-js-tests.components.exes.inline-js-tests -c inline-js-tests -j2
44
+ for node in nodejs-16_x nodejs-15_x nodejs- 14_x nodejs-12_x nodejs-10_x; do
45
+ nix run --keep-going - f . -i --argstr ghc ${{ matrix. ghc }} --argstr node $node inline-js-tests.components.exes.inline-js-tests -c inline-js-tests -j2
44
46
done
45
47
46
48
- name : test-nix-shell
47
49
run : |
48
- for node in nodejs-14_x nodejs-12_x nodejs-10_x; do
49
- nix-shell --pure --argstr ghc $ghc --argstr node $node --run "cabal v2-run inline-js-tests:inline-js-tests -- -j2"
50
+ for node in nodejs-16_x nodejs-15_x nodejs- 14_x nodejs-12_x nodejs-10_x; do
51
+ nix-shell --keep-going -- pure --argstr ghc ${{ matrix. ghc }} --argstr node $node --run "cabal v2-run inline-js-tests:inline-js-tests -- -j2"
50
52
done
51
53
54
+ nix-shell --keep-going --pure --argstr ghc ${{ matrix.ghc }} --run "haskell-language-server typecheck"
55
+
52
56
stack :
53
- name : stack-${{ matrix.os }}
57
+ name : stack-${{ matrix.os }}-${{ matrix.resolver }}
54
58
runs-on : ${{ matrix.os }}
55
59
strategy :
56
60
fail-fast : false
57
61
matrix :
58
62
os :
59
- - windows-2019
63
+ - windows-latest
64
+ resolver :
65
+ - lts-17
66
+ - lts-16
67
+ - lts-14
60
68
steps :
61
69
70
+ - name : checkout
71
+ uses : actions/checkout@v2
72
+
62
73
- name : setup-haskell
63
- uses : actions/setup-haskell@v1
74
+ id : setup-haskell
75
+ uses : haskell/actions/setup@v1
64
76
with :
65
- stack-version : 2.5.1
66
77
enable-stack : true
67
78
stack-no-global : true
68
79
69
- - name : checkout
70
- uses : actions/checkout@v2
80
+ - name : cache
81
+ uses : actions/cache@v2
82
+ with :
83
+ key : stack-${{ matrix.os }}-${{ matrix.resolver }}-${{ github.run_id }}
84
+ restore-keys : stack-${{ matrix.os }}-${{ matrix.resolver }}-
85
+ path : |
86
+ ${{ steps.setup-haskell.outputs.stack-root }}
87
+ **/.stack-work
71
88
72
89
- name : build
73
90
run : |
74
- stack -j2 build --test --no-run-tests
91
+ stack --resolver ${{ matrix.resolver }} build --test --no-run-tests
92
+
93
+ - name : setup-node-16
94
+ uses : actions/setup-node@v2
95
+ with :
96
+ node-version : 16
97
+ check-latest : true
98
+
99
+ - name : test-node-16
100
+ run : |
101
+ node --version
102
+ stack --resolver ${{ matrix.resolver }} run inline-js-tests -- -j2
75
103
76
104
- name : setup-node-15
77
- uses : actions/setup-node@v2-beta
105
+ uses : actions/setup-node@v2
78
106
with :
79
- node-version : 15.2.0
107
+ node-version : 15
108
+ check-latest : true
80
109
81
110
- name : test-node-15
82
111
run : |
83
112
node --version
84
- stack run inline-js-tests -- -j2
113
+ stack --resolver ${{ matrix.resolver }} run inline-js-tests -- -j2
85
114
86
115
- name : setup-node-14
87
- uses : actions/setup-node@v2-beta
116
+ uses : actions/setup-node@v2
88
117
with :
89
- node-version : 14.15.0
118
+ node-version : 14
119
+ check-latest : true
90
120
91
121
- name : test-node-14
92
122
run : |
93
123
node --version
94
- stack run inline-js-tests -- -j2
124
+ stack --resolver ${{ matrix.resolver }} run inline-js-tests -- -j2
95
125
96
126
- name : setup-node-13
97
- uses : actions/setup-node@v2-beta
127
+ uses : actions/setup-node@v2
98
128
with :
99
- node-version : 13.14.0
129
+ node-version : 13
130
+ check-latest : true
100
131
101
132
- name : test-node-13
102
133
run : |
103
134
node --version
104
- stack run inline-js-tests -- -j2
135
+ stack --resolver ${{ matrix.resolver }} run inline-js-tests -- -j2
105
136
106
137
- name : setup-node-12
107
- uses : actions/setup-node@v2-beta
138
+ uses : actions/setup-node@v2
108
139
with :
109
- node-version : 12.19.0
140
+ node-version : 12
141
+ check-latest : true
110
142
111
143
- name : test-node-12
112
144
run : |
113
145
node --version
114
- stack run inline-js-tests -- -j2
146
+ stack --resolver ${{ matrix.resolver }} run inline-js-tests -- -j2
115
147
116
148
- name : setup-node-10
117
- uses : actions/setup-node@v2-beta
149
+ uses : actions/setup-node@v2
118
150
with :
119
- node-version : 10.23.0
151
+ node-version : 10
152
+ check-latest : true
120
153
121
154
- name : test-node-10
122
155
run : |
123
156
node --version
124
- stack run inline-js-tests -- -j2
157
+ stack --resolver ${{ matrix.resolver }} run inline-js-tests -- -j2
125
158
126
- sdist :
127
- name : sdist
128
- runs-on : ubuntu-20.04
159
+ sdist-haddock :
160
+ name : sdist-haddock
161
+ runs-on : ubuntu-latest
129
162
steps :
130
163
131
164
- name : checkout
132
165
uses : actions/checkout@v2
133
166
134
- - name : setup-nix
135
- uses : cachix/install-nix-action@v12
167
+ - name : setup-haskell
168
+ id : setup-haskell
169
+ uses : haskell/actions/setup@v1
136
170
with :
137
- nix_path : nixpkgs=./nix/nixpkgs.nix
171
+ ghc-version : 8.10.4
172
+ cabal-version : 3.4.0.0
138
173
139
- - name : setup-cachix
140
- uses : cachix/cachix-action@v7
174
+ - name : cache
175
+ uses : actions/cache@v2
141
176
with :
142
- name : asterius
143
- signingKey : ' ${{ secrets.CACHIX_SIGNING_KEY }}'
177
+ key : sdist-haddock-${{ github.run_id }}
178
+ restore-keys : sdist-haddock-
179
+ path : |
180
+ ${{ steps.setup-haskell.outputs.cabal-store }}
181
+ dist-newstyle
144
182
145
- - name : sdist
183
+ - name : check
146
184
run : |
147
-
148
185
for pkg in inline-js inline-js-core inline-js-examples inline-js-tests; do
149
- nix-shell --pure --run "cd $pkg && cabal check"
186
+ pushd $pkg
187
+ cabal check
188
+ popd
150
189
done
151
190
152
- nix-shell --pure --run "cabal v2-sdist all"
191
+ - name : sdist
192
+ run : |
193
+ cabal v2-sdist all
153
194
154
- - name : upload -artifact
195
+ - name : sdist -artifact
155
196
uses : actions/upload-artifact@v2
156
197
with :
157
198
name : sdist
158
199
path : dist-newstyle/sdist/*.tar.gz
159
200
160
- haddock :
161
- name : haddock
162
- runs-on : ubuntu-20.04
163
- steps :
164
-
165
- - name : checkout
166
- uses : actions/checkout@v2
167
-
168
- - name : setup-nix
169
- uses : cachix/install-nix-action@v12
170
- with :
171
- nix_path : nixpkgs=./nix/nixpkgs.nix
172
-
173
- - name : setup-cachix
174
- uses : cachix/cachix-action@v7
175
- with :
176
- name : asterius
177
- signingKey : ' ${{ secrets.CACHIX_SIGNING_KEY }}'
178
-
179
201
- name : haddock
180
202
run : |
181
- nix-shell --pure --run "cabal v2-haddock --haddock-for-hackage --haddock-hyperlink-source --haddock-quickjump -j2 all"
182
-
183
- - name : upload-artifact
203
+ cabal v2-haddock \
204
+ --enable-documentation \
205
+ --haddock-for-hackage \
206
+ --haddock-hyperlink-source \
207
+ --haddock-quickjump \
208
+ all
209
+
210
+ - name : haddock-artifact
184
211
uses : actions/upload-artifact@v2
185
212
with :
186
213
name : haddock
187
214
path : dist-newstyle/*-docs.tar.gz
188
215
189
216
docs :
190
217
name : docs
191
- runs-on : ubuntu-20.04
218
+ runs-on : ubuntu-latest
192
219
env :
193
220
NETLIFY_AUTH_TOKEN : ${{ secrets.NETLIFY_AUTH_TOKEN }}
194
221
NETLIFY_SITE_ID : ${{ secrets.NETLIFY_SITE_ID }}
@@ -197,26 +224,30 @@ jobs:
197
224
- name : checkout
198
225
uses : actions/checkout@v2
199
226
200
- - name : setup-nix
201
- uses : cachix/install-nix-action@v12
227
+ - name : setup-haskell
228
+ id : setup-haskell
229
+ uses : haskell/actions/setup@v1
202
230
with :
203
- nix_path : nixpkgs=./nix/nixpkgs.nix
231
+ enable-stack : true
232
+ stack-no-global : true
204
233
205
- - name : setup-cachix
206
- uses : cachix/cachix-action@v7
234
+ - name : cache
235
+ uses : actions/cache@v2
207
236
with :
208
- name : asterius
209
- signingKey : ' ${{ secrets.CACHIX_SIGNING_KEY }}'
237
+ key : docs-${{ github.run_id }}
238
+ restore-keys : docs-
239
+ path : |
240
+ ${{ steps.setup-haskell.outputs.stack-root }}
241
+ **/.stack-work
242
+
243
+ - name : setup-node-15
244
+ uses : actions/setup-node@v2
245
+ with :
246
+ node-version : 15
247
+ check-latest : true
210
248
211
249
- name : setup-deps
212
250
run : |
213
- nix-env -f ./nix/nixpkgs.nix -iA \
214
- nodejs-14_x \
215
- stack
216
-
217
- mkdir ~/.stack
218
- printf "nix:\n enable: true\n" > ~/.stack/config.yaml
219
-
220
251
npm config set prefix ~/.local
221
252
222
253
npm install -g \
@@ -226,7 +257,7 @@ jobs:
226
257
run : |
227
258
export PATH=~/.local/bin:$PATH
228
259
229
- stack -j2 build --haddock
260
+ stack build --haddock
230
261
231
262
if [ ! -z "$NETLIFY_AUTH_TOKEN" ]
232
263
then
0 commit comments