Skip to content

Commit 0818b87

Browse files
committed
Use setup-build action
1 parent cc862ff commit 0818b87

File tree

1 file changed

+4
-32
lines changed

1 file changed

+4
-32
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,10 @@ jobs:
4141
apk add --no-cache zlib zlib-dev zlib-static gmp gmp-dev ncurses-static
4242
- uses: actions/checkout@v2
4343

44-
- uses: haskell/actions/setup@v1
45-
with:
46-
ghc-version : ${{ matrix.ghc }}
47-
cabal-version: ${{ matrix.cabal }}
48-
enable-stack: false
44+
- uses: ./.github/actions/setup-build
45+
with:
46+
ghc: ${{ matrix.ghc }}
47+
os: ${{ runner.os }}
4948

5049
# some alpines come with integer-simple instead of integer-gmp
5150
- name: Force integer-simple
@@ -55,27 +54,6 @@ jobs:
5554
echo -e 'package blaze-textual\n flags: +integer-simple' >> cabal.project.local
5655
fi
5756
58-
- name: Use modified cabal.project
59-
env:
60-
GHCVER: ${{ matrix.ghc }}
61-
run: |
62-
GHCVER2=${GHCVER//./}
63-
ALT_PROJECT_FILE_MINOR=cabal-ghc${GHCVER2}.project
64-
ALT_PROJECT_FILE_MAJOR=cabal-ghc${GHCVER2:0:2}.project
65-
if [[ -f "$ALT_PROJECT_FILE_MINOR" ]]; then
66-
rm -f -v cabal.project && cp -v "$ALT_PROJECT_FILE_MINOR" cabal.project
67-
elif [[ -f "$ALT_PROJECT_FILE_MAJOR" ]]; then
68-
rm -f -v cabal.project && cp -v "$ALT_PROJECT_FILE_MAJOR" cabal.project
69-
fi
70-
71-
- name: Shorten binary names
72-
run: |
73-
sed -i.bak -e 's/haskell-language-server/hls/g' \
74-
-e 's/haskell_language_server/hls/g' \
75-
haskell-language-server.cabal cabal.project
76-
sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \
77-
src/**/*.hs exe/*.hs
78-
7957
- name: (Windows) Platform specifics
8058
if: matrix.os == 'windows-latest'
8159
env:
@@ -99,12 +77,6 @@ jobs:
9977
run: |
10078
echo "GHC_VERSION=$GHC_VER" >> $GITHUB_ENV
10179
102-
- name: (Windows, GHC 8.8.4) Workaround segfaults
103-
if: matrix.ghc == '8.8.4' && matrix.os == 'windows-latest'
104-
run: |
105-
echo "package floskell" >> cabal.project
106-
echo " ghc-options: -O0" >> cabal.project
107-
10880
- name: Build the server
10981
# Try building it twice in case of flakey builds on Windows
11082
run: |

0 commit comments

Comments
 (0)