kopia lustrzana https://github.com/pimoroni/pimoroni-pico
Merge pull request #756 from pimoroni/ci/fix-caching
CI: Fix various build errors due to a caching race condition.pull/754/head^2
commit
5bfc0eba4c
|
@ -126,6 +126,12 @@ jobs:
|
|||
submodules: true
|
||||
path: pimoroni-pico-${{ github.sha }}
|
||||
|
||||
- name: "HACK: Revert Pico SDK Patch" # Avoid an already-patched MicroPython tree breaking our build
|
||||
shell: bash
|
||||
working-directory: micropython
|
||||
run: |
|
||||
git checkout lib/pico-sdk
|
||||
|
||||
- name: "HACK: Pico SDK Patch"
|
||||
if: matrix.patch == true
|
||||
shell: bash
|
||||
|
@ -138,26 +144,26 @@ jobs:
|
|||
shell: bash
|
||||
working-directory: micropython/ports/rp2
|
||||
run: |
|
||||
cmake -S . -B build-${{matrix.board}} -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
|
||||
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
|
||||
|
||||
- name: Configure MicroPython (Upstream Board Dir)
|
||||
if: matrix.local_board_dir != true
|
||||
shell: bash
|
||||
working-directory: micropython/ports/rp2
|
||||
run: |
|
||||
cmake -S . -B build-${{matrix.board}} -DPICO_BUILD_DOCS=0 -DUSER_C_MODULES=${{env.USER_C_MODULES}} -DMICROPY_BOARD=${{matrix.board}} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
cmake -S . -B build-${{matrix.name}} -DPICO_BUILD_DOCS=0 -DUSER_C_MODULES=${{env.USER_C_MODULES}} -DMICROPY_BOARD=${{matrix.board}} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
|
||||
- name: Build MicroPython
|
||||
shell: bash
|
||||
working-directory: micropython/ports/rp2
|
||||
run: |
|
||||
ccache --zero-stats || true
|
||||
cmake --build build-${{matrix.board}} -j 2
|
||||
cmake --build build-${{matrix.name}} -j 2
|
||||
ccache --show-stats || true
|
||||
|
||||
- name: Rename .uf2 for artifact
|
||||
shell: bash
|
||||
working-directory: micropython/ports/rp2/build-${{matrix.board}}
|
||||
working-directory: micropython/ports/rp2/build-${{matrix.name}}
|
||||
run: |
|
||||
cp firmware.uf2 $RELEASE_FILE.uf2
|
||||
|
||||
|
@ -165,7 +171,7 @@ jobs:
|
|||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{env.RELEASE_FILE}}.uf2
|
||||
path: micropython/ports/rp2/build-${{matrix.board}}/${{env.RELEASE_FILE}}.uf2
|
||||
path: micropython/ports/rp2/build-${{matrix.name}}/${{env.RELEASE_FILE}}.uf2
|
||||
|
||||
- name: Upload .uf2
|
||||
if: github.event_name == 'release'
|
||||
|
@ -173,7 +179,7 @@ jobs:
|
|||
env:
|
||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
with:
|
||||
asset_path: micropython/ports/rp2/build-${{matrix.board}}/firmware.uf2
|
||||
asset_path: micropython/ports/rp2/build-${{matrix.name}}/firmware.uf2
|
||||
upload_url: ${{github.event.release.upload_url}}
|
||||
asset_name: ${{env.RELEASE_FILE}}.uf2
|
||||
asset_content_type: application/octet-stream
|
||||
|
|
Ładowanie…
Reference in New Issue