CI: Ignore non-existent with-filesystem builds.
Move file rename busywork into micropython.sh.
This commit is contained in:
parent
c9f5a28cd4
commit
4da946a4ca
29
.github/workflows/micropython.yml
vendored
29
.github/workflows/micropython.yml
vendored
@ -23,7 +23,7 @@ jobs:
|
||||
|
||||
env:
|
||||
# MicroPython version will be contained in github.event.release.tag_name for releases
|
||||
RELEASE_FILE: ${{ matrix.name }}-${{ github.event.release.tag_name || github.sha }}-micropython
|
||||
CI_RELEASE_FILENAME: ${{ matrix.name }}-${{ github.event.release.tag_name || github.sha }}-micropython
|
||||
CI_PROJECT_ROOT: ${{ github.workspace }}/src-${{ github.sha }}
|
||||
CI_BUILD_ROOT: ${{ github.workspace }}
|
||||
CI_USE_ENV: 1
|
||||
@ -75,29 +75,28 @@ jobs:
|
||||
python3 -m venv "$CI_BUILD_ROOT/.dir2uf2"
|
||||
source "$CI_BUILD_ROOT/.dir2uf2/bin/activate"
|
||||
ci_cmake_build ${{ matrix.name }}
|
||||
mv "$CI_BUILD_ROOT/${{ matrix.name }}.uf2" "$CI_BUILD_ROOT/$RELEASE_FILE.uf2"
|
||||
mv "$CI_BUILD_ROOT/${{ matrix.name }}-with-filesystem.uf2" "$CI_BUILD_ROOT/$RELEASE_FILE-with-filesystem.uf2"
|
||||
|
||||
- name: "Artifacts: Upload .uf2"
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.RELEASE_FILE }}.uf2
|
||||
path: ${{ env.CI_BUILD_ROOT }}/${{ env.RELEASE_FILE }}.uf2
|
||||
name: ${{ env.CI_RELEASE_FILENAME }}.uf2
|
||||
path: ${{ env.CI_BUILD_ROOT }}/${{ env.CI_RELEASE_FILENAME }}.uf2
|
||||
|
||||
- name: "Release: Upload .uf2"
|
||||
if: github.event_name == 'release'
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: ${{ env.CI_BUILD_ROOT }}/${{ env.CI_RELEASE_FILENAME }}.uf2
|
||||
|
||||
- name: "Artifacts: Upload .uf2 (With Filesystem)"
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.RELEASE_FILE }}-with-filesystem.uf2
|
||||
path: ${{ env.CI_BUILD_ROOT }}/${{ env.RELEASE_FILE }}-with-filesystem.uf2
|
||||
|
||||
- name: "Release: Upload .uf2"
|
||||
if: github.event_name == 'release'
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: ${{ env.CI_BUILD_ROOT }}/${{ env.RELEASE_FILE }}.uf2
|
||||
if-no-files-found: ignore
|
||||
name: ${{ env.CI_RELEASE_FILENAME }}-with-filesystem.uf2
|
||||
path: ${{ env.CI_BUILD_ROOT }}/${{ env.CI_RELEASE_FILENAME }}-with-filesystem.uf2
|
||||
|
||||
- name: "Release: Upload .uf2 (With Filesystem)"
|
||||
if: github.event_name == 'release'
|
||||
uses: softprops/action-gh-release@v1
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: ${{ env.CI_BUILD_ROOT }}/${{ env.RELEASE_FILE }}-with-filesystem.uf2
|
||||
files: ${{ env.CI_BUILD_ROOT }}/${{ env.CI_RELEASE_FILENAME }}-with-filesystem.uf2
|
||||
@ -118,12 +118,16 @@ function ci_cmake_build {
|
||||
cmake --build $BUILD_DIR -j 2
|
||||
ccache --show-stats || true
|
||||
|
||||
log_inform "Copying .uf2 to $(pwd)/$BOARD.uf2"
|
||||
cp "$BUILD_DIR/firmware.uf2" $BOARD.uf2
|
||||
if [ -z ${CI_RELEASE_FILENAME+x} ]; then
|
||||
$CI_RELEASE_FILENAME=$BOARD
|
||||
fi
|
||||
|
||||
log_inform "Copying .uf2 to $(pwd)/$CI_RELEASE_FILENAME.uf2"
|
||||
cp "$BUILD_DIR/firmware.uf2" $CI_RELEASE_FILENAME.uf2
|
||||
|
||||
if [ -f "$BUILD_DIR/firmware-with-filesystem.uf2" ]; then
|
||||
log_inform "Copying -with-filesystem .uf2 to $(pwd)/$BOARD-with-filesystem.uf2"
|
||||
cp "$BUILD_DIR/firmware-with-filesystem.uf2" $BOARD-with-filesystem.uf2
|
||||
log_inform "Copying -with-filesystem .uf2 to $(pwd)/$CI_RELEASE_FILENAME-with-filesystem.uf2"
|
||||
cp "$BUILD_DIR/firmware-with-filesystem.uf2" $CI_RELEASE_FILENAME-with-filesystem.uf2
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user