Skip to content

Commit

Permalink
github: Defined a build failure logging step for the build-and-upload…
Browse files Browse the repository at this point in the history
… flows
  • Loading branch information
dragonmux committed Jul 23, 2024
1 parent d0a5554 commit 7b19f94
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build-and-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,15 @@ jobs:
path: src/artefacts/*
if-no-files-found: error

# Package and upload logs if the build fails so we can dissect why
- name: Upload failure logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: logs-firmware-${{ matrix.probe }}
path: ${{ github.workspace }}/build/meson-logs/*
retention-days: 5

package-firmware:
runs-on: ubuntu-latest
needs: build-firmware
Expand Down Expand Up @@ -208,6 +217,15 @@ jobs:
path: src/artefacts/*
if-no-files-found: error

# Package and upload logs if the build fails so we can dissect why
- name: Upload failure logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: logs-linux-${{ matrix.os.id }}-${{ matrix.compiler }}
path: ${{ github.workspace }}/build/meson-logs/*
retention-days: 5

build-windows-mingw:
# Name the job more appropriately so we can tell which windows and which MinGW ABI is in use
name: 'build-mingw (${{ matrix.os }}, ${{ matrix.sys.abi }})'
Expand Down Expand Up @@ -296,6 +314,15 @@ jobs:
path: src/artefacts/*
if-no-files-found: error

# Package and upload logs if the build fails so we can dissect why
- name: Upload failure logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: logs-${{ matrix.os }}-${{ matrix.sys.abi }}-${{ matrix.sys.compiler }}
path: ${{ github.workspace }}/build/meson-logs/*
retention-days: 5

build-macos:
# Name the job more appropriately so we can tell which Xcode/macOS version is in use
name: 'build-macos (${{ matrix.os.id }})'
Expand Down Expand Up @@ -359,3 +386,12 @@ jobs:
name: blackmagic_macos-${{ matrix.os.name }}
path: src/artefacts/*
if-no-files-found: error

# Package and upload logs if the build fails so we can dissect why
- name: Upload failure logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: logs-macos-${{ matrix.os.name }}
path: ${{ github.workspace }}/build/meson-logs/*
retention-days: 5

0 comments on commit 7b19f94

Please sign in to comment.