Skip to content

Commit f86daa6

Browse files
authored
Merge pull request #261 from altheaden/fix-conda-cache
Use separate conda cache directories in CI
2 parents 1209885 + 8430865 commit f86daa6

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.github/workflows/build_workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
# Increase this value to reset cache if conda-dev-spec.template has not changed in the workflow
7979
CACHE_NUMBER: 0
8080
with:
81-
path: ~/conda_pkgs_dir
81+
path: ~/conda_pkgs_dir_py${{ matrix.python-version }}
8282
key:
8383
${{ runner.os }}-${{ matrix.python-version }}-conda-${{ env.CACHE_NUMBER }}-${{
8484
hashFiles('configure_polaris_envs.py,deploy/*') }}

.github/workflows/docs_workflow.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
release:
88
types: [published]
99

10+
env:
11+
PYTHON_VERSION: "3.10"
12+
1013
jobs:
1114
publish-docs:
1215
runs-on: ubuntu-latest
@@ -39,7 +42,7 @@ jobs:
3942
channels: conda-forge,e3sm/label/polaris
4043
channel-priority: strict
4144
auto-update-conda: true
42-
python-version: ${{ matrix.python-version }}
45+
python-version: ${{ env.PYTHON_VERSION }}
4346

4447
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
4548
name: Install polaris
@@ -49,7 +52,7 @@ jobs:
4952
--conda_env_only \
5053
--env_name polaris_test \
5154
--verbose \
52-
--python=${{ matrix.python-version }}
55+
--python=${{ env.PYTHON_VERSION }}
5356
source load_polaris_test.sh
5457
5558
- name: Build Sphinx Docs

.github/workflows/pre_commit_update_workflow.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212

1313
env:
1414
UP_TO_DATE: false
15+
PYTHON_VERSION: "3.10"
1516

1617
jobs:
1718
auto-update:
@@ -22,7 +23,7 @@ jobs:
2223
- name: Set up Python
2324
uses: actions/setup-python@v5
2425
with:
25-
python-version: "3.10"
26+
python-version: ${{ env.PYTHON_VERSION }}
2627

2728
- name: Install pre-commit
2829
run: pip install pre-commit

0 commit comments

Comments
 (0)