34
34
os : [ubuntu-latest]
35
35
cabal : ['3.6']
36
36
37
+ # This code is fitted to the strategy: assumes Linux is used ... etc,
38
+ # change of the strategy may require changing the bootstrapping/run code
39
+
37
40
steps :
38
41
- uses : actions/checkout@v2
39
42
@@ -45,39 +48,11 @@ jobs:
45
48
cabal-version : ${{ matrix.cabal }}
46
49
enable-stack : false
47
50
48
- - if : runner.os == 'Windows'
49
- name : (Windows) Platform config
50
- run : |
51
- echo "CABAL_STORE_DIR=$SYSTEMDRIVE\\SR" >> $GITHUB_ENV
52
- echo "CABAL_PKGS_DIR=~\\AppData\\cabal\\packages" >> $GITHUB_ENV
53
- - if : ( runner.os == 'Linux' ) || ( runner.os == 'macOS' )
54
- name : (Linux,macOS) Platform config
51
+ - name : Platform config
55
52
run : |
56
53
echo "CABAL_STORE_DIR=~/.cabal/store" >> $GITHUB_ENV
57
54
echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV
58
55
59
- # Needs to be before Cache Cabal so the cache can detect changes to the modified cabal.project file
60
- - if : matrix.ghc == '9.0.1'
61
- name : (GHC 9.0.1) Use modified `cabal.project`
62
- run : |
63
- cp cabal-ghc901.project cabal.project
64
- - if : runner.os == 'Windows' && matrix.ghc == '8.8.4'
65
- name : (Windows,GHC 8.8) Modify `cabal.project` to workaround segfaults
66
- run : |
67
- echo "package floskell" >> cabal.project
68
- echo " ghc-options: -O0" >> cabal.project
69
-
70
- # Shorten binary names as a workaround for filepath length limits in Windows,
71
- # but since tests are hardcoded on this workaround -
72
- # all platforms (in 2021-12-07) need it.
73
- - name : Workaround shorten binary names
74
- run : |
75
- sed -i.bak -e 's/haskell-language-server/hls/g' \
76
- -e 's/haskell_language_server/hls/g' \
77
- haskell-language-server.cabal cabal.project
78
- sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \
79
- src/**/*.hs exe/*.hs
80
-
81
56
- name : Cache Cabal
82
57
uses : actions/cache@v2
83
58
with :
0 commit comments