From 2bda1749c2fa8dad45c7845b9ad2114288ae2a96 Mon Sep 17 00:00:00 2001 From: Pankaj Garg Date: Tue, 2 Nov 2021 05:47:30 -0700 Subject: [PATCH] Save Darwin framework test logs in artifacts (#11284) * Save Darwin framework test logs in artifacts * upload logs only on failure --- .github/workflows/darwin.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml index ad442b0c08e83c..ead897aa3e924e 100644 --- a/.github/workflows/darwin.yaml +++ b/.github/workflows/darwin.yaml @@ -112,6 +112,14 @@ jobs: - name: Run Framework Tests timeout-minutes: 10 run: | - ../../../out/debug/chip-all-clusters-app & - xcodebuild test -target "CHIP" -scheme "CHIP Framework Tests" -sdk macosx + mkdir -p /tmp/darwin/framework-tests + ../../../out/debug/chip-all-clusters-app > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) & + xcodebuild test -target "CHIP" -scheme "CHIP Framework Tests" -sdk macosx > >(tee /tmp/darwin/framework-tests/darwin-tests.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-err.log >&2) working-directory: src/darwin/Framework + - name: Uploading log files + uses: actions/upload-artifact@v2 + if: ${{ failure() }} && ${{ !env.ACT }} + with: + name: darwin-framework-test-logs + path: /tmp/darwin/framework-tests + retention-days: 5