diff --git a/.github/workflows/ci-docs-linkcheck.yml b/.github/workflows/ci-docs-linkcheck.yml index cf67e99129..2fc5722d7f 100644 --- a/.github/workflows/ci-docs-linkcheck.yml +++ b/.github/workflows/ci-docs-linkcheck.yml @@ -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 }} @@ -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" @@ -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 }} diff --git a/.github/workflows/ci-docs-tests.yml b/.github/workflows/ci-docs-tests.yml index faadf56204..91366f4a06 100644 --- a/.github/workflows/ci-docs-tests.yml +++ b/.github/workflows/ci-docs-tests.yml @@ -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 }} @@ -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" @@ -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 }} diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index fbe738067c..5598ce1084 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -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 }} @@ -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" @@ -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 }} diff --git a/.github/workflows/composite/cartopy-cache/action.yml b/.github/workflows/composite/cartopy-cache/action.yml index 35a90736bc..e805cbacc1 100644 --- a/.github/workflows/composite/cartopy-cache/action.yml +++ b/.github/workflows/composite/cartopy-cache/action.yml @@ -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" @@ -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.