Skip to content

Commit e2c00fd

Browse files
committed
Revert "ci: cache stage0 cabal binary across CI runs"
This reverts commit 8d1e382.
1 parent 8d1e382 commit e2c00fd

3 files changed

Lines changed: 2 additions & 55 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ on:
77
branches: [stable-ghc-9.14, stable-master]
88
workflow_dispatch:
99

10-
env:
11-
CABAL_CACHE_PATH: _build/cabal/bin
12-
1310
jobs:
1411
cabal:
1512
strategy:
@@ -56,12 +53,6 @@ jobs:
5653
minimal: true
5754
ghc: true
5855

59-
- name: Cache stage0 cabal binary
60-
uses: actions/cache@v4
61-
with:
62-
path: ${{ env.CABAL_CACHE_PATH }}
63-
key: cabal-v1-${{ matrix.plat }}-${{ hashFiles('cabal.project.stage0') }}
64-
6556
- name: Update hackage
6657
shell: devx {0}
6758
run: cabal update

.github/workflows/reusable-release.yml

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ env:
4444
CHERE_INVOKING: 1
4545
# dynamic
4646
DYNAMIC: ${{ inputs.dynamic }}
47-
# stage0 cabal cache
48-
CABAL_CACHE_PATH: _build/cabal/bin
4947

5048
jobs:
5149
tool-output:
@@ -151,12 +149,6 @@ jobs:
151149
./emsdk install ${{ env.EMSDK_VERSION }}
152150
./emsdk activate ${{ env.EMSDK_VERSION }}
153151

154-
- name: Cache stage0 cabal binary
155-
uses: actions/cache@v4
156-
with:
157-
path: ${{ env.CABAL_CACHE_PATH }}
158-
key: cabal-v1-${{ matrix.platform.ARTIFACT }}-${{ hashFiles('cabal.project.stage0') }}
159-
160152
- name: Run build
161153
run: &build |
162154
set -eux
@@ -222,12 +214,6 @@ jobs:
222214
ref: ${{ matrix.branch }}
223215
submodules: recursive
224216

225-
- name: Cache stage0 cabal binary
226-
uses: actions/cache@v4
227-
with:
228-
path: ${{ env.CABAL_CACHE_PATH }}
229-
key: cabal-v1-${{ matrix.platform.ARTIFACT }}-${{ hashFiles('cabal.project.stage0') }}
230-
231217
# debian 11 ships with make 4.3, but we need 4.4
232218
- if: matrix.platform.ARTIFACT == 'aarch64-linux-deb11'
233219
uses: docker://arm64v8/debian:11
@@ -318,12 +304,6 @@ jobs:
318304
echo "/usr/local/opt/make/libexec/gnubin" >> $GITHUB_PATH
319305
echo "/usr/local/opt/libtool/libexec/gnubin" >> $GITHUB_PATH
320306
321-
- name: Cache stage0 cabal binary
322-
uses: actions/cache@v4
323-
with:
324-
path: ${{ env.CABAL_CACHE_PATH }}
325-
key: cabal-v1-${{ env.ARTIFACT }}-${{ hashFiles('cabal.project.stage0') }}
326-
327307
- name: Install emscripten
328308
run : *emscripten
329309

@@ -373,12 +353,6 @@ jobs:
373353
echo "/opt/homebrew/opt/make/libexec/gnubin" >> $GITHUB_PATH
374354
echo "/opt/homebrew/opt/libtool/libexec/gnubin" >> $GITHUB_PATH
375355
376-
- name: Cache stage0 cabal binary
377-
uses: actions/cache@v4
378-
with:
379-
path: ${{ env.CABAL_CACHE_PATH }}
380-
key: cabal-v1-${{ env.ARTIFACT }}-${{ hashFiles('cabal.project.stage0') }}
381-
382356
- name: Run build
383357
run: *build
384358

@@ -427,12 +401,6 @@ jobs:
427401
run: ghcup --no-verbose install ghc --set --install-targets "${{ env.GHC_TARGETS }}" "${{ env.GHC_VERSION }}"
428402
shell: pwsh
429403

430-
- name: Cache stage0 cabal binary
431-
uses: actions/cache@v4
432-
with:
433-
path: ${{ env.CABAL_CACHE_PATH }}
434-
key: cabal-v1-${{ env.ARTIFACT }}-${{ hashFiles('cabal.project.stage0') }}
435-
436404
- name: Run build
437405
run: *build
438406
env:
@@ -505,22 +473,12 @@ jobs:
505473
run : |
506474
sudo pkg install -y emscripten
507475
508-
# Self-hosted runner: clean stale state but keep _build/cabal/ for caching.
509-
# distclean includes clean (stage1/2/3 + config), but not clean-cabal.
510-
- name: Clean stale build state
511-
run: gmake distclean
512-
513-
- name: Cache stage0 cabal binary
514-
uses: actions/cache@v4
515-
with:
516-
path: ${{ env.CABAL_CACHE_PATH }}
517-
key: cabal-v1-${{ env.ARTIFACT }}-${{ hashFiles('cabal.project.stage0') }}
518-
519476
- name: Run build
520477
run: |
521478
which ghc
522479
ghc --info
523480
cabal update
481+
gmake clean clean-cabal distclean
524482
gmake _build/dist/haskell-toolchain.tar.gz _build/dist/ghc.tar.gz _build/dist/cabal.tar.gz _build/dist/tests.tar.gz _build/dist/ghc-javascript-unknown-ghcjs.tar.gz
525483
cd _build/dist
526484
mv ghc.tar.gz ghc-$(bin/ghc --numeric-version)-${{ env.ARTIFACT }}.tar.gz

Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -540,9 +540,7 @@ all: stage2
540540
# | (_| (_| | |_) | (_| | |_____| | | | \__ \ || (_| | | |
541541
# \___\__,_|_.__/ \__,_|_| |_|_| |_|___/\__\__,_|_|_|
542542

543-
# Not .PHONY: Make only rebuilds when the binary is missing.
544-
# Cache correctness is handled by the CI cache key (hashFiles('cabal.project.stage0')),
545-
# not by Make prerequisites.
543+
.PHONY: $(CABAL)
546544
$(CABAL): STAGE=stage0
547545
$(CABAL):
548546
$(call PHASE_START,cabal)

0 commit comments

Comments
 (0)