@@ -16,15 +16,13 @@ jobs:
16
16
should_skip : ${{ steps.skip_check.outputs.should_skip }}
17
17
steps :
18
18
- id : skip_check
19
- uses : fkirc/skip-duplicate-actions@master
19
+ uses : fkirc/skip-duplicate-actions@v3.4.0
20
20
with :
21
21
cancel_others : true
22
22
paths_ignore : ' ["**/docs/**", "**.md", "**/LICENSE", ".circleci/**", "install/**", "nix/**"]'
23
23
24
-
25
24
test :
26
25
needs : pre_job
27
- if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
28
26
runs-on : ${{ matrix.os }}
29
27
strategy :
30
28
fail-fast : true
@@ -58,33 +56,34 @@ jobs:
58
56
# ghc: '8.6.4'
59
57
60
58
steps :
61
- # Cancel queued workflows from earlier commits in this branch
62
- - uses : fkirc/skip-duplicate-actions@master
63
-
64
- - uses : actions/checkout@v2
59
+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
60
+ uses : actions/checkout@v2
65
61
with :
66
62
submodules : true
67
- - uses : haskell/actions/setup@v1
63
+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
64
+ uses : haskell/actions/setup@v1
68
65
with :
69
66
ghc-version : ${{ matrix.ghc }}
70
67
cabal-version : " 3.2"
71
68
72
- - run : ./fmt.sh
69
+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
70
+ run : ./fmt.sh
73
71
name : " HLint via ./fmt.sh"
74
72
75
- - name : Set some window specific things
76
- if : matrix.os == 'windows-latest'
73
+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.os == 'windows-latest'}}
74
+ name : Set some window specific things
77
75
run : |
78
76
echo "CABAL_STORE_DIR=$SYSTEMDRIVE\\SR" >> $GITHUB_ENV
79
77
echo "CABAL_PKGS_DIR=~\\AppData\\cabal\\packages" >> $GITHUB_ENV
80
78
81
- - name : Set some linux/macOS specific things
82
- if : matrix.os != 'windows-latest'
79
+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.os != 'windows-latest'}}
80
+ name : Set some linux/macOS specific things
83
81
run : |
84
82
echo "CABAL_STORE_DIR=~/.cabal/store" >> $GITHUB_ENV
85
83
echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV
86
84
87
- - name : Cache Cabal
85
+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
86
+ name : Cache Cabal
88
87
uses : actions/cache@v2
89
88
env :
90
89
cache-name : cache-cabal
@@ -98,28 +97,31 @@ jobs:
98
97
v2-${{ runner.os }}-${{ matrix.ghc }}-build-
99
98
v2-${{ runner.os }}-${{ matrix.ghc }}
100
99
101
- - run : cabal update
100
+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
101
+ run : cabal update
102
102
103
103
# Need this to work around filepath length limits in Windows
104
- - name : Shorten binary names
104
+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
105
+ name : Shorten binary names
105
106
run : |
106
107
sed -i.bak -e 's/haskell-language-server/hls/g' \
107
108
-e 's/haskell_language_server/hls/g' \
108
109
haskell-language-server.cabal
109
110
sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \
110
111
src/**/*.hs exe/*.hs
111
112
112
- - name : Build
113
+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
114
+ name : Build
113
115
# Retry it three times to workaround compiler segfaults in windows
114
116
run : cabal build || cabal build || cabal build
115
117
116
- - name : Test ghcide
117
- if : ${{ matrix.test }}
118
+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
119
+ name : Test ghcide
118
120
# run the tests without parallelism to avoid running out of memory
119
121
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"
120
122
121
- - name : Test func- test suite
122
- if : ${{ matrix. test }}
123
+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' && matrix. test }}
124
+ name : Test func- test suite
123
125
env :
124
126
HLS_TEST_EXE : hls
125
127
HLS_WRAPPER_TEST_EXE : hls-wrapper
@@ -128,8 +130,8 @@ jobs:
128
130
# instances to be spun up for the poor github actions runner to handle
129
131
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"
130
132
131
- - name : Test wrapper- test suite
132
- if : ${{ matrix. test }}
133
+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' && matrix. test }}
134
+ name : Test wrapper- test suite
133
135
env :
134
136
HLS_TEST_EXE : hls
135
137
HLS_WRAPPER_TEST_EXE : hls-wrapper
@@ -138,30 +140,30 @@ jobs:
138
140
# instances to be spun up for the poor github actions runner to handle
139
141
run : cabal test wrapper-test --test-options="-j1" || cabal test wrapper-test --test-options="-j1" || cabal test wrapper-test --test-options="-j1"
140
142
141
- - name : Test hls-brittany-plugin
142
- if : ${{ matrix.test }}
143
+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
144
+ name : Test hls-brittany-plugin
143
145
run : cabal test hls-brittany-plugin || cabal test hls-brittany-plugin --test-options="-j1"
144
146
145
- - name : Test hls-class-plugin
146
- if : ${{ matrix.test }}
147
+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
148
+ name : Test hls-class-plugin
147
149
run : cabal test hls-class-plugin || cabal test hls-class-plugin --test-options="-j1"
148
150
149
- - name : Test hls-eval-plugin
150
- if : ${{ matrix.test }}
151
+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
152
+ name : Test hls-eval-plugin
151
153
run : cabal test hls-eval-plugin --test-options="-j1 --rerun" || cabal test hls-eval-plugin --test-options="-j1 --rerun"
152
154
153
- - name : Test hls-haddock-comments-plugin
154
- if : ${{ matrix.test }}
155
+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
156
+ name : Test hls-haddock-comments-plugin
155
157
run : cabal test hls-haddock-comments-plugin || cabal test hls-haddock-comments-plugin --test-options="-j1"
156
158
157
- - name : Test hls-splice-plugin
158
- if : ${{ matrix.test }}
159
+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
160
+ name : Test hls-splice-plugin
159
161
run : cabal test hls-splice-plugin || cabal test hls-splice-plugin --test-options="-j1"
160
162
161
- - name : Test hls-stylish-haskell-plugin
162
- if : ${{ matrix.test }}
163
+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
164
+ name : Test hls-stylish-haskell-plugin
163
165
run : cabal test hls-stylish-haskell-plugin || cabal test hls-stylish-haskell-plugin --test-options="-j1"
164
166
165
- - name : Test hls-tactics-plugin test suite
166
- if : ${{ matrix. test }}
167
+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' && matrix. test }}
168
+ name : Test hls-tactics-plugin test suite
167
169
run : LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-tactics-plugin --test-options="-j1"
0 commit comments