Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate .gz tars of all the binaries for macOS and Linux in GitHub Actions #454

Merged
merged 3 commits into from
Oct 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: true
- uses: bubba/setup-haskell@7235984
- uses: actions/setup-haskell@v1.1.3
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: '3.2'
Expand Down Expand Up @@ -135,3 +135,30 @@ jobs:
name: haskell-language-server-wrapper-${{ runner.OS }}${{env.EXE_EXT}}.${{ steps.compress_wrapper_binary.outputs.extension }}
path: ${{ steps.compress_wrapper_binary.outputs.path }}

# this generates .gz tarfiles containing all the GHC versions for
# macOS and Linux, used by ghcup
tar:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2

- run: |
for OS in Linux macOS
do
tar -czf haskell-language-server-$OS-${{ github.event.release.tag_name }}.gz haskell-language-server-$OS-*.gz
done

- uses: actions/[email protected]
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: haskell-language-server-macOS-${{ github.event.release.tag_name }}.gz
asset_name: haskell-language-server-macOS-${{ github.event.release.tag_name }}.gz
asset_content_type: application/gzip

- uses: actions/[email protected]
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: haskell-language-server-Linux-${{ github.event.release.tag_name }}.gz
asset_name: haskell-language-server-Linux-${{ github.event.release.tag_name }}.gz
asset_content_type: application/gzip
12 changes: 12 additions & 0 deletions docs/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,15 @@ One caveat is that we need to rename the binaries from
haskell-language-server/haskell-language-server-wrapper to hls/hls-wrapper due to
path length limitations on windows. But whenever we upload them to the release,
we make sure to upload them as their full name variant.

### ghcup
Ghcup can install hls binaries, provided that there is a tarfile
called `haskell-language-server-{macOS,Linux}-$HLS_VERSION.gz`
included in the GitHub release. The `tar` job in the workflow file automates the creation of this.

### Windows
Currently building HLS with GHC 8.8.x on Windows is very flakey and so
is not included by default in the GitHub Actions build matrix. Instead
they need to be built and uploaded manually. See [this
PR](https://github.com/haskell/haskell-language-server/issues/276) for
more details