36
36
37
37
steps :
38
38
- uses : actions/checkout@v2
39
+ with :
40
+ submodules : true
39
41
40
42
- run : git fetch origin master # check the master branch for benchmarking
41
43
45
47
cabal-version : ${{ matrix.cabal }}
46
48
enable-stack : false
47
49
50
+ - if : runner.os == 'Windows'
51
+ name : (Windows) Platform config
52
+ run : |
53
+ echo "CABAL_STORE_DIR=$SYSTEMDRIVE\\SR" >> $GITHUB_ENV
54
+ echo "CABAL_PKGS_DIR=~\\AppData\\cabal\\packages" >> $GITHUB_ENV
55
+ - if : ( runner.os == 'Linux' ) || ( runner.os == 'macOS' )
56
+ name : (Linux,macOS) Platform config
57
+ run : |
58
+ echo "CABAL_STORE_DIR=~/.cabal/store" >> $GITHUB_ENV
59
+ echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV
60
+
61
+ # Needs to be before Cache Cabal so the cache can detect changes to the modified cabal.project file
62
+ - if : matrix.ghc == '9.0.1'
63
+ name : (GHC 9.0.1) Use modified `cabal.project`
64
+ run : |
65
+ cp cabal-ghc901.project cabal.project
66
+ - if : runner.os == 'Windows' && matrix.ghc == '8.8.4'
67
+ name : (Windows,GHC 8.8) Modify `cabal.project` to workaround segfaults
68
+ run : |
69
+ echo "package floskell" >> cabal.project
70
+ echo " ghc-options: -O0" >> cabal.project
71
+
72
+ # Shorten binary names as a workaround for filepath length limits in Windows,
73
+ # but since tests are hardcoded on this workaround -
74
+ # all platforms (in 2021-12-07) need it.
75
+ - name : Workaround shorten binary names
76
+ run : |
77
+ sed -i.bak -e 's/haskell-language-server/hls/g' \
78
+ -e 's/haskell_language_server/hls/g' \
79
+ haskell-language-server.cabal cabal.project
80
+ sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \
81
+ src/**/*.hs exe/*.hs
82
+
48
83
- name : Cache Cabal
49
84
uses : actions/cache@v2
50
85
with :
@@ -105,6 +140,7 @@ jobs:
105
140
matrix :
106
141
ghc : ['8.10.7']
107
142
os : [ubuntu-latest]
143
+ cabal : ['3.6']
108
144
example : ['cabal', 'lsp-types']
109
145
110
146
steps :
@@ -114,6 +150,39 @@ jobs:
114
150
cabal-version : ${{ matrix.cabal }}
115
151
enable-stack : false
116
152
153
+ - if : runner.os == 'Windows'
154
+ name : (Windows) Platform config
155
+ run : |
156
+ echo "CABAL_STORE_DIR=$SYSTEMDRIVE\\SR" >> $GITHUB_ENV
157
+ echo "CABAL_PKGS_DIR=~\\AppData\\cabal\\packages" >> $GITHUB_ENV
158
+ - if : ( runner.os == 'Linux' ) || ( runner.os == 'macOS' )
159
+ name : (Linux,macOS) Platform config
160
+ run : |
161
+ echo "CABAL_STORE_DIR=~/.cabal/store" >> $GITHUB_ENV
162
+ echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV
163
+
164
+ # Needs to be before Cache Cabal so the cache can detect changes to the modified cabal.project file
165
+ - if : matrix.ghc == '9.0.1'
166
+ name : (GHC 9.0.1) Use modified `cabal.project`
167
+ run : |
168
+ cp cabal-ghc901.project cabal.project
169
+ - if : runner.os == 'Windows' && matrix.ghc == '8.8.4'
170
+ name : (Windows,GHC 8.8) Modify `cabal.project` to workaround segfaults
171
+ run : |
172
+ echo "package floskell" >> cabal.project
173
+ echo " ghc-options: -O0" >> cabal.project
174
+
175
+ # Shorten binary names as a workaround for filepath length limits in Windows,
176
+ # but since tests are hardcoded on this workaround -
177
+ # all platforms (in 2021-12-07) need it.
178
+ - name : Workaround shorten binary names
179
+ run : |
180
+ sed -i.bak -e 's/haskell-language-server/hls/g' \
181
+ -e 's/haskell_language_server/hls/g' \
182
+ haskell-language-server.cabal cabal.project
183
+ sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \
184
+ src/**/*.hs exe/*.hs
185
+
117
186
- name : Download cabal home
118
187
uses : actions/download-artifact@v2
119
188
with :
0 commit comments