@@ -131,6 +131,15 @@ jobs:
131
131
INDEX_STATE1=$(echo "$INDEX_STATE_ENTRY" | cut -d' ' -f2 | tr ':' '-')
132
132
echo "INDEX_STATE=$INDEX_STATE1" >> $GITHUB_ENV
133
133
134
+ - name : Form the package list ('cabal.project.freeze')
135
+ continue-on-error : true
136
+ run : |
137
+ cabal v2-freeze
138
+ echo ''
139
+ echo 'Output:'
140
+ echo ''
141
+ cat 'cabal.project.freeze'
142
+
134
143
# 2021-12-02: NOTE: Cabal Hackage source tree storage does not depend on OS or GHC really,
135
144
# but can depend on `base`.
136
145
# But this caching is happens only inside `master` for `master` purposes of compiling the deps
@@ -141,9 +150,11 @@ jobs:
141
150
env :
142
151
cache-name : hackage-sources
143
152
with :
144
- path : ${{ env.CABAL_PKGS_DIR }}
145
- key : ${{ env.cache-name }}-${{ env.INDEX_STATE }}
146
- restore-keys : ${{ env.cache-name }}-
153
+ path : ${{ env.CABAL_PKGS_DIR }}
154
+ key : ${{ env.cache-name }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project.freeze') }}
155
+ restore-keys : |
156
+ ${{ env.cache-name }}-${{ env.INDEX_STATE }}-
157
+ ${{ env.cache-name }}-
147
158
148
159
- name : Compiled deps cache
149
160
id : compiled-deps
@@ -152,7 +163,7 @@ jobs:
152
163
cache-name : compiled-deps
153
164
with :
154
165
path : ${{ steps.HaskEnvSetup.outputs.cabal-store }}
155
- key : ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }}
166
+ key : ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project.freeze ') }}
156
167
restore-keys : |
157
168
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-
158
169
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-
@@ -176,3 +187,8 @@ jobs:
176
187
name : Build all targets; try 3 times
177
188
run : |
178
189
cabal $cabalBuild || cabal $cabalBuild || cabal $cabalBuild
190
+
191
+ # Despite the `continue-on-error: true` directive - CI does not ignore the return code of the last step
192
+ - name : Workaround to CI platform
193
+ run : |
194
+ true
0 commit comments