File tree Expand file tree Collapse file tree 4 files changed +17
-23
lines changed Expand file tree Collapse file tree 4 files changed +17
-23
lines changed Original file line number Diff line number Diff line change 85
85
INDEX_STATE1=$(echo "$INDEX_STATE_ENTRY" | cut -d' ' -f2 | tr ':' '-')
86
86
echo "INDEX_STATE=$INDEX_STATE1" >> $GITHUB_ENV
87
87
88
+ # To ensure we get the lastest hackage index and not relying on haskell action logic
89
+ - run : cabal update
90
+
88
91
- name : Form the package list ('cabal.project.freeze')
89
92
id : compute-cache-key
90
93
run : |
96
99
echo '' || \
97
100
echo 'WARNING: Could not produce the `freeze`.'
98
101
echo ::set-output name=value::${{ hashFiles('cabal.project.freeze') }}
99
- # Removing freeze file as it can break builds using allow-newer
100
- rm -f cabal.project.freeze
101
102
102
103
- name : Hackage sources cache
103
104
uses : actions/cache@v2
@@ -120,9 +121,6 @@ jobs:
120
121
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-
121
122
${{ env.cache-name }}-${{ runner.os }}-
122
123
123
- # To ensure we get the lastest hackage index and not relying on haskell action logic
124
- - run : cabal update
125
-
126
124
# max-backjumps is increased as a temporary solution
127
125
# for dependency resolution failure
128
126
- run : cabal configure --enable-benchmarks --max-backjumps 12000
Original file line number Diff line number Diff line change @@ -149,6 +149,9 @@ jobs:
149
149
INDEX_STATE1=$(echo "$INDEX_STATE_ENTRY" | cut -d' ' -f2 | tr ':' '-')
150
150
echo "INDEX_STATE=$INDEX_STATE1" >> $GITHUB_ENV
151
151
152
+ # To ensure we get the lastest hackage index and not relying on haskell action logic
153
+ - run : cabal update
154
+
152
155
- name : Form the package list ('cabal.project.freeze')
153
156
id : compute-cache-key
154
157
run : |
@@ -160,8 +163,6 @@ jobs:
160
163
echo '' || \
161
164
echo 'WARNING: Could not produce the `freeze`.'
162
165
echo ::set-output name=value::${{ hashFiles('cabal.project.freeze') }}
163
- # Removing freeze file as it can break builds using allow-newer
164
- rm -f cabal.project.freeze
165
166
166
167
# 2021-12-02: NOTE: Cabal Hackage source tree storage does not depend on OS or GHC really,
167
168
# but can depend on `base`.
@@ -190,10 +191,6 @@ jobs:
190
191
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-
191
192
${{ env.cache-name }}-${{ runner.os }}-
192
193
193
- # To ensure we get the lastest hackage index and not relying on haskell action logic
194
- - if : steps.compiled-deps.outputs.cache-hit != 'true'
195
- run : cabal update
196
-
197
194
- if : steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '8.10.7'
198
195
name : Download sources for bench
199
196
# Downloaded separately, to match the tested work/PR workflow guarantees
Original file line number Diff line number Diff line change 85
85
INDEX_STATE1=$(echo "$INDEX_STATE_ENTRY" | cut -d' ' -f2 | tr ':' '-')
86
86
echo "INDEX_STATE=$INDEX_STATE1" >> $GITHUB_ENV
87
87
88
+ # To ensure we get the lastest hackage index and not relying on haskell action logic
89
+ - run : cabal update
90
+
88
91
- name : Form the package list ('cabal.project.freeze')
89
- continue-on-error : true
92
+ id : compute-cache-key
90
93
run : |
91
94
cabal v2-freeze && \
92
95
echo "" && \
95
98
cat 'cabal.project.freeze' && \
96
99
echo "" || \
97
100
echo 'WARNING: Could not produce the `freeze`.'
101
+ echo ::set-output name=value::${{ hashFiles('cabal.project.freeze') }}
102
+ # Removing freeze file as it breaks builds with alternative flags
103
+ rm -rf cabal.project.freeze
98
104
99
105
- name : Hackage sources cache
100
106
uses : actions/cache@v2
@@ -112,16 +118,12 @@ jobs:
112
118
cache-name : compiled-deps
113
119
with :
114
120
path : ${{ steps.HaskEnvSetup.outputs.cabal-store }}
115
- key : ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project.freeze') }}
121
+ key : ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ steps.compute-cache-key.outputs.value }}
116
122
restore-keys : |
117
123
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-
118
124
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-
119
125
${{ env.cache-name }}-${{ runner.os }}-
120
126
121
- # To ensure we get the lastest hackage index and not relying on haskell action logic
122
- - if : steps.compiled-deps.outputs.cache-hit != 'true'
123
- run : cabal update
124
-
125
127
- name : Build `hls-graph` with flags
126
128
run : cabal v2-build hls-graph --flags="pedantic embed-files stm-stats"
127
129
Original file line number Diff line number Diff line change @@ -154,6 +154,9 @@ jobs:
154
154
INDEX_STATE1=$(echo "$INDEX_STATE_ENTRY" | cut -d' ' -f2 | tr ':' '-')
155
155
echo "INDEX_STATE=$INDEX_STATE1" >> $GITHUB_ENV
156
156
157
+ # To ensure we get the lastest hackage index and not relying on haskell action logic
158
+ - run : cabal update
159
+
157
160
- name : Compute the cache key
158
161
id : compute-cache-key
159
162
run : |
@@ -165,8 +168,6 @@ jobs:
165
168
echo '' || \
166
169
echo 'WARNING: Could not produce the `freeze`.'
167
170
echo ::set-output name=value::${{ hashFiles('cabal.project.freeze') }}
168
- # Removing freeze file as it can break builds using allow-newer
169
- rm -rf cabal.project.freeze
170
171
171
172
- name : Hackage sources cache
172
173
uses : actions/cache@v2
@@ -189,10 +190,6 @@ jobs:
189
190
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-
190
191
${{ env.cache-name }}-${{ runner.os }}-
191
192
192
- # To ensure we get the lastest hackage index and not relying on haskell action logic
193
- - if : steps.compiled-deps.outputs.cache-hit != 'true'
194
- run : cabal update
195
-
196
193
# repeating builds to workaround segfaults in windows and ghc-8.8.4
197
194
- name : Build
198
195
run : cabal build || cabal build || cabal build
You can’t perform that action at this time.
0 commit comments