66  release :
77    types : [created] 
88
9- env :
10-   MICROPYTHON_VERSION : feature/presto-wireless 
11-   MICROPYTHON_FLAVOUR : pimoroni 
12-   PIMORONI_PICO_VERSION : feature/picovector2-and-layers 
13- 
149jobs :
1510  build :
16-     name : ${{ matrix.name }} (${{ matrix.board }} ${{ matrix.variant }} ${{ matrix.modules }})  
17-     runs-on : ubuntu-latest  
11+     name : MicroPython  ${{ matrix.name }}
12+     runs-on : ubuntu-24.04  
1813    continue-on-error : true 
1914    strategy :
2015      matrix :
2116        include :
2217        - name : presto 
23-           board : presto 
24-           variant :
25-           modules : default 
2618
2719    env :
2820      #  MicroPython version will be contained in github.event.release.tag_name for releases
29-       RELEASE_FILE : ${{ matrix.name }}-${{ github.event.release.tag_name || github.sha }}-micropython 
30-       PIMORONI_PICO_DIR : " ${{ github.workspace }}/pimoroni-pico" 
31-       USER_C_MODULES : " ${{ github.workspace }}/src-${{ github.sha }}/modules/${{ matrix.modules }}.cmake" 
32-       USER_FS_MANIFEST : " ${{ github.workspace }}/src-${{ github.sha }}/modules/${{ matrix.modules }}.txt" 
33-       USER_FS_SOURCE : " ${{ github.workspace }}/src-${{ github.sha }}/examples" 
34-       TAG_OR_SHA : ${{ github.event.release.tag_name || github.sha }} 
35-       MICROPY_BOARD : ${{ matrix.board }} 
36-       MICROPY_BOARD_VARIANT : ${{ matrix.variant }} 
37-       MICROPY_BOARD_DIR : " ${{ github.workspace }}/src-${{ github.sha }}/${{ matrix.BOARD }}" 
38-       MICROPY_FROZEN_MANIFEST : " ${{ github.workspace }}/src-${{ github.sha }}/modules/${{ matrix.modules }}.py" 
39-       BOARD_NAME : ${{ matrix.name }} 
40-       BUILD_TOOLS : src-${{ github.sha }}/ci/micropython.sh 
21+       CI_RELEASE_FILENAME : ${{ matrix.name }}-${{ github.event.release.tag_name || github.sha }}-micropython 
22+       CI_PROJECT_ROOT : ${{ github.workspace }}/src-${{ github.sha }} 
23+       CI_BUILD_ROOT : ${{ github.workspace }} 
24+       CI_USE_ENV : 1 
4125
4226    steps :
4327    - name : Compiler Cache Fixup 
4428      run : | 
4529        mkdir -p /home/runner/.ccache 
46- 
30+    
4731    - name : " CCache: Restore saved cache" 
4832      uses : actions/cache@v4 
4933      with :
@@ -53,108 +37,59 @@ jobs:
5337          ccache-micropython-${{ matrix.name }}-${{ github.ref }} 
5438          ccache-micropython-${{ matrix.name }}- 
5539
56- name : " Src:  Checkout" 
40+ name : " Checkout Project " 
5741      uses : actions/checkout@v4 
5842      with :
5943        submodules : true 
60-         path : src- ${{ github.sha  }}
44+         path : ${{ env.CI_PROJECT_ROOT  }} 
6145
62-     - name : " Pimoroni Pico: Checkout" 
63-       uses : actions/checkout@v4 
64-       with :
65-         repository : pimoroni/pimoroni-pico 
66-         ref : ${{env.PIMORONI_PICO_VERSION}} 
67-         submodules : true 
68-         path : pimoroni-pico 
69- 
70-     - name : Install Arm GNU Toolchain (arm-none-eabi-gcc) 
46+     - name : " Install Arm GNU Toolchain (arm-none-eabi-gcc)" 
7147      uses : carlosperate/arm-none-eabi-gcc-action@v1 
7248      with :
7349        release : ' 13.3.Rel1' 
7450
75-     - name : " CCache: Install" 
76-       run : | 
77-         source $BUILD_TOOLS 
78-         apt_install_build_deps 
79-        
80- name : " MicroPython: Checkout" 
81-       run : | 
82-         source $BUILD_TOOLS 
83-         micropython_clone 
84- 
85- name : " Py_Decl: Checkout" 
86-       uses : actions/checkout@v4 
87-       with :
88-         repository : gadgetoid/py_decl 
89-         ref : v0.0.4 
90-         path : py_decl 
91-         
92-     - name : " dir2uf2: Checkout" 
93-       uses : actions/checkout@v4 
94-       with :
95-         repository : gadgetoid/dir2uf2 
96-         ref : v0.0.10 
97-         path : dir2uf2 
98- 
99-     - name : " MicroPython: Build MPY Cross" 
51+     - name : " Prepare tools & dependencies" 
52+       shell : bash 
10053      run : | 
101-         source $BUILD_TOOLS 
102-         micropython_build_mpy_cross 
54+         source $CI_PROJECT_ROOT/ci/micropython.sh && ci_debug 
55+         mkdir -p $CI_BUILD_ROOT 
56+         ci_apt_install_build_deps 
57+         ci_prepare_all 
10358
10459name : " MicroPython: Configure" 
10560      shell : bash 
10661      run : | 
107-         source $BUILD_TOOLS  
62+         source $CI_PROJECT_ROOT/ci/micropython.sh && ci_debug  
10863        micropython_version 
109-         cmake_configure  
64+         ci_cmake_configure ${{ matrix.name }}  
11065
11166name : " MicroPython: Build" 
11267      shell : bash 
11368      run : | 
114-         source $BUILD_TOOLS 
115-         cmake_build 
116- 
117- name : " Py_Decl: Verify .uf2" 
118-       shell : bash 
119-       run : | 
120-         python3 py_decl/py_decl.py --to-json --verify build-${{ matrix.name }}/${{ env.RELEASE_FILE }}.uf2 
121- 
122- name : " dir2uf2: Append filesystem to .uf2" 
123-       shell : bash 
124-       run : | 
125-         python3 -m pip install littlefs-python==0.12.0 
126-         ./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}}/ 
69+         source $CI_PROJECT_ROOT/ci/micropython.sh && ci_debug 
70+         ci_cmake_build ${{ matrix.name }} 
12771
12872name : " Artifacts: Upload .uf2" 
12973      uses : actions/upload-artifact@v4 
13074      with :
131-         name : ${{ env.RELEASE_FILE  }}.uf2 
132-         path : build- ${{ matrix.name  }}/${{ env.RELEASE_FILE  }}.uf2
133- 
134-     - name : " Artifacts: Upload .uf2 with filesystem " 
75+         name : ${{ env.CI_RELEASE_FILENAME  }}.uf2 
76+         path : ${{ env.CI_BUILD_ROOT  }}/${{ env.CI_RELEASE_FILENAME  }}.uf2 
77+          
78+     - name : " Artifacts: Upload .uf2 (With Filesystem) " 
13579      uses : actions/upload-artifact@v4 
13680      with :
137-         name : ${{ env.RELEASE_FILE }}-with-filesystem.uf2 
138-         path : ${{ env.RELEASE_FILE }}-with-filesystem.uf2 
81+         if-no-files-found : ignore 
82+         name : ${{ env.CI_RELEASE_FILENAME }}-with-filesystem.uf2 
83+         path : ${{ env.CI_BUILD_ROOT }}/${{ env.CI_RELEASE_FILENAME }}-with-filesystem.uf2 
13984
14085    - name : " Release: Upload .uf2" 
14186      if : github.event_name == 'release' 
142-       uses : actions/upload-release-asset@v1 
143-       env :
144-         GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} 
87+       uses : softprops/action-gh-release@v1 
14588      with :
146-         asset_path : build-${{ matrix.name }}/${{ env.RELEASE_FILE }}.uf2 
147-         upload_url : ${{ github.event.release.upload_url }} 
148-         asset_name : ${{ env.RELEASE_FILE }}.uf2 
149-         asset_content_type : application/octet-stream 
89+         files : ${{ env.CI_BUILD_ROOT }}/${{ env.CI_RELEASE_FILENAME }}.uf2 
15090
151-     - name : " Release: Upload .uf2 with filesystem" 
152-       if : github.event_name == 'release' 
153-       uses : actions/upload-release-asset@v1 
154-       env :
155-         GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} 
91+     - name : " Release: Upload .uf2 (With Filesystem)" 
92+       if : ${{ github.event_name == 'release' && hashFiles('${{ env.CI_BUILD_ROOT }}/${{ env.CI_RELEASE_FILENAME }}-with-filesystem.uf2') != '' }} 
93+       uses : softprops/action-gh-release@v1 
15694      with :
157-         asset_path : ${{ env.RELEASE_FILE }}-with-filesystem.uf2 
158-         upload_url : ${{ github.event.release.upload_url }} 
159-         asset_name : ${{ env.RELEASE_FILE }}-with-filesystem.uf2 
160-         asset_content_type : application/octet-stream 
95+         files : ${{ env.CI_BUILD_ROOT }}/${{ env.CI_RELEASE_FILENAME }}-with-filesystem.uf2 
0 commit comments