Skip to content

Commit

Permalink
Fix how binaries are tarred together
Browse files Browse the repository at this point in the history
  • Loading branch information
lukel97 committed Oct 4, 2020
1 parent 3ca2a6c commit 33633df
Showing 1 changed file with 32 additions and 25 deletions.
57 changes: 32 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ['8.10.2', '8.10.1', '8.8.4', '8.8.3', '8.8.2', '8.6.5', '8.6.4']
os: [ubuntu-latest, macOS-latest, windows-latest]
exclude:
- os: windows-latest
ghc: '8.10.2' # broken due to https://gitlab.haskell.org/ghc/ghc/-/issues/18550
- os: windows-latest
ghc: '8.8.4' # also fails due to segfault :(
- os: windows-latest
ghc: '8.8.3' # fails due to segfault
- os: windows-latest
ghc: '8.8.2' # fails due to error with Cabal
# ghc: ['8.10.2', '8.10.1', '8.8.4', '8.8.3', '8.8.2', '8.6.5', '8.6.4']
# os: [ubuntu-latest, macOS-latest, windows-latest]
ghc: ['8.10.1']
os: [ubuntu-latest, macOS-latest]
# exclude:
# - os: windows-latest
# ghc: '8.10.2' # broken due to https://gitlab.haskell.org/ghc/ghc/-/issues/18550
# - os: windows-latest
# ghc: '8.8.4' # also fails due to segfault :(
# - os: windows-latest
# ghc: '8.8.3' # fails due to segfault
# - os: windows-latest
# ghc: '8.8.2' # fails due to error with Cabal

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -140,29 +142,34 @@ jobs:
tar:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
os: [Linux, macOS]
steps:
- uses: actions/download-artifact@v2

- run: ls -R

- run: |
for OS in Linux macOS
do
tar -czf haskell-language-server-$OS-${{ github.event.release.tag_name }}.tar.gz haskell-language-server-$OS-*.gz
done
# move the binaries for the specific platform into bin/
mkdir bin
mv haskell-language-server-${{ matrix.os }}-*.gz/haskell-language-server-*.gz bin
mv haskell-language-server-wrapper-${{ matrix.os }}.gz/haskell-language-server-wapper.gz bin
# decompress them
gzip -d bin/*.gz
# renames haskell-language-server-macOS-8.8.1 => haskell-language-server-8.8.1
# for f in bin/*
# do
# mv -- "$f" "$(echo "$f" | sed -e 's/haskell-language-server-.\+-/haskell-language-server-/' -)"
# done
tar -czf bin/haskell-language-server.tar.gz bin/*
- uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: haskell-language-server-macOS-${{ github.event.release.tag_name }}.tar.gz
asset_name: haskell-language-server-macOS-${{ github.event.release.tag_name }}.tar.gz
asset_path: bin/haskell-language-server.tar.gz
asset_name: haskell-language-server-${{ matrix.os }}-${{ github.event.release.tag_name }}.tar.gz
asset_content_type: application/gzip

- uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: haskell-language-server-Linux-${{ github.event.release.tag_name }}.tar.gz
asset_name: haskell-language-server-Linux-${{ github.event.release.tag_name }}.tar.gz
asset_content_type: application/gzip

0 comments on commit 33633df

Please sign in to comment.