CI: Add workflow version to cache key.

pull/781/head
Phil Howard 2023-05-18 11:55:21 +01:00
rodzic 00d1617947
commit 0a2e099886
1 zmienionych plików z 5 dodań i 18 usunięć

Wyświetl plik

@ -8,6 +8,7 @@ on:
env: env:
MICROPYTHON_VERSION: v1.20.0 MICROPYTHON_VERSION: v1.20.0
WORKFLOW_VERSION: v0
jobs: jobs:
deps: deps:
@ -19,9 +20,9 @@ jobs:
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: ${{runner.workspace}} path: ${{runner.workspace}}
key: workspace-micropython-${{env.MICROPYTHON_VERSION}}-nano-specs key: workspace-micropython-${{env.MICROPYTHON_VERSION}}-${{env.WORKFLOW_VERSION}}
restore-keys: | restore-keys: |
workspace-micropython-${{env.MICROPYTHON_VERSION}}-nano-specs workspace-micropython-${{env.MICROPYTHON_VERSION}}-${{env.WORKFLOW_VERSION}}
# Check out MicroPython # Check out MicroPython
- name: Checkout MicroPython - name: Checkout MicroPython
@ -109,9 +110,9 @@ jobs:
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: ${{runner.workspace}} path: ${{runner.workspace}}
key: workspace-micropython-${{env.MICROPYTHON_VERSION}} key: workspace-micropython-${{env.MICROPYTHON_VERSION}}-${{env.WORKFLOW_VERSION}}
restore-keys: | restore-keys: |
workspace-micropython-${{env.MICROPYTHON_VERSION}} workspace-micropython-${{env.MICROPYTHON_VERSION}}-${{env.WORKFLOW_VERSION}}
- name: Install Compiler & CCache - name: Install Compiler & CCache
if: runner.os == 'Linux' if: runner.os == 'Linux'
@ -129,20 +130,6 @@ jobs:
echo "MICROPY_GIT_TAG=$MICROPYTHON_VERSION, ${{matrix.name}} ${{github.event.release.tag_name || github.sha}}" >> $GITHUB_ENV echo "MICROPY_GIT_TAG=$MICROPYTHON_VERSION, ${{matrix.name}} ${{github.event.release.tag_name || github.sha}}" >> $GITHUB_ENV
echo "MICROPY_GIT_HASH=$MICROPYTHON_VERSION-${{github.event.release.tag_name || github.sha}}" >> $GITHUB_ENV echo "MICROPY_GIT_HASH=$MICROPYTHON_VERSION-${{github.event.release.tag_name || github.sha}}" >> $GITHUB_ENV
- name: "HACK: Clean ports/rp2/modules and ports/rp2/CMakeLists.txt"
shell: bash
working-directory: micropython/ports/rp2
run: |
rm -rf modules
git checkout modules
- name: "HACK: Revert Patches" # Avoid an already-patched MicroPython tree breaking our build
shell: bash
working-directory: micropython
run: |
git checkout lib/pico-sdk
git checkout ports/rp2/CMakeLists.txt
- name: "HACK: CMakeLists.txt Disable C++ Exceptions Patch" - name: "HACK: CMakeLists.txt Disable C++ Exceptions Patch"
shell: bash shell: bash
working-directory: micropython working-directory: micropython