diff --git a/.github/workflows/micropython.yml b/.github/workflows/micropython.yml index 6b4b1302..19f2d2cb 100644 --- a/.github/workflows/micropython.yml +++ b/.github/workflows/micropython.yml @@ -73,12 +73,17 @@ jobs: - name: Install CCache run: | source $BUILD_TOOLS - build_deps + apt_install_build_deps - name: Checkout MicroPython & Submodules run: | source $BUILD_TOOLS - clone_micropython + micropython_clone + + - name: Build MPY Cross + run: | + source $BUILD_TOOLS + micropython_build_mpy_cross - name: "HACK: CMakeLists.txt Disable C++ Exceptions Patch" shell: bash diff --git a/ci/micropython.sh b/ci/micropython.sh index 39cd3e70..a109a1df 100644 --- a/ci/micropython.sh +++ b/ci/micropython.sh @@ -12,7 +12,7 @@ function log_warning { echo -e "$(tput setaf 1)$1$(tput sgr0)" } -function clone_micropython { +function micropython_clone { log_inform "Using MicroPython $MICROPYTHON_VERSION" git clone https://github.com/micropython/micropython --depth=1 --branch=$MICROPYTHON_VERSION cd micropython @@ -23,12 +23,18 @@ function clone_micropython { git submodule update --init lib/micropython-lib git submodule update --init lib/tinyusb git submodule update --init lib/btstack - cd mpy-cross - make + cd ../ +} + +function micropython_build_mpy_cross { + cd micropython/mpy-cross + ccache --zero-stats || true + CROSS_COMPILE="ccache " make + ccache --show-stats || true cd ../../ } -function build_deps { +function apt_install_build_deps { sudo apt update && sudo apt install ccache }