Skip to content

Commit 0063ec7

Browse files
authored
Merge pull request #688 from jneira/fix-win-build
Fix ghc version for windows 8.10.2.2 in github build workflow
2 parents 4ea51f6 + 2876c3d commit 0063ec7

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

.github/workflows/build.yml

+13-7
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,20 @@ jobs:
5050
5151
- name: Set some window specific things
5252
if: matrix.os == 'windows-latest'
53-
run: echo "EXE_EXT=.exe" >> $GITHUB_ENV
53+
env:
54+
GHC_VER: ${{ matrix.ghc }}
55+
run: |
56+
echo "EXE_EXT=.exe" >> $GITHUB_ENV
57+
GHC_VER=$(echo $GHC_VER | sed 's/8.10.2.2/8.10.2/g')
58+
echo "GHC_VERSION=$GHC_VER" >> $GITHUB_ENV
5459
5560
- name: Set some linux specific things
5661
if: matrix.os == 'ubuntu-latest'
57-
run: echo "LINUX_CABAL_ARGS=--enable-executable-static --ghc-options=-split-sections" >> $GITHUB_ENV
62+
env:
63+
GHC_VER: ${{ matrix.ghc }}
64+
run: |
65+
echo "LINUX_CABAL_ARGS=--enable-executable-static --ghc-options=-split-sections" >> $GITHUB_ENV
66+
echo "GHC_VERSION=$GHC_VER" >> $GITHUB_ENV
5867
5968
- name: Build Server
6069
# Try building it twice in case of flakey builds on Windows
@@ -64,13 +73,10 @@ jobs:
6473
6574
- name: Compress Server Binary
6675
id: compress_server_binary
67-
env:
68-
GHC_VER: ${{ matrix.ghc }}
6976
run: |
7077
# We normalize windows+choco ghc version 8.10.2.2
71-
GHC_VERSION=$(echo $GHC_VERSION | sed 's/8.10.2.2/8.10.2/g')
7278
HLS_BUILD=$(find dist-newstyle \( -name 'hls' -o -name 'hls.exe' \) -type f)
73-
HLS=haskell-language-server-$GHC_VER
79+
HLS=haskell-language-server-${{env.GHC_VERSION}}
7480
mv $HLS_BUILD $HLS${{env.EXE_EXT}}
7581
if [[ "$OSTYPE" == "msys" ]]; then
7682
7z a $HLS.zip $HLS${{env.EXE_EXT}}
@@ -91,7 +97,7 @@ jobs:
9197
with:
9298
upload_url: ${{ github.event.release.upload_url }}
9399
asset_path: ${{ steps.compress_server_binary.outputs.path }}
94-
asset_name: haskell-language-server-${{ runner.OS }}-${{ matrix.ghc }}${{env.EXE_EXT}}.${{ steps.compress_server_binary.outputs.extension }}
100+
asset_name: haskell-language-server-${{ runner.OS }}-${{ env.GHC_VERSION }}${{env.EXE_EXT}}.${{ steps.compress_server_binary.outputs.extension }}
95101
asset_content_type: ${{ steps.compress_server_binary.outputs.content_type }}
96102

97103
- uses: actions/upload-artifact@v2

0 commit comments

Comments
 (0)