From dd4347dac34681a74174a7c3454fa2987f9b7371 Mon Sep 17 00:00:00 2001 From: Phil Howard Date: Fri, 28 Apr 2023 11:39:14 +0100 Subject: [PATCH] CI: Grab only necessary modules. Reduces the MicroPython cache from ~879MB down to ~187MB for a reduction of around 6,920MB across builds. --- .github/workflows/micropython.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/micropython.yml b/.github/workflows/micropython.yml index 4ba27357..1d217480 100644 --- a/.github/workflows/micropython.yml +++ b/.github/workflows/micropython.yml @@ -19,9 +19,9 @@ jobs: uses: actions/cache@v3 with: path: ${{runner.workspace}} - key: workspace-micropython-${{env.MICROPYTHON_VERSION}}-with-libs + key: workspace-micropython-${{env.MICROPYTHON_VERSION}}-pico restore-keys: | - workspace-micropython-${{env.MICROPYTHON_VERSION}}-with-libs + workspace-micropython-${{env.MICROPYTHON_VERSION}}-pico # Check out MicroPython - name: Checkout MicroPython @@ -41,17 +41,17 @@ jobs: repository: micropython/micropython-lib path: micropython-lib - - name: Fetch base MicroPython submodules + - name: Fetch Pico submodules if: steps.cache.outputs.cache-hit != 'true' shell: bash - working-directory: micropython - run: git submodule update --init - - - name: Fetch Pico SDK submodules - if: steps.cache.outputs.cache-hit != 'true' - shell: bash - working-directory: micropython/lib/pico-sdk - run: git submodule update --init + working-directory: micropython/ports/rp2 + run: | + git submodule update --init ../../lib/pico-sdk + git submodule update --init ../../lib/cyw43-driver + git submodule update --init ../../lib/lwip + git submodule update --init ../../lib/mbedtls + git submodule update --init ../../lib/micropython-lib + git submodule update --init ../../lib/tinyusb - name: Build mpy-cross if: steps.cache.outputs.cache-hit != 'true'