Skip to content

Commit 9f99253

Browse files
authored
Merge pull request #217 from altheaden/fix-conda-cache
Use separate conda cache directories in CI
2 parents 8a86130 + 5e8f6f9 commit 9f99253

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('spec-file.txt,pyproject.toml,') }}

.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,14 +42,14 @@ jobs:
3942
channels: conda-forge
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 mache
4649
run: |
4750
git config --global url."https://github.com/".insteadOf "[email protected]:"
4851
conda create -n mache_dev --file spec-file.txt \
49-
python=${{ matrix.python-version }}
52+
python=${{ env.PYTHON_VERSION }}
5053
conda activate mache_dev
5154
python -m pip install -vv --no-deps --no-build-isolation -e .
5255

.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)