1
1
name : Testing
2
2
3
+ defaults :
4
+ run :
5
+ shell : bash
6
+
3
7
on : [pull_request]
4
8
jobs :
5
9
test :
6
10
runs-on : ${{ matrix.os }}
7
11
strategy :
8
12
fail-fast : true
9
13
matrix :
10
- ghc : ['8.10.3', "8.10.2", "8.10.1", "8.8.4", "8.8.3", "8.8.2", "8.6.5", "8.6.4"]
11
- os : [ubuntu-latest, windows-latest]
12
- exclude :
13
- - os : windows-latest
14
- ghc : " 8.10.2" # broken due to https://gitlab.haskell.org/ghc/ghc/-/issues/18550
14
+ ghc : ["8.10.3", "8.10.2", "8.10.1", "8.8.4", "8.8.3", "8.8.2", "8.6.5", "8.6.4"]
15
+ os : [ubuntu-latest, macOS-latest]
16
+ include :
17
+ # one ghc-lib build
18
+ # should be renabled: #784
19
+ # - os: ubuntu-latest
20
+ # ghc: '8.10.1'
21
+ # ghc-lib: true
22
+ # only test supported ghc major versions
23
+ - os : ubuntu-latest
24
+ ghc : ' 8.10.3'
25
+ test : true
15
26
- os : windows-latest
16
- ghc : " 8.8.4" # also fails due to segfault :(
27
+ ghc : ' 8.10.3'
28
+ test : true
29
+ - os : ubuntu-latest
30
+ ghc : ' 8.8.4'
31
+ test : true
32
+ - os : ubuntu-latest
33
+ ghc : ' 8.6.5'
34
+ test : true
17
35
- os : windows-latest
18
- ghc : " 8.8.3" # fails due to segfault
36
+ ghc : ' 8.6.5'
37
+ test : true
38
+ # only build rest of supported ghc versions for windows
19
39
- os : windows-latest
20
- ghc : " 8.8.2 " # fails due to error with Cabal
40
+ ghc : ' 8.10.2.2 '
21
41
- os : windows-latest
22
- ghc : " 8.6.4" # times out after 300m
23
- include :
42
+ ghc : ' 8.10.1'
24
43
- os : windows-latest
25
- ghc : " 8.10.2.2 " # only available for windows and choco
44
+ ghc : ' 8.6.4 '
26
45
27
46
steps :
28
47
# Cancel queued workflows from earlier commits in this branch
@@ -39,14 +58,26 @@ jobs:
39
58
- run : ./fmt.sh
40
59
name : " HLint via ./fmt.sh"
41
60
61
+ - name : Set some window specific things
62
+ if : matrix.os == 'windows-latest'
63
+ run : |
64
+ echo "CABAL_STORE_DIR=$SYSTEMDRIVE\\SR" >> $GITHUB_ENV
65
+ echo "CABAL_PKGS_DIR=~\\AppData\\cabal\\packages" >> $GITHUB_ENV
66
+
67
+ - name : Set some linux/macOS specific things
68
+ if : matrix.os != 'windows-latest'
69
+ run : |
70
+ echo "CABAL_STORE_DIR=~/.cabal/store" >> $GITHUB_ENV
71
+ echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV
72
+
42
73
- name : Cache Cabal
43
74
uses : actions/cache@v2
44
75
env :
45
76
cache-name : cache-cabal
46
77
with :
47
78
path : |
48
- ~/.cabal/packages
49
- ~/.cabal/store
79
+ ${{ env.CABAL_PKGS_DIR }}
80
+ ${{ env.CABAL_STORE_DIR }}
50
81
key : ${{ runner.os }}-${{ matrix.ghc }}-build-${{ hashFiles('cabal.project') }}
51
82
restore-keys : |
52
83
${{ runner.os }}-${{ matrix.ghc }}-bench-${{ hashFiles('cabal.project') }}
57
88
58
89
# Need this to work around filepath length limits in Windows
59
90
- name : Shorten binary names
60
- shell : bash
61
91
run : |
62
92
sed -i.bak -e 's/haskell-language-server/hls/g' \
63
93
-e 's/haskell_language_server/hls/g' \
@@ -66,27 +96,26 @@ jobs:
66
96
src/**/*.hs exe/*.hs
67
97
68
98
- name : Build
69
- shell : bash
70
99
# Retry it three times to workaround compiler segfaults in windows
71
100
run : cabal build || cabal build || cabal build
72
101
73
102
- name : Test ghcide
74
- shell : bash
103
+ if : ${{ matrix.test }}
75
104
# run the tests without parallelism to avoid running out of memory
76
105
run : cabal test ghcide --test-options="-j1 --rerun-update" || cabal test ghcide --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test ghcide --test-options="-j1 --rerun"
77
106
78
107
- name : Test func-test suite
79
- shell : bash
108
+ if : ${{ matrix.test }}
80
109
env :
81
110
HLS_TEST_EXE : hls
82
111
HLS_WRAPPER_TEST_EXE : hls-wrapper
83
112
# run the tests without parallelism, otherwise tasty will attempt to run
84
113
# all functional test cases simultaneously which causes way too many hls
85
114
# instances to be spun up for the poor github actions runner to handle
86
- run : cabal test func-test --test-options="-j1 --rerun-update" || cabal test func-test --test-options="-j1 --rerun --rerun-update" || cabal test func-test --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test func-test --test-options="-j1 --rerun"
115
+ run : cabal test func-test --test-options="-j1 --rerun --rerun-update" || cabal test func-test --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test func-test --test-options="-j1 --rerun"
87
116
88
117
- name : Test wrapper-test suite
89
- shell : bash
118
+ if : ${{ matrix.test }}
90
119
env :
91
120
HLS_TEST_EXE : hls
92
121
HLS_WRAPPER_TEST_EXE : hls-wrapper
0 commit comments