Skip to content

Commit bd6bd28

Browse files
committed
CI: Try to ccache mpy-cross
1 parent b6953c2 commit bd6bd28

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

.github/workflows/micropython.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,17 @@ jobs:
7373
- name: Install CCache
7474
run: |
7575
source $BUILD_TOOLS
76-
build_deps
76+
apt_install_build_deps
7777
7878
- name: Checkout MicroPython & Submodules
7979
run: |
8080
source $BUILD_TOOLS
81-
clone_micropython
81+
micropython_clone
82+
83+
- name: Build MPY Cross
84+
run: |
85+
source $BUILD_TOOLS
86+
micropython_build_mpy_cross
8287
8388
- name: "HACK: CMakeLists.txt Disable C++ Exceptions Patch"
8489
shell: bash

ci/micropython.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function log_warning {
1212
echo -e "$(tput setaf 1)$1$(tput sgr0)"
1313
}
1414

15-
function clone_micropython {
15+
function micropython_clone {
1616
log_inform "Using MicroPython $MICROPYTHON_VERSION"
1717
git clone https://github.com/micropython/micropython --depth=1 --branch=$MICROPYTHON_VERSION
1818
cd micropython
@@ -23,12 +23,18 @@ function clone_micropython {
2323
git submodule update --init lib/micropython-lib
2424
git submodule update --init lib/tinyusb
2525
git submodule update --init lib/btstack
26-
cd mpy-cross
27-
make
26+
cd ../
27+
}
28+
29+
function micropython_build_mpy_cross {
30+
cd micropython/mpy-cross
31+
ccache --zero-stats || true
32+
CROSS_COMPILE="ccache " make
33+
ccache --show-stats || true
2834
cd ../../
2935
}
3036

31-
function build_deps {
37+
function apt_install_build_deps {
3238
sudo apt update && sudo apt install ccache
3339
}
3440

0 commit comments

Comments
 (0)