From 16074927e41dd22ffd328d50a114ef20e56dfa76 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 22 Sep 2021 23:27:59 -0400 Subject: [PATCH] Upload diagnostic logs on Darwin if the build+unit-test task fails. (#9891) This might allow us some slightly better visibility into unit test crashes on Darwin. --- .github/workflows/build.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2374ec38d1060c..8292a496f34efd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -257,6 +257,9 @@ jobs: submodules: true - name: Setup Environment run: brew install openssl pkg-config + - name: Try to ensure the directory for diagnostic log collection exists + run: | + mkdir -p ~/Library/Logs/DiagnosticReports || true - name: Fix pkgconfig link working-directory: /usr/local/lib/pkgconfig run: | @@ -292,6 +295,12 @@ jobs: scripts/build/gn_build.sh scripts/tests/gn_tests.sh done + - name: Uploading diagnostic logs + uses: actions/upload-artifact@v2 + if: ${{ failure() }} && ${{ !env.ACT }} + with: + name: crash-log-darwin + path: ~/Library/Logs/DiagnosticReports/ # TODO Log Upload https://github.com/project-chip/connectedhomeip/issues/2227 # TODO https://github.com/project-chip/connectedhomeip/issues/1512 # - name: Run Code Coverage