Skip to content

Commit

Permalink
remove build number from gha ci caches (#435)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjlittle committed Sep 13, 2023
1 parent 88c75b2 commit cf2bb4d
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 31 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/ci-locks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ jobs:
- name: "conda package cache"
uses: ./.github/workflows/composite/conda-pkg-cache
with:
cache_build: 0
cache_period: ${{ env.CACHE_PERIOD }}
env_name: ${{ env.ENV_NAME }}

Expand All @@ -69,7 +68,6 @@ jobs:
- name: "conda environment cache"
uses: ./.github/workflows/composite/conda-env-cache
with:
cache_build: 1
cache_period: ${{ env.CACHE_PERIOD }}
env_name: ${{ env.ENV_NAME }}
install_packages: "pip 'tox<4'"
Expand All @@ -81,8 +79,6 @@ jobs:
- name: "tox cache"
uses: ./.github/workflows/composite/tox-cache
with:
cache_build: 0

- name: "lock (${{ matrix.version }})"
env:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ jobs:
- name: "conda package cache"
uses: ./.github/workflows/composite/conda-pkg-cache
with:
cache_build: 0
cache_period: ${{ env.CACHE_PERIOD }}
env_name: ${{ env.ENV_NAME }}

Expand All @@ -81,7 +80,6 @@ jobs:
- name: "conda environment cache"
uses: ./.github/workflows/composite/conda-env-cache
with:
cache_build: 1
cache_period: ${{ env.CACHE_PERIOD }}
env_name: ${{ env.ENV_NAME }}
install_packages: "cartopy pip 'tox<4'"
Expand All @@ -94,14 +92,12 @@ jobs:
- name: "cartopy cache"
uses: ./.github/workflows/composite/cartopy-cache
with:
cache_build: 0
cache_period: ${{ env.CACHE_PERIOD }}
env_name: ${{ env.ENV_NAME }}

- name: "tox cache"
uses: ./.github/workflows/composite/tox-cache
with:
cache_build: 0
lock_file: ${{ env.LOCK_FILE }}

- name: "${{ matrix.session }} (${{ matrix.version }})"
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/ci-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ jobs:
- name: "conda package cache"
uses: ./.github/workflows/composite/conda-pkg-cache
with:
cache_build: 0
cache_period: ${{ env.CACHE_PERIOD }}
env_name: ${{ env.ENV_NAME }}

Expand All @@ -115,7 +114,6 @@ jobs:
- name: "conda environment cache"
uses: ./.github/workflows/composite/conda-env-cache
with:
cache_build: 1
cache_period: ${{ env.CACHE_PERIOD }}
env_name: ${{ env.ENV_NAME }}
install_packages: "pip 'tox<4'"
Expand All @@ -128,7 +126,6 @@ jobs:
- name: "tox cache"
uses: ./.github/workflows/composite/tox-cache
with:
cache_build: 0
lock_file: ${{ env.LOCK_FILE }}

- name: "test wheel (${{ matrix.version }})"
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/composite/cartopy-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ description: "create and cache cartopy assets"
# - CONDA
#
inputs:
cache_build:
description: "conda environment cache build number"
required: false
default: "0"
cache_period:
description: "conda environment cache timestamp"
required: true
Expand All @@ -24,7 +20,7 @@ runs:
id: cartopy-cache
with:
path: ~/.local/share/cartopy
key: ${{ runner.os }}-cartopy-${{ inputs.env_name }}-p${{ inputs.cache_period }}-b${{ inputs.cache_build }}
key: ${{ runner.os }}-cartopy-${{ inputs.env_name }}-${{ inputs.cache_period }}

- if: steps.cartopy-cache.outputs.cache-hit != 'true'
env:
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/composite/conda-env-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ description: "create and cache the conda environment"
# - CONDA
#
inputs:
cache_build:
description: "conda environment cache build number"
required: false
default: "0"
cache_period:
description: "conda environment cache timestamp"
required: true
Expand All @@ -27,7 +23,7 @@ runs:
id: conda-env-cache
with:
path: ${{ env.CONDA }}/envs/${{ inputs.env_name }}
key: ${{ runner.os }}-conda-env-${{ inputs.env_name }}-p${{ inputs.cache_period }}-b${{ inputs.cache_build }}
key: ${{ runner.os }}-conda-env-${{ inputs.env_name }}-${{ inputs.cache_period }}

- if: steps.conda-env-cache.outputs.cache-hit != 'true'
shell: bash
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/composite/conda-pkg-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: "conda-pkg-cache"
description: "cache the conda environment packages"

inputs:
cache_build:
description: "conda environment cache build number"
required: false
default: "0"
cache_period:
description: "conda environment cache timestamp"
required: true
Expand All @@ -19,4 +15,4 @@ runs:
- uses: actions/cache@v3
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-pkgs-${{ inputs.env_name }}-p${{ inputs.cache_period }}-b${{ inputs.cache_build }}
key: ${{ runner.os }}-conda-pkg-${{ inputs.env_name }}-${{ inputs.cache_period }}
6 changes: 1 addition & 5 deletions .github/workflows/composite/tox-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: "tox cache"
description: "cache the tox test environment"

inputs:
cache_build:
description: "tox cache build number"
required: false
default: "0"
lock_file:
description: "conda-lock environment requirements filename"
required: false
Expand All @@ -17,4 +13,4 @@ runs:
- uses: actions/cache@v3
with:
path: ${{ github.workspace }}/.tox
key: ${{ runner.os }}-tox-${{ matrix.session }}-${{ matrix.version }}-b${{ inputs.cache_build }}-${{ hashFiles(inputs.lock_file) }}
key: ${{ runner.os }}-tox-${{ matrix.session }}-${{ matrix.version }}-${{ hashFiles(inputs.lock_file) }}

0 comments on commit cf2bb4d

Please sign in to comment.