Skip to content

Commit 65dff92

Browse files
authored
Disable alpine build by default (#2638)
* Disable alpine by default * guard hlint plugin * Rename hls in actual cabal project file
1 parent 310e6a4 commit 65dff92

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

Diff for: .github/workflows/build.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: Builds
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
alpine:
7+
description: 'Use alpine to build a fully static executable for linux'
8+
required: false
9+
default: 'false'
510
release:
611
types: [created]
712
push:
@@ -11,7 +16,7 @@ on:
1116
jobs:
1217
build:
1318
runs-on: ${{ matrix.os }}
14-
container: ${{ (startsWith(matrix.os,'ubuntu') && 'alpine:3.12') || '' }}
19+
container: ${{ (github.event.inputs.alpine == 'true' && startsWith(matrix.os,'ubuntu') && 'alpine:3.12') || '' }}
1520
defaults:
1621
run:
1722
shell: ${{ (startsWith(matrix.os,'windows') && 'bash') || 'sh' }}
@@ -35,7 +40,7 @@ jobs:
3540

3641
steps:
3742
- name: Install system dependencies
38-
if: runner.os == 'Linux'
43+
if: github.event.inputs.alpine == 'true' && runner.os == 'Linux'
3944
run: |
4045
apk add --no-cache curl gcc g++ gmp-dev ncurses-dev libffi-dev make xz gzip tar perl git bash sudo binutils-gold
4146
apk add --no-cache zlib zlib-dev zlib-static gmp gmp-dev ncurses-static

Diff for: .gitlab/ci.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ fi
5353
# Shorten binary names
5454
sed -i.bak -e 's/haskell-language-server/hls/g' \
5555
-e 's/haskell_language_server/hls/g' \
56-
haskell-language-server.cabal cabal.project
56+
haskell-language-server.cabal $CABAL_PROJECT
5757
sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \
5858
src/**/*.hs exe/*.hs
5959

@@ -77,4 +77,3 @@ cp "$(cabal list-bin ${args[@]} exe:hls-wrapper)" "$CI_PROJECT_DIR/out/haskell-l
7777
cp dist-newstyle/cache/plan.json "$CI_PROJECT_DIR/out/plan.json"
7878

7979
cd "$CI_PROJECT_DIR/out/"
80-

Diff for: haskell-language-server.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ common tactic
259259
cpp-options: -Dtactic
260260

261261
common hlint
262-
if flag(hlint)
262+
if flag(hlint) && (impl(ghc < 9.2.1) || flag(ignore-plugins-ghc-bounds))
263263
build-depends: hls-hlint-plugin ^>=1.0.0.2
264264
cpp-options: -Dhlint
265265

0 commit comments

Comments
 (0)