@@ -146,24 +146,27 @@ jobs:
146
146
INDEX_STATE1=$(echo "$INDEX_STATE_ENTRY" | cut -d' ' -f2 | tr ':' '-')
147
147
echo "INDEX_STATE=$INDEX_STATE1" >> $GITHUB_ENV
148
148
149
- - name : Form the package list ('cabal.project.freeze')
150
- continue-on-error : true
149
+ - name : Compute the cache key
150
+ id : compute-cache-key
151
151
run : |
152
152
cabal v2-freeze && \
153
153
echo '' && \
154
154
echo 'Output:' && \
155
155
echo '' && \
156
156
cat 'cabal.project.freeze' && \
157
157
echo '' || \
158
- echo 'WARNING: Could not produce the `freeze`.
158
+ echo 'WARNING: Could not produce the `freeze`.'
159
+ echo ::set-output name=value::${{ hashFiles('cabal.project.freeze') }}
160
+ # Removing freeze file as it can break builds using allow-newer
161
+ rm -rf cabal.project.freeze
159
162
160
163
- name : Hackage sources cache
161
164
uses : actions/cache@v2
162
165
env :
163
166
cache-name : hackage-sources
164
167
with :
165
- path : ${{ env.CABAL_PKGS_DIR }}
166
- key : ${{ env.cache-name }}-${{ env.INDEX_STATE }}
168
+ path : ${{ env.CABAL_PKGS_DIR }}
169
+ key : ${{ env.cache-name }}-${{ env.INDEX_STATE }}
167
170
restore-keys : ${{ env.cache-name }}-
168
171
169
172
- name : Compiled deps cache
@@ -173,7 +176,7 @@ jobs:
173
176
cache-name : compiled-deps
174
177
with :
175
178
path : ${{ steps.HaskEnvSetup.outputs.cabal-store }}
176
- key : ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project.freeze') }}
179
+ key : ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ steps.compute-cache-key.outputs.value }}
177
180
restore-keys : |
178
181
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-
179
182
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-
@@ -229,6 +232,10 @@ jobs:
229
232
name : Test hls-brittany-plugin
230
233
run : cabal test hls-brittany-plugin --test-options="$TEST_OPTS" || cabal test hls-brittany-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-brittany-plugin --test-options="$TEST_OPTS"
231
234
235
+ - if : matrix.test
236
+ name : Test hls-floskell-plugin
237
+ run : cabal test hls-floskell-plugin --test-options="$TEST_OPTS" || cabal test hls-floskell-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-floskell-plugin --test-options="$TEST_OPTS"
238
+
232
239
- if : matrix.test
233
240
name : Test hls-class-plugin
234
241
run : cabal test hls-class-plugin --test-options="$TEST_OPTS" || cabal test hls-class-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-class-plugin --test-options="$TEST_OPTS"
0 commit comments