Skip to content

Commit

Permalink
Revert "Revert "Attempt to improve CI caching (#6534)" (#6543)"
Browse files Browse the repository at this point in the history
This reverts commit 93b8813.
  • Loading branch information
max-sixty authored Apr 29, 2022
1 parent 93b8813 commit c61c8a3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-additional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
else
echo "CONDA_ENV_FILE=ci/requirements/${{ matrix.env }}.yml" >> $GITHUB_ENV
fi
- name: Cache conda
uses: actions/cache@v3
with:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,15 @@ jobs:
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
# This and the next few are based on https://github.com/conda-incubator/setup-miniconda#caching-environments
- name: Cache conda
id: cache-conda
uses: actions/cache@v3
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-py${{ matrix.python-version }}-${{
hashFiles('ci/requirements/**.yml') }}

- uses: conda-incubator/setup-miniconda@v2
with:
channels: conda-forge
Expand All @@ -98,9 +101,18 @@ jobs:
python-version: ${{ matrix.python-version }}
use-only-tar-bz2: true

- name: Cache conda env
id: cache-env
uses: actions/cache@v3
with:
path: /usr/share/miniconda/envs/xarray-tests
key: ${{ runner.os }}-conda-py${{ matrix.python-version }}-${{
hashFiles('ci/requirements/**.yml') }}

- name: Install conda dependencies
run: |
mamba env update -f $CONDA_ENV_FILE
if: steps.cache-env.outputs.cache-hit != 'true'

# We only want to install this on one run, because otherwise we'll have
# duplicate annotations.
Expand Down

0 comments on commit c61c8a3

Please sign in to comment.