Skip to content

Commit d460969

Browse files
authored
Merge pull request #781 from pimoroni/ci/caching-fun
CI: Add workflow version to cache key.
2 parents 7406440 + 0a2e099 commit d460969

File tree

1 file changed

+5
-18
lines changed

1 file changed

+5
-18
lines changed

.github/workflows/micropython.yml

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88

99
env:
1010
MICROPYTHON_VERSION: v1.20.0
11+
WORKFLOW_VERSION: v0
1112

1213
jobs:
1314
deps:
@@ -19,9 +20,9 @@ jobs:
1920
uses: actions/cache@v3
2021
with:
2122
path: ${{runner.workspace}}
22-
key: workspace-micropython-${{env.MICROPYTHON_VERSION}}-nano-specs
23+
key: workspace-micropython-${{env.MICROPYTHON_VERSION}}-${{env.WORKFLOW_VERSION}}
2324
restore-keys: |
24-
workspace-micropython-${{env.MICROPYTHON_VERSION}}-nano-specs
25+
workspace-micropython-${{env.MICROPYTHON_VERSION}}-${{env.WORKFLOW_VERSION}}
2526
2627
# Check out MicroPython
2728
- name: Checkout MicroPython
@@ -109,9 +110,9 @@ jobs:
109110
uses: actions/cache@v3
110111
with:
111112
path: ${{runner.workspace}}
112-
key: workspace-micropython-${{env.MICROPYTHON_VERSION}}
113+
key: workspace-micropython-${{env.MICROPYTHON_VERSION}}-${{env.WORKFLOW_VERSION}}
113114
restore-keys: |
114-
workspace-micropython-${{env.MICROPYTHON_VERSION}}
115+
workspace-micropython-${{env.MICROPYTHON_VERSION}}-${{env.WORKFLOW_VERSION}}
115116
116117
- name: Install Compiler & CCache
117118
if: runner.os == 'Linux'
@@ -129,20 +130,6 @@ jobs:
129130
echo "MICROPY_GIT_TAG=$MICROPYTHON_VERSION, ${{matrix.name}} ${{github.event.release.tag_name || github.sha}}" >> $GITHUB_ENV
130131
echo "MICROPY_GIT_HASH=$MICROPYTHON_VERSION-${{github.event.release.tag_name || github.sha}}" >> $GITHUB_ENV
131132
132-
- name: "HACK: Clean ports/rp2/modules and ports/rp2/CMakeLists.txt"
133-
shell: bash
134-
working-directory: micropython/ports/rp2
135-
run: |
136-
rm -rf modules
137-
git checkout modules
138-
139-
- name: "HACK: Revert Patches" # Avoid an already-patched MicroPython tree breaking our build
140-
shell: bash
141-
working-directory: micropython
142-
run: |
143-
git checkout lib/pico-sdk
144-
git checkout ports/rp2/CMakeLists.txt
145-
146133
- name: "HACK: CMakeLists.txt Disable C++ Exceptions Patch"
147134
shell: bash
148135
working-directory: micropython

0 commit comments

Comments
 (0)