Skip to content

Commit 66884f9

Browse files
authored
Add runner.arch to ci cache key (#620)
1 parent 2832960 commit 66884f9

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

.github/workflows/ci.yaml

+14-7
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ jobs:
4242
with:
4343
path: venv
4444
key: >-
45-
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
45+
${{ runner.os }}-${{ runner.arch }}-${{
46+
steps.python.outputs.python-version }}-${{
4647
steps.generate-python-key.outputs.key }}
4748
- name: Create Python virtual environment
4849
if: steps.cache-venv.outputs.cache-hit != 'true'
@@ -63,7 +64,8 @@ jobs:
6364
with:
6465
path: ${{ env.PRE_COMMIT_CACHE }}
6566
key: >-
66-
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
67+
${{ runner.os }}-${{ runner.arch }}-${{
68+
steps.python.outputs.python-version }}-${{
6769
steps.generate-pre-commit-key.outputs.key }}
6870
- name: Install pre-commit dependencies
6971
if: steps.cache-precommit.outputs.cache-hit != 'true'
@@ -101,15 +103,17 @@ jobs:
101103
with:
102104
fail-on-cache-miss: true
103105
path: venv
104-
key: ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
106+
key: ${{ runner.os }}-${{ runner.arch }}-${{
107+
steps.python.outputs.python-version }}-${{
105108
needs.prepare-base.outputs.python-key }}
106109
- name: Restore pre-commit environment
107110
id: cache-precommit
108111
uses: actions/cache/restore@v4.2.3
109112
with:
110113
fail-on-cache-miss: true
111114
path: ${{ env.PRE_COMMIT_CACHE }}
112-
key: ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
115+
key: ${{ runner.os }}-${{ runner.arch }}-${{
116+
steps.python.outputs.python-version }}-${{
113117
needs.prepare-base.outputs.pre-commit-key }}
114118
- name: Run formatting check
115119
run: |
@@ -135,7 +139,8 @@ jobs:
135139
with:
136140
fail-on-cache-miss: true
137141
path: venv
138-
key: ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
142+
key: ${{ runner.os }}-${{ runner.arch }}-${{
143+
steps.python.outputs.python-version }}-${{
139144
needs.prepare-base.outputs.python-key }}
140145
- name: Run pylint
141146
run: |
@@ -161,7 +166,8 @@ jobs:
161166
with:
162167
fail-on-cache-miss: true
163168
path: venv
164-
key: ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
169+
key: ${{ runner.os }}-${{ runner.arch }}-${{
170+
steps.python.outputs.python-version }}-${{
165171
needs.prepare-base.outputs.python-key }}
166172
- name: Run mypy
167173
run: |
@@ -198,7 +204,8 @@ jobs:
198204
with:
199205
path: venv
200206
key: >-
201-
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
207+
${{ runner.os }}-${{ runner.arch }}-${{
208+
steps.python.outputs.python-version }}-${{
202209
steps.generate-python-key.outputs.key }}
203210
- name: Create Python virtual environment
204211
if: steps.cache-venv.outputs.cache-hit != 'true'

0 commit comments

Comments
 (0)