Skip to content

Commit dec1902

Browse files
Remove cabal cache form CI (#3932)
We noticed that we are trying to cache the cabal store, however, Nix already does this for us, as we have seen from the fact that cache has been broken but builds run just as fast. Therefore, this caching should be removed entirely. This also fixes an issue where the cache key on master was not being built correctly, because we forgot to set the `ghc_version` ENV variable. THis also meant we were building with a different version of GHC on master push vs the feature branches.
1 parent 3b01114 commit dec1902

File tree

3 files changed

+6
-90
lines changed

3 files changed

+6
-90
lines changed

.github/workflows/master.yml

Lines changed: 6 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -7,62 +7,12 @@ concurrency:
77
group: ${{ github.workflow }}-${{ github.ref }}
88
cancel-in-progress: true
99

10-
jobs:
11-
12-
cache-cabal:
13-
name: 'Cache Cabal'
14-
strategy:
15-
fail-fast: false
16-
matrix:
17-
include:
18-
- runner: ubuntu-22.04
19-
os: ubuntu-22.04
20-
nix: x86_64-linux
21-
- runner: MacM1
22-
os: self-macos-12
23-
nix: aarch64-darwin
24-
runs-on: ${{ matrix.runner }}
25-
steps:
26-
- name: Check out code
27-
uses: actions/checkout@v4
28-
with:
29-
submodules: recursive
30-
31-
# Do the Following only on Public Runners; Mac Runner is pre-installed with build tools
32-
- name: 'Install Nix'
33-
if: ${{ !startsWith(matrix.os, 'self') }}
34-
uses: cachix/install-nix-action@v25
35-
with:
36-
install_url: https://releases.nixos.org/nix/nix-2.13.3/install
37-
extra_nix_config: |
38-
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
39-
substituters = http://cache.nixos.org https://cache.iog.io
40-
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
41-
42-
- name: 'Install Cachix'
43-
if: ${{ !startsWith(matrix.os, 'self') }}
44-
uses: cachix/cachix-action@v14
45-
with:
46-
name: k-framework
47-
authToken: '${{ secrets.CACHIX_PUBLIC_TOKEN }}'
48-
49-
- name: Cache Cabal package database and store
50-
uses: actions/cache@v4
51-
with:
52-
path: |
53-
~/.cabal/packages
54-
~/.cabal/store
55-
key: cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('flake.lock') }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('cabal.project.freeze') }}-${{ hashFiles('kore/kore.cabal') }}-${{ hashFiles('kore-rpc-types/kore-rpc-types.cabal') }}-${{ hashFiles('booster/hs-backend-booster.cabal') }}
56-
restore-keys: |
57-
cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('flake.lock') }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('cabal.project.freeze') }}-${{ hashFiles('kore/kore.cabal') }}-${{ hashFiles('kore-rpc-types/kore-rpc-types.cabal') }}
58-
cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('flake.lock') }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('cabal.project.freeze') }}-${{ hashFiles('kore/kore.cabal') }}
59-
cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('flake.lock') }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('cabal.project.freeze') }}
60-
cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('flake.lock') }}-${{ hashFiles('cabal.project') }}
61-
cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('flake.lock') }}
62-
63-
- name: Test
64-
run: GC_DONT_GC=1 nix develop .#cabal --command bash -c "hpack ./booster && hpack dev-tools && cabal update && cabal build all && cabal test --enable-tests --test-show-details=direct kore-test unit-tests"
10+
env:
11+
ghc_version: "9.6.5"
12+
stack_version: "2.15.1"
13+
hpack_version: '0.36'
6514

15+
jobs:
6616
cache-stack:
6717
name: 'Cache Stack'
6818
runs-on: ubuntu-22.04
@@ -103,7 +53,7 @@ jobs:
10353
version-bump:
10454
name: 'Version Bump'
10555
runs-on: ubuntu-latest
106-
needs: [cache-cabal, cache-stack]
56+
needs: [cache-stack]
10757
steps:
10858
- name: 'Check out code'
10959
uses: actions/checkout@v4

.github/workflows/release.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ on:
44
branches:
55
- release
66

7-
env:
8-
ghc_version: "9.6.5"
9-
stack_version: "2.15.1"
10-
hpack_version: '0.36'
11-
127
jobs:
138
draft-release:
149
name: 'Draft Release'

.github/workflows/test.yml

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -115,20 +115,6 @@ jobs:
115115
- name: Build
116116
run: GC_DONT_GC=1 nix build .#kore-exec .#kore-rpc-booster
117117

118-
- name: Cache Cabal package database and store
119-
uses: actions/cache@v4
120-
with:
121-
path: |
122-
~/.cabal/packages
123-
~/.cabal/store
124-
key: cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('flake.lock') }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('cabal.project.freeze') }}-${{ hashFiles('kore/kore.cabal') }}-${{ hashFiles('kore-rpc-types/kore-rpc-types.cabal') }}-${{ hashFiles('booster/hs-backend-booster.cabal') }}
125-
restore-keys: |
126-
cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('flake.lock') }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('cabal.project.freeze') }}-${{ hashFiles('kore/kore.cabal') }}-${{ hashFiles('kore-rpc-types/kore-rpc-types.cabal') }}
127-
cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('flake.lock') }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('cabal.project.freeze') }}-${{ hashFiles('kore/kore.cabal') }}
128-
cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('flake.lock') }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('cabal.project.freeze') }}
129-
cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('flake.lock') }}-${{ hashFiles('cabal.project') }}
130-
cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('flake.lock') }}
131-
132118
- name: Test
133119
run: GC_DONT_GC=1 nix develop .#cabal --command bash -c "hpack ./booster && hpack dev-tools && cabal update && cabal build all && cabal test --enable-tests --test-show-details=direct kore-test unit-tests"
134120

@@ -185,21 +171,6 @@ jobs:
185171
- name: Build
186172
run: GC_DONT_GC=1 nix build .#kore-exec .#kore-rpc-booster
187173

188-
- name: Cache Cabal package database and store
189-
uses: actions/cache@v4
190-
with:
191-
path: |
192-
~/.cabal/packages
193-
~/.cabal/store
194-
key: cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('flake.lock') }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('cabal.project.freeze') }}-${{ hashFiles('kore/kore.cabal') }}-${{ hashFiles('kore-rpc-types/kore-rpc-types.cabal') }}-${{ hashFiles('booster/hs-backend-booster.cabal') }}
195-
restore-keys: |
196-
cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('flake.lock') }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('cabal.project.freeze') }}-${{ hashFiles('kore/kore.cabal') }}-${{ hashFiles('kore-rpc-types/kore-rpc-types.cabal') }}
197-
cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('flake.lock') }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('cabal.project.freeze') }}-${{ hashFiles('kore/kore.cabal') }}
198-
cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('flake.lock') }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('cabal.project.freeze') }}
199-
cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('flake.lock') }}-${{ hashFiles('cabal.project') }}
200-
cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('flake.lock') }}
201-
cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}
202-
203174
- name: Run booster integration tests
204175
if: ${{ (steps.changes.outputs.booster == 'true' || steps.changes.outputs.kore_rpc_types == 'true' || steps.changes.outputs.project == 'true') }}
205176
run: |

0 commit comments

Comments
 (0)