Skip to content

Commit

Permalink
Merge pull request #261 from altheaden/fix-conda-cache
Browse files Browse the repository at this point in the history
Use separate conda cache directories in CI
  • Loading branch information
xylar authored Jan 17, 2025
2 parents 1209885 + 8430865 commit f86daa6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
# Increase this value to reset cache if conda-dev-spec.template has not changed in the workflow
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
path: ~/conda_pkgs_dir_py${{ matrix.python-version }}
key:
${{ runner.os }}-${{ matrix.python-version }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('configure_polaris_envs.py,deploy/*') }}
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/docs_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
release:
types: [published]

env:
PYTHON_VERSION: "3.10"

jobs:
publish-docs:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -39,7 +42,7 @@ jobs:
channels: conda-forge,e3sm/label/polaris
channel-priority: strict
auto-update-conda: true
python-version: ${{ matrix.python-version }}
python-version: ${{ env.PYTHON_VERSION }}

- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
name: Install polaris
Expand All @@ -49,7 +52,7 @@ jobs:
--conda_env_only \
--env_name polaris_test \
--verbose \
--python=${{ matrix.python-version }}
--python=${{ env.PYTHON_VERSION }}
source load_polaris_test.sh
- name: Build Sphinx Docs
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pre_commit_update_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:

env:
UP_TO_DATE: false
PYTHON_VERSION: "3.10"

jobs:
auto-update:
Expand All @@ -22,7 +23,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: ${{ env.PYTHON_VERSION }}

- name: Install pre-commit
run: pip install pre-commit
Expand Down

0 comments on commit f86daa6

Please sign in to comment.