Skip to content

Commit

Permalink
Make the CI cache key infix customisable
Browse files Browse the repository at this point in the history
  • Loading branch information
penovicp committed Apr 12, 2023
1 parent 1ebae50 commit 44f8246
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ aliases:
steps:
- restore_cache:
name: "Restore venv Cache"
key: brew-gmp-cache-v1-{{ arch }}
key: brew-gmp-cache-{{ .Environment.CACHE_KEY_INFIX }}-{{ arch }}
- &save_macos_brew_cache
# Save only if the executor is a macos one #
- when:
Expand All @@ -57,7 +57,7 @@ aliases:
steps:
- save_cache:
name: "Save brew-gmp Cache"
key: brew-gmp-cache-v1-{{ arch }}
key: brew-gmp-cache-{{ .Environment.CACHE_KEY_INFIX }}-{{ arch }}
paths:
- /usr/local/Cellar/gmp
- /usr/local/include
Expand All @@ -77,7 +77,7 @@ aliases:
steps:
- restore_cache:
name: "Restore venv Cache"
key: venv-cache-{{ arch }}-v1-{{ checksum "/tmp/cairo-lang-version" }}
key: venv-cache-{{ arch }}-{{ .Environment.CACHE_KEY_INFIX }}-{{ checksum "/tmp/cairo-lang-version" }}
- &save_venv_cache
# Save only if the test name is "test-venv-tests" #
- when:
Expand All @@ -87,7 +87,7 @@ aliases:
steps:
- save_cache:
name: "Save venv Cache"
key: venv-cache-{{ arch }}-v1-{{ checksum "/tmp/cairo-lang-version" }}
key: venv-cache-{{ arch }}-{{ .Environment.CACHE_KEY_INFIX }}-{{ checksum "/tmp/cairo-lang-version" }}
paths:
- /Users/distiller/project/my-venv
- /home/circleci/project/my-venv
Expand All @@ -102,7 +102,7 @@ aliases:
steps:
- restore_cache:
name: "Restore cairo-lang Cache"
key: cairo-lang-cache-{{ arch }}-v1-{{ checksum "/tmp/cairo-lang-version" }}
key: cairo-lang-cache-{{ arch }}-{{ .Environment.CACHE_KEY_INFIX }}-{{ checksum "/tmp/cairo-lang-version" }}
- &save_cairo_cache
# Try to save only if the test name is not "test-venv-tests" #
- when:
Expand All @@ -113,7 +113,7 @@ aliases:
steps:
- save_cache:
name: "Save cairo-lang Cache"
key: cairo-lang-cache-{{ arch }}-v1-{{ checksum "/tmp/cairo-lang-version" }}
key: cairo-lang-cache-{{ arch }}-{{ .Environment.CACHE_KEY_INFIX }}-{{ checksum "/tmp/cairo-lang-version" }}
paths:
- /usr/python3.8/dist-packages/cairo-lang
- /usr/python3.9/dist-packages/cairo-lang
Expand All @@ -123,11 +123,11 @@ aliases:
- &restore_devnet_cache
- restore_cache:
name: "Restore devnet Cache"
key: devnet-cache-{{ arch }}-v1-{{ checksum "/tmp/devnet-version" }}
key: devnet-cache-{{ arch }}-{{ .Environment.CACHE_KEY_INFIX }}-{{ checksum "/tmp/devnet-version" }}
- &save_devnet_cache
- save_cache:
name: "Save devnet Cache"
key: devnet-cache-{{ arch }}-v1-{{ checksum "/tmp/devnet-version" }}
key: devnet-cache-{{ arch }}-{{ .Environment.CACHE_KEY_INFIX }}-{{ checksum "/tmp/devnet-version" }}
paths:
- /opt/circleci/.pyenv/versions
- /opt/circleci/.pyenv/shims/starknet-devnet
Expand Down

0 comments on commit 44f8246

Please sign in to comment.