Skip to content

Commit 6691075

Browse files
committed
Merge remote-tracking branch 'upstream/master' into ghc-9.2
2 parents b095f8b + 1849a87 commit 6691075

File tree

4 files changed

+17
-23
lines changed

4 files changed

+17
-23
lines changed

.github/workflows/bench.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ jobs:
8585
INDEX_STATE1=$(echo "$INDEX_STATE_ENTRY" | cut -d' ' -f2 | tr ':' '-')
8686
echo "INDEX_STATE=$INDEX_STATE1" >> $GITHUB_ENV
8787
88+
# To ensure we get the lastest hackage index and not relying on haskell action logic
89+
- run: cabal update
90+
8891
- name: Form the package list ('cabal.project.freeze')
8992
id: compute-cache-key
9093
run: |
@@ -96,8 +99,6 @@ jobs:
9699
echo '' || \
97100
echo 'WARNING: Could not produce the `freeze`.'
98101
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
101102
102103
- name: Hackage sources cache
103104
uses: actions/cache@v2
@@ -120,9 +121,6 @@ jobs:
120121
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-
121122
${{ env.cache-name }}-${{ runner.os }}-
122123
123-
# To ensure we get the lastest hackage index and not relying on haskell action logic
124-
- run: cabal update
125-
126124
# max-backjumps is increased as a temporary solution
127125
# for dependency resolution failure
128126
- run: cabal configure --enable-benchmarks --max-backjumps 12000

.github/workflows/caching.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ jobs:
149149
INDEX_STATE1=$(echo "$INDEX_STATE_ENTRY" | cut -d' ' -f2 | tr ':' '-')
150150
echo "INDEX_STATE=$INDEX_STATE1" >> $GITHUB_ENV
151151
152+
# To ensure we get the lastest hackage index and not relying on haskell action logic
153+
- run: cabal update
154+
152155
- name: Form the package list ('cabal.project.freeze')
153156
id: compute-cache-key
154157
run: |
@@ -160,8 +163,6 @@ jobs:
160163
echo '' || \
161164
echo 'WARNING: Could not produce the `freeze`.'
162165
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
165166
166167
# 2021-12-02: NOTE: Cabal Hackage source tree storage does not depend on OS or GHC really,
167168
# but can depend on `base`.
@@ -190,10 +191,6 @@ jobs:
190191
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-
191192
${{ env.cache-name }}-${{ runner.os }}-
192193
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-
197194
- if: steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '8.10.7'
198195
name: Download sources for bench
199196
# Downloaded separately, to match the tested work/PR workflow guarantees

.github/workflows/flags.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,11 @@ jobs:
8585
INDEX_STATE1=$(echo "$INDEX_STATE_ENTRY" | cut -d' ' -f2 | tr ':' '-')
8686
echo "INDEX_STATE=$INDEX_STATE1" >> $GITHUB_ENV
8787
88+
# To ensure we get the lastest hackage index and not relying on haskell action logic
89+
- run: cabal update
90+
8891
- name: Form the package list ('cabal.project.freeze')
89-
continue-on-error: true
92+
id: compute-cache-key
9093
run: |
9194
cabal v2-freeze && \
9295
echo "" && \
@@ -95,6 +98,9 @@ jobs:
9598
cat 'cabal.project.freeze' && \
9699
echo "" || \
97100
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
98104
99105
- name: Hackage sources cache
100106
uses: actions/cache@v2
@@ -112,16 +118,12 @@ jobs:
112118
cache-name: compiled-deps
113119
with:
114120
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 }}
116122
restore-keys: |
117123
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-
118124
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-
119125
${{ env.cache-name }}-${{ runner.os }}-
120126
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-
125127
- name: Build `hls-graph` with flags
126128
run: cabal v2-build hls-graph --flags="pedantic embed-files stm-stats"
127129

.github/workflows/test.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ jobs:
154154
INDEX_STATE1=$(echo "$INDEX_STATE_ENTRY" | cut -d' ' -f2 | tr ':' '-')
155155
echo "INDEX_STATE=$INDEX_STATE1" >> $GITHUB_ENV
156156
157+
# To ensure we get the lastest hackage index and not relying on haskell action logic
158+
- run: cabal update
159+
157160
- name: Compute the cache key
158161
id: compute-cache-key
159162
run: |
@@ -165,8 +168,6 @@ jobs:
165168
echo '' || \
166169
echo 'WARNING: Could not produce the `freeze`.'
167170
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
170171
171172
- name: Hackage sources cache
172173
uses: actions/cache@v2
@@ -189,10 +190,6 @@ jobs:
189190
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-
190191
${{ env.cache-name }}-${{ runner.os }}-
191192
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-
196193
# repeating builds to workaround segfaults in windows and ghc-8.8.4
197194
- name: Build
198195
run: cabal build || cabal build || cabal build

0 commit comments

Comments
 (0)