Skip to content

Commit

Permalink
fix composite gha (#4809)
Browse files Browse the repository at this point in the history
* fix composite gha

* bump gha cache_build to force purge
  • Loading branch information
bjlittle authored Jun 17, 2022
1 parent 78437b0 commit d894a97
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-docs-linkcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: "conda package cache"
uses: ./.github/workflows/composite/conda-pkg-cache
with:
cache_build: 0
cache_build: 1
cache_period: ${{ env.CACHE_PERIOD }}
env_name: ${{ env.ENV_NAME }}

Expand All @@ -70,7 +70,7 @@ jobs:
- name: "conda environment cache"
uses: ./.github/workflows/composite/conda-env-cache
with:
cache_build: 0
cache_build: 1
cache_period: ${{ env.CACHE_PERIOD }}
env_name: ${{ env.ENV_NAME }}
install_packages: "nox pip"
Expand All @@ -83,7 +83,7 @@ jobs:
- name: "nox cache"
uses: ./.github/workflows/composite/nox-cache
with:
cache_build: 0
cache_build: 1
env_name: ${{ env.ENV_NAME }}
lock_file: ${{ env.LOCK_FILE }}

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci-docs-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ jobs:
- name: "data cache"
uses: ./.github/workflows/composite/iris-data-cache
with:
cache_build: 0
cache_build: 1
env_name: ${{ env.ENV_NAME }}
version: ${{ env.IRIS_TEST_DATA_VERSION }}

- name: "conda package cache"
uses: ./.github/workflows/composite/conda-pkg-cache
with:
cache_build: 0
cache_build: 1
cache_period: ${{ env.CACHE_PERIOD }}
env_name: ${{ env.ENV_NAME }}

Expand All @@ -78,7 +78,7 @@ jobs:
- name: "conda environment cache"
uses: ./.github/workflows/composite/conda-env-cache
with:
cache_build: 0
cache_build: 1
cache_period: ${{ env.CACHE_PERIOD }}
env_name: ${{ env.ENV_NAME }}
install_packages: "cartopy nox pip"
Expand All @@ -91,14 +91,14 @@ jobs:
- name: "cartopy cache"
uses: ./.github/workflows/composite/cartopy-cache
with:
cache_build: 0
cache_build: 1
cache_period: ${{ env.CACHE_PERIOD }}
env_name: ${{ env.ENV_NAME }}

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

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ jobs:
- name: "data cache"
uses: ./.github/workflows/composite/iris-data-cache
with:
cache_build: 0
cache_build: 1
env_name: ${{ env.ENV_NAME }}
version: ${{ env.IRIS_TEST_DATA_VERSION }}

- name: "conda package cache"
uses: ./.github/workflows/composite/conda-pkg-cache
with:
cache_build: 0
cache_build: 1
cache_period: ${{ env.CACHE_PERIOD }}
env_name: ${{ env.ENV_NAME }}

Expand All @@ -79,7 +79,7 @@ jobs:
- name: "conda environment cache"
uses: ./.github/workflows/composite/conda-env-cache
with:
cache_build: 0
cache_build: 1
cache_period: ${{ env.CACHE_PERIOD }}
env_name: ${{ env.ENV_NAME }}
install_packages: "cartopy nox pip"
Expand All @@ -92,14 +92,14 @@ jobs:
- name: "cartopy cache"
uses: ./.github/workflows/composite/cartopy-cache
with:
cache_build: 0
cache_build: 1
cache_period: ${{ env.CACHE_PERIOD }}
env_name: ${{ env.ENV_NAME }}

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

Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/composite/cartopy-cache/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: "cartopy-cache"
description: "create and cache cartopy assets"

#
# Assumes the environment contains the following variables:
# - CONDA
#
inputs:
cache_build:
description: "conda environment cache build number"
Expand Down Expand Up @@ -28,6 +32,9 @@ runs:
CARTOPY_FEATURE: https://raw.githubusercontent.com/SciTools/cartopy/v0.20.0/tools/cartopy_feature_download.py
shell: bash
run: |
# Require to explicitly activate the environment within the composite action.
source ${{ env.CONDA }}/etc/profile.d/conda.sh >/dev/null 2>&1
conda activate ${{ inputs.env_name }}
wget --quiet ${CARTOPY_FEATURE}
mkdir -p ${CARTOPY_SHARE_DIR}
# Requires a pre-installed version of cartopy within the environment.
Expand Down

0 comments on commit d894a97

Please sign in to comment.