Skip to content

Commit d29f732

Browse files
committed
Merge branch 'master' into alternate-number-format
2 parents a8fd672 + 745ef26 commit d29f732

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+357
-211
lines changed

.github/workflows/build.yml

Lines changed: 43 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ defaults:
77
on:
88
release:
99
types: [created]
10+
push:
11+
branches:
12+
- '*-check-build'
1013

1114
jobs:
1215
build:
@@ -30,8 +33,8 @@ jobs:
3033
ghc-version: ${{ matrix.ghc }}
3134
cabal-version: '3.4'
3235

33-
- if: ${{ matrix.ghc == '9.0.1' }}
34-
name: Use modified cabal.project for ghc9
36+
- name: Use modified cabal.project for ghc9
37+
if: ${{ matrix.ghc == '9.0.1' }}
3538
run: cp cabal-ghc901.project cabal.project
3639

3740
- name: Shorten binary names
@@ -77,13 +80,13 @@ jobs:
7780
echo "package floskell" >> cabal.project
7881
echo " ghc-options: -O0" >> cabal.project
7982
80-
- name: Build Server
83+
- name: Build server
8184
# Try building it twice in case of flakey builds on Windows
8285
run: |
8386
cabal build exe:hls -O2 $LINUX_CABAL_ARGS || \
8487
cabal build exe:hls -O2 $LINUX_CABAL_ARGS -j1
8588
86-
- name: Compress Server Binary
89+
- name: Compress server binary
8790
id: compress_server_binary
8891
run: |
8992
HLS_BUILD=$(find dist-newstyle \( -name 'hls' -o -name 'hls.exe' \) -type f)
@@ -101,7 +104,8 @@ jobs:
101104
echo ::set-output name=extension::gz
102105
fi
103106
104-
- name: Upload Server Binary
107+
- name: Upload server to release
108+
if: ${{ !contains(github.ref_name, 'check') }}
105109
uses: actions/upload-release-asset@v1.0.2
106110
env:
107111
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -111,16 +115,17 @@ jobs:
111115
asset_name: haskell-language-server-${{ runner.OS }}-${{ env.GHC_VERSION }}${{env.EXE_EXT}}.${{ steps.compress_server_binary.outputs.extension }}
112116
asset_content_type: ${{ steps.compress_server_binary.outputs.content_type }}
113117

114-
- uses: actions/upload-artifact@v2
118+
- name: Upload server to workflow artifacts
119+
uses: actions/upload-artifact@v2
115120
with:
116121
name: haskell-language-server-${{ runner.OS }}-${{ matrix.ghc }}${{env.EXE_EXT}}.${{ steps.compress_server_binary.outputs.extension }}
117122
path: ${{ steps.compress_server_binary.outputs.path }}
118123

119-
- name: Build Wrapper
124+
- name: Build wrapper
120125
if: matrix.ghc == '8.10.7'
121126
run: cabal build exe:hls-wrapper -O2 $LINUX_CABAL_ARGS
122127

123-
- name: Compress Wrapper Binary
128+
- name: Compress wrapper binary
124129
if: matrix.ghc == '8.10.7'
125130
id: compress_wrapper_binary
126131
run: |
@@ -139,8 +144,8 @@ jobs:
139144
echo ::set-output name=extension::gz
140145
fi
141146
142-
- name: Upload Wrapper
143-
if: matrix.ghc == '8.10.7'
147+
- name: Upload wrapper to the release
148+
if: ${{ matrix.ghc == '8.10.7' && !contains(github.ref_name, 'check') }}
144149
uses: actions/upload-release-asset@v1.0.2
145150
env:
146151
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -150,31 +155,34 @@ jobs:
150155
asset_name: haskell-language-server-wrapper-${{ runner.OS }}${{env.EXE_EXT}}.${{ steps.compress_wrapper_binary.outputs.extension }}
151156
asset_content_type: ${{ steps.compress_wrapper_binary.outputs.content_type}}
152157

153-
- uses: actions/upload-artifact@v2
158+
- name: Upload wrapper to workflow artifacts
159+
uses: actions/upload-artifact@v2
154160
if: matrix.ghc == '8.10.7'
155161
with:
156162
name: haskell-language-server-wrapper-${{ runner.OS }}${{env.EXE_EXT}}.${{ steps.compress_wrapper_binary.outputs.extension }}
157163
path: ${{ steps.compress_wrapper_binary.outputs.path }}
158-
159-
# generates a custom tarball with sources, used by `ghcup compile hls`
164+
165+
# generates a custom tarball with sources, used by `ghcup compile hls`
160166
src-tar:
161167
needs: build
162168
runs-on: ubuntu-18.04
163-
169+
164170
steps:
165171
- uses: actions/checkout@v2
166172
with:
167173
submodules: true
168-
169-
- name: "Create source tarball"
174+
175+
- name: Create source tarball
170176
run: |
171177
mkdir src-dist
172178
git archive --prefix=haskell-language-server-${{ github.event.release.tag_name }}/ \
173179
--format=tar.gz \
174180
-o src-dist/haskell-language-server.tar.gz \
175181
HEAD
176-
177-
- uses: actions/upload-release-asset@v1.0.2
182+
183+
- name: Upload source tarball to the release
184+
if: ${{ !contains(github.ref_name, 'check') }}
185+
uses: actions/upload-release-asset@v1.0.2
178186
env:
179187
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
180188
with:
@@ -183,11 +191,12 @@ jobs:
183191
asset_name: haskell-language-server-${{ github.event.release.tag_name }}-src.tar.gz
184192
asset_content_type: application/gzip
185193

186-
- uses: actions/upload-artifact@v2
194+
- name: Upload source tarball to workflow artifacts
195+
uses: actions/upload-artifact@v2
187196
with:
188197
name: haskell-language-server-${{ github.event.release.tag_name }}-src.tar.gz
189198
path: src-dist/haskell-language-server.tar.gz
190-
199+
191200
# this generates .gz tarfiles containing binaries for all GHC versions and OS's
192201
# used by `ghcup install hls`
193202
tar:
@@ -199,7 +208,8 @@ jobs:
199208
steps:
200209
- uses: actions/download-artifact@v2
201210

202-
- run: |
211+
- name: Generate tarball with all binaries
212+
run: |
203213
# move the binaries for the specific platform into bin/
204214
mkdir bin
205215
mv haskell-language-server-${{ matrix.os }}-*/* bin
@@ -214,7 +224,9 @@ jobs:
214224
fi
215225
tar -czpf haskell-language-server.tar.gz *
216226
217-
- uses: actions/upload-release-asset@v1.0.2
227+
- name: Upload binaries tarball to the release
228+
if: ${{ !contains(github.ref_name, 'check') }}
229+
uses: actions/upload-release-asset@v1.0.2
218230
env:
219231
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
220232
with:
@@ -223,7 +235,8 @@ jobs:
223235
asset_name: haskell-language-server-${{ matrix.os }}-${{ github.event.release.tag_name }}.tar.gz
224236
asset_content_type: application/gzip
225237

226-
- uses: actions/upload-artifact@v2
238+
- name: Upload binaries tarball to workflow artifacts
239+
uses: actions/upload-artifact@v2
227240
with:
228241
name: haskell-language-server-${{ matrix.os }}-${{ github.event.release.tag_name }}.tar.gz
229242
path: bin/haskell-language-server.tar.gz
@@ -234,13 +247,15 @@ jobs:
234247
steps:
235248
- uses: actions/download-artifact@v2
236249

237-
- run: |
238-
# generate sha256 sums for all current artifacts
250+
- name: Generate sha256 sums for all workflow artifacts
251+
run: |
239252
sha256sum --tag haskell-language-server*/* >> SHA256SUMS
240253
# we clean up tags to match the release file names
241254
sed -i 's/\/.*)/)/g' SHA256SUMS
242255
243-
- uses: actions/upload-release-asset@v1.0.2
256+
- name: Upload sha256sums to the release
257+
if: ${{ !contains(github.ref_name, 'check') }}
258+
uses: actions/upload-release-asset@v1.0.2
244259
env:
245260
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
246261
with:
@@ -249,7 +264,8 @@ jobs:
249264
asset_name: SHA256SUMS
250265
asset_content_type: plain/text
251266

252-
- uses: actions/upload-artifact@v2
267+
- name: Upload sha256sums to workflow artifacts
268+
uses: actions/upload-artifact@v2
253269
with:
254270
name: SHA256SUMS
255271
path: SHA256SUMS

.github/workflows/hackage.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,18 @@ jobs:
133133
# For floskell and stylish-haskell
134134
echo " floskell:base, floskell:ghc-prim, stylish-haskell:Cabal,stylish-haskell:ghc-lib-parser," >> cabal.project
135135
136-
- name: "Build all package components in isolation"
136+
- name: "Build main package components in isolation"
137137
if: steps.get-hackage-version.outputs.exists != 'true'
138138
run: |
139139
cd $(ls -d ./incoming/${{ matrix.package }}-*)
140-
cabal build --enable-tests --enable-benchmarks
140+
cabal build
141+
142+
- name: "Build package tests and benchmarks in isolation"
143+
if: steps.get-hackage-version.outputs.exists != 'true'
144+
run: |
145+
cd $(ls -d ./incoming/${{ matrix.package }}-*)
146+
# cabal-3.4.0.0 run out of backjumps with tests and benchs enabled
147+
cabal build --enable-tests --enable-benchmarks --max-backjumps 8000
141148
142149
- name: "Generate haddock for hackage"
143150
if: steps.get-hackage-version.outputs.exists != 'true'

.github/workflows/nix.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- uses: actions/checkout@v2
4747
with:
4848
submodules: true
49-
- uses: cachix/install-nix-action@v15
49+
- uses: cachix/install-nix-action@v16
5050
with:
5151
install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install
5252
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
@@ -81,7 +81,7 @@ jobs:
8181
- uses: actions/checkout@v2
8282
with:
8383
submodules: true
84-
- uses: cachix/install-nix-action@v15
84+
- uses: cachix/install-nix-action@v16
8585
with:
8686
install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install
8787
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'

0 commit comments

Comments
 (0)