Skip to content

Commit 71c2906

Browse files
authored
All the bikeshedding improvements since last merge (#83)
1 parent ef67574 commit 71c2906

File tree

18 files changed

+363
-445
lines changed

18 files changed

+363
-445
lines changed

.github/workflows/pipeline.yml

+118-87
Original file line numberDiff line numberDiff line change
@@ -13,182 +13,209 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
os:
16-
- ubuntu-20.04
17-
- macos-10.15
16+
- ubuntu-latest
17+
- macos-latest
1818
ghc:
19-
- ghc8102
19+
- ghc8104
2020
- ghc884
2121
- ghc865
22-
env:
23-
ghc: ${{ matrix.ghc }}
2422
steps:
2523

2624
- name: checkout
2725
uses: actions/checkout@v2
2826

2927
- name: setup-nix
30-
uses: cachix/install-nix-action@v12
28+
uses: cachix/install-nix-action@v13
3129
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=
3334
3435
- name: setup-cachix
35-
uses: cachix/cachix-action@v7
36+
uses: cachix/cachix-action@v10
3637
with:
3738
name: asterius
39+
extraPullNames: niv
3840
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
3941

4042
- name: test
4143
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
4446
done
4547
4648
- name: test-nix-shell
4749
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"
5052
done
5153
54+
nix-shell --keep-going --pure --argstr ghc ${{ matrix.ghc }} --run "haskell-language-server typecheck"
55+
5256
stack:
53-
name: stack-${{ matrix.os }}
57+
name: stack-${{ matrix.os }}-${{ matrix.resolver }}
5458
runs-on: ${{ matrix.os }}
5559
strategy:
5660
fail-fast: false
5761
matrix:
5862
os:
59-
- windows-2019
63+
- windows-latest
64+
resolver:
65+
- lts-17
66+
- lts-16
67+
- lts-14
6068
steps:
6169

70+
- name: checkout
71+
uses: actions/checkout@v2
72+
6273
- name: setup-haskell
63-
uses: actions/setup-haskell@v1
74+
id: setup-haskell
75+
uses: haskell/actions/setup@v1
6476
with:
65-
stack-version: 2.5.1
6677
enable-stack: true
6778
stack-no-global: true
6879

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
7188
7289
- name: build
7390
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
75103
76104
- name: setup-node-15
77-
uses: actions/setup-node@v2-beta
105+
uses: actions/setup-node@v2
78106
with:
79-
node-version: 15.2.0
107+
node-version: 15
108+
check-latest: true
80109

81110
- name: test-node-15
82111
run: |
83112
node --version
84-
stack run inline-js-tests -- -j2
113+
stack --resolver ${{ matrix.resolver }} run inline-js-tests -- -j2
85114
86115
- name: setup-node-14
87-
uses: actions/setup-node@v2-beta
116+
uses: actions/setup-node@v2
88117
with:
89-
node-version: 14.15.0
118+
node-version: 14
119+
check-latest: true
90120

91121
- name: test-node-14
92122
run: |
93123
node --version
94-
stack run inline-js-tests -- -j2
124+
stack --resolver ${{ matrix.resolver }} run inline-js-tests -- -j2
95125
96126
- name: setup-node-13
97-
uses: actions/setup-node@v2-beta
127+
uses: actions/setup-node@v2
98128
with:
99-
node-version: 13.14.0
129+
node-version: 13
130+
check-latest: true
100131

101132
- name: test-node-13
102133
run: |
103134
node --version
104-
stack run inline-js-tests -- -j2
135+
stack --resolver ${{ matrix.resolver }} run inline-js-tests -- -j2
105136
106137
- name: setup-node-12
107-
uses: actions/setup-node@v2-beta
138+
uses: actions/setup-node@v2
108139
with:
109-
node-version: 12.19.0
140+
node-version: 12
141+
check-latest: true
110142

111143
- name: test-node-12
112144
run: |
113145
node --version
114-
stack run inline-js-tests -- -j2
146+
stack --resolver ${{ matrix.resolver }} run inline-js-tests -- -j2
115147
116148
- name: setup-node-10
117-
uses: actions/setup-node@v2-beta
149+
uses: actions/setup-node@v2
118150
with:
119-
node-version: 10.23.0
151+
node-version: 10
152+
check-latest: true
120153

121154
- name: test-node-10
122155
run: |
123156
node --version
124-
stack run inline-js-tests -- -j2
157+
stack --resolver ${{ matrix.resolver }} run inline-js-tests -- -j2
125158
126-
sdist:
127-
name: sdist
128-
runs-on: ubuntu-20.04
159+
sdist-haddock:
160+
name: sdist-haddock
161+
runs-on: ubuntu-latest
129162
steps:
130163

131164
- name: checkout
132165
uses: actions/checkout@v2
133166

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
136170
with:
137-
nix_path: nixpkgs=./nix/nixpkgs.nix
171+
ghc-version: 8.10.4
172+
cabal-version: 3.4.0.0
138173

139-
- name: setup-cachix
140-
uses: cachix/cachix-action@v7
174+
- name: cache
175+
uses: actions/cache@v2
141176
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
144182
145-
- name: sdist
183+
- name: check
146184
run: |
147-
148185
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
150189
done
151190
152-
nix-shell --pure --run "cabal v2-sdist all"
191+
- name: sdist
192+
run: |
193+
cabal v2-sdist all
153194
154-
- name: upload-artifact
195+
- name: sdist-artifact
155196
uses: actions/upload-artifact@v2
156197
with:
157198
name: sdist
158199
path: dist-newstyle/sdist/*.tar.gz
159200

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-
179201
- name: haddock
180202
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
184211
uses: actions/upload-artifact@v2
185212
with:
186213
name: haddock
187214
path: dist-newstyle/*-docs.tar.gz
188215

189216
docs:
190217
name: docs
191-
runs-on: ubuntu-20.04
218+
runs-on: ubuntu-latest
192219
env:
193220
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
194221
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
@@ -197,26 +224,30 @@ jobs:
197224
- name: checkout
198225
uses: actions/checkout@v2
199226

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
202230
with:
203-
nix_path: nixpkgs=./nix/nixpkgs.nix
231+
enable-stack: true
232+
stack-no-global: true
204233

205-
- name: setup-cachix
206-
uses: cachix/cachix-action@v7
234+
- name: cache
235+
uses: actions/cache@v2
207236
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
210248

211249
- name: setup-deps
212250
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-
220251
npm config set prefix ~/.local
221252
222253
npm install -g \
@@ -226,7 +257,7 @@ jobs:
226257
run: |
227258
export PATH=~/.local/bin:$PATH
228259
229-
stack -j2 build --haddock
260+
stack build --haddock
230261
231262
if [ ! -z "$NETLIFY_AUTH_TOKEN" ]
232263
then

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
.direnv/
12
.ghc.environment*
23
.stack-work/
4+
.vscode/
35
dist/
46
dist-newstyle/
57
stack.yaml.lock

0 commit comments

Comments
 (0)