File tree 4 files changed +17
-23
lines changed
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
@@ -121,9 +122,6 @@ jobs:
121
122
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-
122
123
${{ env.cache-name }}-${{ runner.os }}-
123
124
124
- # To ensure we get the lastest hackage index and not relying on haskell action logic
125
- - run : cabal update
126
-
127
125
# max-backjumps is increased as a temporary solution
128
126
# for dependency resolution failure
129
127
- run : cabal configure --enable-benchmarks --max-backjumps 12000
Original file line number Diff line number Diff line change @@ -142,6 +142,9 @@ jobs:
142
142
INDEX_STATE1=$(echo "$INDEX_STATE_ENTRY" | cut -d' ' -f2 | tr ':' '-')
143
143
echo "INDEX_STATE=$INDEX_STATE1" >> $GITHUB_ENV
144
144
145
+ # To ensure we get the lastest hackage index and not relying on haskell action logic
146
+ - run : cabal update
147
+
145
148
- name : Form the package list ('cabal.project.freeze')
146
149
id : compute-cache-key
147
150
run : |
@@ -153,8 +156,6 @@ jobs:
153
156
echo '' || \
154
157
echo 'WARNING: Could not produce the `freeze`.'
155
158
echo ::set-output name=value::${{ hashFiles('cabal.project.freeze') }}
156
- # Removing freeze file as it can break builds using allow-newer
157
- rm -f cabal.project.freeze
158
159
159
160
# 2021-12-02: NOTE: Cabal Hackage source tree storage does not depend on OS or GHC really,
160
161
# but can depend on `base`.
@@ -183,10 +184,6 @@ jobs:
183
184
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-
184
185
${{ env.cache-name }}-${{ runner.os }}-
185
186
186
- # To ensure we get the lastest hackage index and not relying on haskell action logic
187
- - if : steps.compiled-deps.outputs.cache-hit != 'true'
188
- run : cabal update
189
-
190
187
- if : steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '8.10.7'
191
188
name : Download sources for bench
192
189
# 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 @@ -146,6 +146,9 @@ 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
+ # To ensure we get the lastest hackage index and not relying on haskell action logic
150
+ - run : cabal update
151
+
149
152
- name : Compute the cache key
150
153
id : compute-cache-key
151
154
run : |
@@ -157,8 +160,6 @@ jobs:
157
160
echo '' || \
158
161
echo 'WARNING: Could not produce the `freeze`.'
159
162
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
162
163
163
164
- name : Hackage sources cache
164
165
uses : actions/cache@v2
@@ -182,10 +183,6 @@ jobs:
182
183
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-
183
184
${{ env.cache-name }}-${{ runner.os }}-
184
185
185
- # To ensure we get the lastest hackage index and not relying on haskell action logic
186
- - if : steps.compiled-deps.outputs.cache-hit != 'true'
187
- run : cabal update
188
-
189
186
# repeating builds to workaround segfaults in windows and ghc-8.8.4
190
187
- name : Build
191
188
run : cabal build || cabal build || cabal build
You can’t perform that action at this time.
0 commit comments