Skip to content

Commit

Permalink
Add cache versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
newhoggy committed Dec 28, 2022
1 parent cd1d5fd commit 7785b65
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/github-page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ jobs:
os: [ubuntu-latest]

env:
# Modify this value to "invalidate" the cabal cache.
CABAL_CACHE_VERSION: "2022-12-28"

# Modify this value to "invalidate" the secp cache.
SECP_CACHE_VERSION: "2022-12-23"

# current ref from: 27.02.2022
SECP256K1_REF: ac83be33d0956faf6b7f61a60ab524ef7d6a473a

Expand Down Expand Up @@ -87,7 +93,7 @@ jobs:
dist-dir: dist-newstyle
store-path: ${{ steps.cabal-store.outputs.cabal-store }}
threads: 16
archive-uri: ${{ secrets.BINARY_CACHE_URI }}
archive-uri: ${{ secrets.BINARY_CACHE_URI }}/${{ env.CABAL_CACHE_VERSION }}
skip: "${{ secrets.BINARY_CACHE_URI == '' }}"

- name: Cabal cache over HTTPS
Expand All @@ -96,7 +102,7 @@ jobs:
dist-dir: dist-newstyle
store-path: ${{ steps.cabal-store.outputs.cabal-store }}
threads: 16
archive-uri: https://iohk.cache.haskellworks.io
archive-uri: https://iohk.cache.haskellworks.io/${{ env.CABAL_CACHE_VERSION }}
skip: "${{ secrets.BINARY_CACHE_URI != '' }}"
enable-save: false

Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,15 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]

env:
# Modify this value to "invalidate" the cabal cache.
CABAL_CACHE_VERSION: "2022-12-28"

# Modify this value to "invalidate" the secp cache.
SECP_CACHE_VERSION: "2022-12-23"

# current ref from: 27.02.2022
SECP256K1_REF: ac83be33d0956faf6b7f61a60ab524ef7d6a473a

SECP_CACHE_VERSION: 2022-12-23

# OpenSSL is installed in a non-standard location in MacOS. See
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md
PKG_CONFIG_PATH: ${{ (matrix.os == 'macos-latest' && '/usr/lib/pkgconfig:/usr/local/opt/openssl@1.1/lib/pkgconfig') || (matrix.os == 'ubuntu-latest' && '/usr/lib/pkgconfig:/usr/local/lib/pkgconfig') || '' }}
Expand Down Expand Up @@ -224,7 +228,7 @@ jobs:
dist-dir: dist-newstyle
store-path: ${{ steps.cabal-store.outputs.cabal-store }}
threads: 16
archive-uri: ${{ secrets.BINARY_CACHE_URI }}
archive-uri: ${{ secrets.BINARY_CACHE_URI }}/${{ env.CABAL_CACHE_VERSION }}
skip: "${{ secrets.BINARY_CACHE_URI == '' }}"

# It's important to ensure that people who fork this repository can not only successfully build in
Expand All @@ -242,7 +246,7 @@ jobs:
dist-dir: dist-newstyle
store-path: ${{ steps.cabal-store.outputs.cabal-store }}
threads: 16
archive-uri: https://iohk.cache.haskellworks.io
archive-uri: https://iohk.cache.haskellworks.io/${{ env.CABAL_CACHE_VERSION }}
skip: "${{ secrets.BINARY_CACHE_URI != '' }}"
enable-save: false

Expand Down

0 comments on commit 7785b65

Please sign in to comment.