Skip to content

Commit daf43c8

Browse files
Merge branch 'master' into ghc-9.2
2 parents f951004 + 2aaa5b8 commit daf43c8

File tree

3 files changed

+42
-6
lines changed

3 files changed

+42
-6
lines changed

.github/workflows/bench.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,15 @@ jobs:
7474
INDEX_STATE1=$(echo "$INDEX_STATE_ENTRY" | cut -d' ' -f2 | tr ':' '-')
7575
echo "INDEX_STATE=$INDEX_STATE1" >> $GITHUB_ENV
7676
77+
- name: Form the package list ('cabal.project.freeze')
78+
continue-on-error: true
79+
run: |
80+
cabal v2-freeze
81+
echo ''
82+
echo 'Output:'
83+
echo ''
84+
cat 'cabal.project.freeze'
85+
7786
- name: Hackage sources cache
7887
uses: actions/cache@v2
7988
env:
@@ -84,12 +93,13 @@ jobs:
8493
restore-keys: ${{ env.cache-name }}-
8594

8695
- name: Compiled deps cache
96+
id: compiled-deps
8797
uses: actions/cache@v2
8898
env:
8999
cache-name: compiled-deps
90100
with:
91101
path: ${{ steps.HaskEnvSetup.outputs.cabal-store }}
92-
key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }}
102+
key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project.freeze') }}
93103
restore-keys: |
94104
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-
95105
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-

.github/workflows/caching.yml

+20-4
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,15 @@ jobs:
131131
INDEX_STATE1=$(echo "$INDEX_STATE_ENTRY" | cut -d' ' -f2 | tr ':' '-')
132132
echo "INDEX_STATE=$INDEX_STATE1" >> $GITHUB_ENV
133133
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+
134143
# 2021-12-02: NOTE: Cabal Hackage source tree storage does not depend on OS or GHC really,
135144
# but can depend on `base`.
136145
# But this caching is happens only inside `master` for `master` purposes of compiling the deps
@@ -141,9 +150,11 @@ jobs:
141150
env:
142151
cache-name: hackage-sources
143152
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 }}-
147158
148159
- name: Compiled deps cache
149160
id: compiled-deps
@@ -152,7 +163,7 @@ jobs:
152163
cache-name: compiled-deps
153164
with:
154165
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') }}
156167
restore-keys: |
157168
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-
158169
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-
@@ -176,3 +187,8 @@ jobs:
176187
name: Build all targets; try 3 times
177188
run: |
178189
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

.github/workflows/test.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,15 @@ jobs:
132132
INDEX_STATE1=$(echo "$INDEX_STATE_ENTRY" | cut -d' ' -f2 | tr ':' '-')
133133
echo "INDEX_STATE=$INDEX_STATE1" >> $GITHUB_ENV
134134
135+
- name: Form the package list ('cabal.project.freeze')
136+
continue-on-error: true
137+
run: |
138+
cabal v2-freeze
139+
echo ''
140+
echo 'Output:'
141+
echo ''
142+
cat 'cabal.project.freeze'
143+
135144
- name: Hackage sources cache
136145
uses: actions/cache@v2
137146
env:
@@ -142,12 +151,13 @@ jobs:
142151
restore-keys: ${{ env.cache-name }}-
143152

144153
- name: Compiled deps cache
154+
id: compiled-deps
145155
uses: actions/cache@v2
146156
env:
147157
cache-name: compiled-deps
148158
with:
149159
path: ${{ steps.HaskEnvSetup.outputs.cabal-store }}
150-
key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }}
160+
key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project.freeze') }}
151161
restore-keys: |
152162
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-
153163
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-

0 commit comments

Comments
 (0)