CI: Use name instead of board for build dir.

Disambiguate build dir between multiple firmwares that use the same board, but different config.

Avoids cryptic errors caused by incompatible build artifacts leaking into other builds via the MicroPython cache.
pull/756/head
Phil Howard 2023-04-24 11:34:08 +01:00
rodzic cb5dcb965e
commit a19f5943c3
1 zmienionych plików z 6 dodań i 6 usunięć

Wyświetl plik

@ -138,26 +138,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 +165,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 +173,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