Skip to content

Commit

Permalink
CI: Try to ccache mpy-cross
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Jan 8, 2024
1 parent b6953c2 commit bd6bd28
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/micropython.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 10 additions & 4 deletions ci/micropython.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}

Expand Down

0 comments on commit bd6bd28

Please sign in to comment.