From c36b08e74a089d15eee1fb7b4393e4407291e13c Mon Sep 17 00:00:00 2001 From: Pankaj Garg Date: Mon, 1 Nov 2021 13:14:50 -0700 Subject: [PATCH 1/2] Save Darwin framework test logs in artifacts --- .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..aad47f11b831b8 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: ${{ always() }} && ${{ !env.ACT }} + with: + name: darwin-framework-test-logs + path: /tmp/darwin/framework-tests + retention-days: 5 From 09cc1e058713f78e785bb48c185bd6a6243b70b2 Mon Sep 17 00:00:00 2001 From: Pankaj Garg Date: Mon, 1 Nov 2021 15:11:03 -0700 Subject: [PATCH 2/2] upload logs only on failure --- .github/workflows/darwin.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml index aad47f11b831b8..ead897aa3e924e 100644 --- a/.github/workflows/darwin.yaml +++ b/.github/workflows/darwin.yaml @@ -118,7 +118,7 @@ jobs: working-directory: src/darwin/Framework - name: Uploading log files uses: actions/upload-artifact@v2 - if: ${{ always() }} && ${{ !env.ACT }} + if: ${{ failure() }} && ${{ !env.ACT }} with: name: darwin-framework-test-logs path: /tmp/darwin/framework-tests