1
1
name : Builds
2
2
3
- defaults :
4
- run :
5
- shell : bash
6
-
7
3
on :
8
4
release :
9
5
types : [created]
14
10
jobs :
15
11
build :
16
12
runs-on : ${{ matrix.os }}
17
-
13
+ container : ${{ (matrix.os == 'ubuntu-18.04' && 'alpine:3.12') || '' }}
14
+ defaults :
15
+ run :
16
+ shell : ${{ (matrix.os == 'windows-latest' && 'bash') || 'sh' }}
18
17
strategy :
19
18
fail-fast : false
20
19
matrix :
@@ -23,13 +22,26 @@ jobs:
23
22
cabal : ['3.6']
24
23
25
24
steps :
25
+ - name : Install system dependencies
26
+ if : matrix.os == 'ubuntu-18.04'
27
+ run : |
28
+ apk add --no-cache curl gcc g++ gmp-dev ncurses-dev libffi-dev make xz gzip tar perl git bash sudo binutils-gold
29
+ apk add --no-cache zlib zlib-dev zlib-static gmp gmp-dev ncurses-static
26
30
- uses : actions/checkout@v2
27
31
28
32
- uses : haskell/actions/setup@v1
29
33
with :
30
34
ghc-version : ${{ matrix.ghc }}
31
35
cabal-version : ${{ matrix.cabal }}
32
36
37
+ # some alpines come with integer-simple instead of integer-gmp
38
+ - name : Force integer-simple
39
+ if : matrix.os == 'ubuntu-18.04'
40
+ run : |
41
+ if ghc --info | grep -q integer-simple ; then
42
+ echo -e 'package blaze-textual\n flags: +integer-simple' >> cabal.project.local
43
+ fi
44
+
33
45
- name : Use modified cabal.project for ghc9
34
46
if : ${{ matrix.ghc == '9.0.1' }}
35
47
run : cp cabal-ghc901.project cabal.project
74
86
- name : Build server
75
87
# Try building it twice in case of flakey builds on Windows
76
88
run : |
77
- cabal build exe:hls -O2 $LINUX_CABAL_ARGS || \
78
- cabal build exe:hls -O2 $LINUX_CABAL_ARGS -j1
89
+ cabal build --disable-tests exe:hls -O2 $LINUX_CABAL_ARGS || \
90
+ cabal build --disable-tests exe:hls -O2 $LINUX_CABAL_ARGS -j1
79
91
80
92
- name : Compress server binary
81
93
id : compress_server_binary
@@ -114,7 +126,7 @@ jobs:
114
126
115
127
- name : Build wrapper
116
128
if : matrix.ghc == '8.10.7'
117
- run : cabal build exe:hls-wrapper -O2 $LINUX_CABAL_ARGS
129
+ run : cabal build --disable-tests exe:hls-wrapper -O2 $LINUX_CABAL_ARGS
118
130
119
131
- name : Compress wrapper binary
120
132
if : matrix.ghc == '8.10.7'
0 commit comments