Skip to content

Commit 9f13e8f

Browse files
authored
Merge pull request #454 from bubba/github-actions-tar-test
Generate .gz tars of all the binaries for macOS and Linux in GitHub Actions
2 parents 623da0a + 1e4bfc5 commit 9f13e8f

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

Diff for: .github/workflows/build.yml

+28-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- uses: actions/checkout@v2
3232
with:
3333
submodules: true
34-
- uses: bubba/setup-haskell@7235984
34+
- uses: actions/setup-haskell@v1.1.3
3535
with:
3636
ghc-version: ${{ matrix.ghc }}
3737
cabal-version: '3.2'
@@ -135,3 +135,30 @@ jobs:
135135
name: haskell-language-server-wrapper-${{ runner.OS }}${{env.EXE_EXT}}.${{ steps.compress_wrapper_binary.outputs.extension }}
136136
path: ${{ steps.compress_wrapper_binary.outputs.path }}
137137

138+
# this generates .gz tarfiles containing all the GHC versions for
139+
# macOS and Linux, used by ghcup
140+
tar:
141+
needs: build
142+
runs-on: ubuntu-latest
143+
steps:
144+
- uses: actions/download-artifact@v2
145+
146+
- run: |
147+
for OS in Linux macOS
148+
do
149+
tar -czf haskell-language-server-$OS-${{ github.event.release.tag_name }}.gz haskell-language-server-$OS-*.gz
150+
done
151+
152+
- uses: actions/[email protected]
153+
with:
154+
upload_url: ${{ github.event.release.upload_url }}
155+
asset_path: haskell-language-server-macOS-${{ github.event.release.tag_name }}.gz
156+
asset_name: haskell-language-server-macOS-${{ github.event.release.tag_name }}.gz
157+
asset_content_type: application/gzip
158+
159+
- uses: actions/[email protected]
160+
with:
161+
upload_url: ${{ github.event.release.upload_url }}
162+
asset_path: haskell-language-server-Linux-${{ github.event.release.tag_name }}.gz
163+
asset_name: haskell-language-server-Linux-${{ github.event.release.tag_name }}.gz
164+
asset_content_type: application/gzip

Diff for: docs/releases.md

+12
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,15 @@ One caveat is that we need to rename the binaries from
7070
haskell-language-server/haskell-language-server-wrapper to hls/hls-wrapper due to
7171
path length limitations on windows. But whenever we upload them to the release,
7272
we make sure to upload them as their full name variant.
73+
74+
### ghcup
75+
Ghcup can install hls binaries, provided that there is a tarfile
76+
called `haskell-language-server-{macOS,Linux}-$HLS_VERSION.gz`
77+
included in the GitHub release. The `tar` job in the workflow file automates the creation of this.
78+
79+
### Windows
80+
Currently building HLS with GHC 8.8.x on Windows is very flakey and so
81+
is not included by default in the GitHub Actions build matrix. Instead
82+
they need to be built and uploaded manually. See [this
83+
PR](https://github.com/haskell/haskell-language-server/issues/276) for
84+
more details

0 commit comments

Comments
 (0)