19
19
uses : actions/cache@v3
20
20
with :
21
21
path : ${{runner.workspace}}
22
- key : workspace-micropython-${{env.MICROPYTHON_VERSION}}-with-libs
22
+ key : workspace-micropython-${{env.MICROPYTHON_VERSION}}-nano-specs
23
23
restore-keys : |
24
- workspace-micropython-${{env.MICROPYTHON_VERSION}}-with-libs
24
+ workspace-micropython-${{env.MICROPYTHON_VERSION}}-nano-specs
25
25
26
26
# Check out MicroPython
27
27
- name : Checkout MicroPython
@@ -41,17 +41,17 @@ jobs:
41
41
repository : micropython/micropython-lib
42
42
path : micropython-lib
43
43
44
- - name : Fetch base MicroPython submodules
44
+ - name : Fetch Pico submodules
45
45
if : steps.cache.outputs.cache-hit != 'true'
46
46
shell : bash
47
- working-directory : micropython
48
- run : git submodule update --init
49
-
50
- - name : Fetch Pico SDK submodules
51
- if : steps.cache.outputs.cache-hit != 'true'
52
- shell : bash
53
- working-directory : micropython/ lib/pico-sdk
54
- run : git submodule update --init
47
+ working-directory : micropython/ports/rp2
48
+ run : |
49
+ git submodule update --init ../../lib/pico-sdk
50
+ git submodule update --init ../../lib/cyw43-driver
51
+ git submodule update --init ../../lib/lwip
52
+ git submodule update --init ../../lib/mbedtls
53
+ git submodule update --init ../../ lib/micropython-lib
54
+ git submodule update --init ../../lib/tinyusb
55
55
56
56
- name : Build mpy-cross
57
57
if : steps.cache.outputs.cache-hit != 'true'
@@ -78,18 +78,15 @@ jobs:
78
78
board : PIMORONI_PICOLIPO_16MB
79
79
- name : tufty2040
80
80
board : PIMORONI_TUFTY2040
81
- local_board_dir : true
82
81
- name : enviro
83
82
board : PICO_W_ENVIRO
84
- local_board_dir : true
85
83
patch : true
86
84
- name : galactic_unicorn
87
85
board : PICO_W
88
86
- name : cosmic_unicorn
89
87
board : PICO_W
90
88
- name : inky_frame
91
89
board : PICO_W_INKY
92
- local_board_dir : true
93
90
patch : true
94
91
95
92
env :
@@ -131,12 +128,25 @@ jobs:
131
128
run : |
132
129
echo "MICROPY_GIT_TAG=$MICROPYTHON_VERSION, ${{matrix.name}} ${{github.event.release.tag_name || github.sha}}" >> $GITHUB_ENV
133
130
echo "MICROPY_GIT_HASH=$MICROPYTHON_VERSION-${{github.event.release.tag_name || github.sha}}" >> $GITHUB_ENV
131
+
132
+ - name : " HACK: Clean ports/rp2/modules and ports/rp2/CMakeLists.txt"
133
+ shell : bash
134
+ working-directory : micropython/ports/rp2
135
+ run : |
136
+ rm -rf modules
137
+ git checkout modules
134
138
135
- - name : " HACK: Revert Pico SDK Patch " # Avoid an already-patched MicroPython tree breaking our build
139
+ - name : " HACK: Revert Patches " # Avoid an already-patched MicroPython tree breaking our build
136
140
shell : bash
137
- working-directory : micropython/lib/pico-sdk
141
+ working-directory : micropython
138
142
run : |
139
- git checkout .
143
+ git checkout lib/pico-sdk
144
+ git checkout ports/rp2/CMakeLists.txt
145
+
146
+ - name : " HACK: CMakeLists.txt Disable C++ Exceptions Patch"
147
+ shell : bash
148
+ working-directory : micropython
149
+ run : git apply $GITHUB_WORKSPACE/pimoroni-pico-${{ github.sha }}/micropython/micropython_nano_specs.patch
140
150
141
151
- name : " HACK: Pico SDK Patch"
142
152
if : matrix.patch == true
@@ -145,20 +155,12 @@ jobs:
145
155
run : |
146
156
$GITHUB_WORKSPACE/pimoroni-pico-${{ github.sha }}/micropython/board/pico-sdk-patch.sh ${{matrix.board}}
147
157
148
- - name : Configure MicroPython (Local Board Dir)
149
- if : matrix.local_board_dir == true
158
+ - name : Configure MicroPython
150
159
shell : bash
151
160
working-directory : micropython/ports/rp2
152
161
run : |
153
- cmake -S . -B build-${{matrix.name}} -DPICO_BUILD_DOCS=0 -DUSER_C_MODULES=${{env.USER_C_MODULES}} -DMICROPY_BOARD_DIR=${{env.MICROPY_BOARD_DIR}} -DMICROPY_C_HEAP_SIZE=4096 -DMICROPY_BOARD=${{matrix.board}} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
154
-
155
- - name : Configure MicroPython (Upstream Board Dir)
156
- if : matrix.local_board_dir != true
157
- shell : bash
158
- working-directory : micropython/ports/rp2
159
- run : |
160
- cmake -S . -B build-${{matrix.name}} -DPICO_BUILD_DOCS=0 -DUSER_C_MODULES=${{env.USER_C_MODULES}} -DMICROPY_C_HEAP_SIZE=4096 -DMICROPY_BOARD=${{matrix.board}} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
161
-
162
+ cmake -S . -B build-${{matrix.name}} -DPICO_BUILD_DOCS=0 -DUSER_C_MODULES=${{env.USER_C_MODULES}} -DMICROPY_BOARD_DIR=${{env.MICROPY_BOARD_DIR}} -DMICROPY_BOARD=${{matrix.board}} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
163
+
162
164
- name : Build MicroPython # Multiple simultaneous jobs trigger https://github.com/pimoroni/pimoroni-pico/issues/761
163
165
shell : bash
164
166
working-directory : micropython/ports/rp2
0 commit comments