@@ -34,11 +34,14 @@ jobs:
34
34
# MicroPython version will be contained in github.event.release.tag_name for releases
35
35
RELEASE_FILE : ${{ matrix.name }}-${{ github.event.release.tag_name || github.sha }}-micropython
36
36
PIMORONI_PICO_DIR : " ${{ github.workspace }}/pimoroni-pico"
37
- MICROPY_BOARD_DIR : " ${{ github.workspace }}/src-${{ github.sha }}/${{ matrix.BOARD }}"
38
37
USER_C_MODULES : " ${{ github.workspace }}/src-${{ github.sha }}/modules/${{ matrix.modules }}.cmake"
38
+ USER_FS_MANIFEST : " ${{ github.workspace }}/src-${{ github.sha }}/modules/${{ matrix.modules }}.txt"
39
+ USER_FS_SOURCE : " ${{ github.workspace }}/src-${{ github.sha }}/modules/littlefs"
39
40
TAG_OR_SHA : ${{ github.event.release.tag_name || github.sha }}
40
41
MICROPY_BOARD : ${{ matrix.board }}
41
42
MICROPY_BOARD_VARIANT : ${{ matrix.variant }}
43
+ MICROPY_BOARD_DIR : " ${{ github.workspace }}/src-${{ github.sha }}/${{ matrix.BOARD }}"
44
+ MICROPY_FROZEN_MANIFEST : " ${{ github.workspace }}/src-${{ github.sha }}/modules/${{ matrix.modules }}.py"
42
45
BOARD_NAME : ${{ matrix.name }}
43
46
BUILD_TOOLS : src-${{ github.sha }}/ci/micropython.sh
44
47
@@ -81,12 +84,19 @@ jobs:
81
84
source $BUILD_TOOLS
82
85
micropython_clone
83
86
84
- - name : " Py_Decl: Checkout py_decl "
87
+ - name : " Py_Decl: Checkout"
85
88
uses : actions/checkout@v4
86
89
with :
87
90
repository : gadgetoid/py_decl
88
91
ref : v0.0.2
89
92
path : py_decl
93
+
94
+ - name : " dir2uf2: Checkout"
95
+ uses : actions/checkout@v4
96
+ with :
97
+ repository : gadgetoid/dir2uf2
98
+ ref : v0.0.7
99
+ path : dir2uf2
90
100
91
101
- name : " MicroPython: Build MPY Cross"
92
102
run : |
@@ -106,24 +116,47 @@ jobs:
106
116
source $BUILD_TOOLS
107
117
cmake_build
108
118
109
- - name : " Py_Decl: Verify UF2 "
119
+ - name : " Py_Decl: Verify .uf2 "
110
120
shell : bash
111
121
run : |
112
122
python3 py_decl/py_decl.py --to-json --verify build-${{ matrix.name }}/${{ env.RELEASE_FILE }}.uf2
113
123
114
- - name : Store .uf2 as artifact
124
+ - name : " dir2uf2: Append filesystem to .uf2"
125
+ shell : bash
126
+ run : |
127
+ python3 -m pip install littlefs-python==0.12.0
128
+ ./dir2uf2/dir2uf2 --fs-compact --append-to build-${{ matrix.name }}/${{ env.RELEASE_FILE }}.uf2 --manifest ${{env.USER_FS_MANIFEST}} --filename with-filesystem.uf2 ${{env.USER_FS_SOURCE}}/
129
+
130
+ - name : " Artifacts: Upload .uf2"
115
131
uses : actions/upload-artifact@v4
116
132
with :
117
133
name : ${{ env.RELEASE_FILE }}.uf2
118
134
path : build-${{ matrix.name }}/${{ env.RELEASE_FILE }}.uf2
119
135
120
- - name : Upload .uf2
136
+ - name : " Artifacts: Upload .uf2 with filesystem"
137
+ uses : actions/upload-artifact@v4
138
+ with :
139
+ name : ${{ env.RELEASE_FILE }}-with-filesystem.uf2
140
+ path : ${{ env.RELEASE_FILE }}-with-filesystem.uf2
141
+
142
+ - name : " Release: Upload .uf2"
121
143
if : github.event_name == 'release'
122
144
uses : actions/upload-release-asset@v1
123
145
env :
124
146
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
125
147
with :
126
- asset_path : build-${{ matrix.name }}/firmware .uf2
148
+ asset_path : build-${{ matrix.name }}/${{ env.RELEASE_FILE }} .uf2
127
149
upload_url : ${{ github.event.release.upload_url }}
128
150
asset_name : ${{ env.RELEASE_FILE }}.uf2
151
+ asset_content_type : application/octet-stream
152
+
153
+ - name : " Release: Upload .uf2 with filesystem"
154
+ if : github.event_name == 'release'
155
+ uses : actions/upload-release-asset@v1
156
+ env :
157
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
158
+ with :
159
+ asset_path : ${{ env.RELEASE_FILE }}-with-filesystem.uf2
160
+ upload_url : ${{ github.event.release.upload_url }}
161
+ asset_name : ${{ env.RELEASE_FILE }}-with-filesystem.uf2
129
162
asset_content_type : application/octet-stream
0 commit comments