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 2607ab3 commit 8e60d06
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 @@ -209,6 +218,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 @@ -297,6 +315,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 @@ -360,3 +387,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 8e60d06

Please sign in to comment.