Skip to content

Commit

Permalink
Disable alpine build by default (#2638)
Browse files Browse the repository at this point in the history
* Disable alpine by default

* guard hlint plugin

* Rename hls in actual cabal project file
  • Loading branch information
jneira committed Jan 25, 2022
1 parent 310e6a4 commit 65dff92
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Expand Up @@ -2,6 +2,11 @@ name: Builds

on:
workflow_dispatch:
inputs:
alpine:
description: 'Use alpine to build a fully static executable for linux'
required: false
default: 'false'
release:
types: [created]
push:
Expand All @@ -11,7 +16,7 @@ on:
jobs:
build:
runs-on: ${{ matrix.os }}
container: ${{ (startsWith(matrix.os,'ubuntu') && 'alpine:3.12') || '' }}
container: ${{ (github.event.inputs.alpine == 'true' && startsWith(matrix.os,'ubuntu') && 'alpine:3.12') || '' }}
defaults:
run:
shell: ${{ (startsWith(matrix.os,'windows') && 'bash') || 'sh' }}
Expand All @@ -35,7 +40,7 @@ jobs:

steps:
- name: Install system dependencies
if: runner.os == 'Linux'
if: github.event.inputs.alpine == 'true' && runner.os == 'Linux'
run: |
apk add --no-cache curl gcc g++ gmp-dev ncurses-dev libffi-dev make xz gzip tar perl git bash sudo binutils-gold
apk add --no-cache zlib zlib-dev zlib-static gmp gmp-dev ncurses-static
Expand Down
3 changes: 1 addition & 2 deletions .gitlab/ci.sh
Expand Up @@ -53,7 +53,7 @@ fi
# Shorten binary names
sed -i.bak -e 's/haskell-language-server/hls/g' \
-e 's/haskell_language_server/hls/g' \
haskell-language-server.cabal cabal.project
haskell-language-server.cabal $CABAL_PROJECT
sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \
src/**/*.hs exe/*.hs

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

cd "$CI_PROJECT_DIR/out/"

2 changes: 1 addition & 1 deletion haskell-language-server.cabal
Expand Up @@ -259,7 +259,7 @@ common tactic
cpp-options: -Dtactic

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

Expand Down

0 comments on commit 65dff92

Please sign in to comment.