From 90a1f009af9deebecfa7c40397f25b32886a07ff Mon Sep 17 00:00:00 2001 From: kvikrambhat Date: Thu, 30 Jun 2022 18:05:20 +0530 Subject: [PATCH] 1.test.yaml restyled --- .github/workflows/tests.yaml | 701 +++++++++++++++++------------------ 1 file changed, 345 insertions(+), 356 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 72fc925d80c3dc..3e98a525445ce4 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -15,378 +15,367 @@ name: Tests on: - push: - pull_request: - workflow_dispatch: + push: + pull_request: + workflow_dispatch: concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == - 'pull_request' && github.event.number) || (github.event_name == - 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == + 'pull_request' && github.event.number) || (github.event_name == + 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true jobs: - test_suites_linux: - name: Test Suites - Linux - timeout-minutes: 145 + test_suites_linux: + name: Test Suites - Linux + timeout-minutes: 145 - strategy: - matrix: - build_variant: [no-ble-tsan-clang] - chip_tool: [""] - env: - BUILD_VARIANT: ${{matrix.build_variant}} - CHIP_TOOL_VARIANT: ${{matrix.chip_tool}} - TSAN_OPTIONS: "halt_on_error=1 suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt" + strategy: + matrix: + build_variant: [no-ble-tsan-clang] + chip_tool: [""] + env: + BUILD_VARIANT: ${{matrix.build_variant}} + CHIP_TOOL_VARIANT: ${{matrix.chip_tool}} + TSAN_OPTIONS: "halt_on_error=1 suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt" - if: github.actor != 'restyled-io[bot]' - runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + runs-on: ubuntu-latest - container: - image: connectedhomeip/chip-build:0.5.79 - options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 - net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" + container: + image: connectedhomeip/chip-build:0.5.79 + options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 + net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" - steps: - - uses: Wandalen/wretry.action@v1.0.15 - name: Checkout - with: - action: actions/checkout@v3 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform linux - - name: Try to ensure the directories for core dumping exist and we - can write them. - run: | - mkdir /tmp/cores || true - sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true - mkdir objdir-clone || true - - name: Bootstrap - timeout-minutes: 10 - run: scripts/build/gn_bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v2 - if: ${{ always() }} && ${{ !env.ACT }} - with: - name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log - - name: Build Apps - timeout-minutes: 45 - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT} \ - --target linux-x64-all-clusters-${BUILD_VARIANT} \ - --target linux-x64-lock-${BUILD_VARIANT} \ - --target linux-x64-ota-provider-${BUILD_VARIANT} \ - --target linux-x64-ota-requestor-${BUILD_VARIANT} \ - --target linux-x64-tv-app-${BUILD_VARIANT} \ - build \ - --copy-artifacts-to objdir-clone \ - " - - name: Run Tests - timeout-minutes: 65 - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/tests/run_test_suite.py \ - --chip-tool ./out/linux-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \ - run \ - --iterations 1 \ - --test-timeout-seconds 120 \ - --all-clusters-app ./out/linux-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ - --lock-app ./out/linux-x64-lock-${BUILD_VARIANT}/chip-lock-app \ - --ota-provider-app ./out/linux-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \ - --ota-requestor-app ./out/linux-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ - --tv-app ./out/linux-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \ - " - - name: Uploading core files - uses: actions/upload-artifact@v2 - if: ${{ failure() }} && ${{ !env.ACT }} - with: - name: crash-core-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: /tmp/cores/ - # Cores are big; don't hold on to them too long. - retention-days: 5 - - name: Uploading objdir for debugging - uses: actions/upload-artifact@v2 - if: ${{ failure() }} && ${{ !env.ACT }} - with: - name: crash-objdir-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: objdir-clone/ - # objdirs are big; don't hold on to them too long. - retention-days: 5 - test_suites_darwin: - name: Test Suites - Darwin - timeout-minutes: 150 + steps: + - uses: Wandalen/wretry.action@v1.0.15 + name: Checkout + with: + action: actions/checkout@v3 + with: | + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 + - name: Checkout submodules + run: scripts/checkout_submodules.py --shallow --platform linux + - name: Try to ensure the directories for core dumping exist and we + can write them. + run: | + mkdir /tmp/cores || true + sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true + mkdir objdir-clone || true + - name: Bootstrap + timeout-minutes: 10 + run: scripts/build/gn_bootstrap.sh + - name: Uploading bootstrap logs + uses: actions/upload-artifact@v2 + if: ${{ always() }} && ${{ !env.ACT }} + with: + name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} + path: | + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log + - name: Build Apps + timeout-minutes: 45 + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT} \ + --target linux-x64-all-clusters-${BUILD_VARIANT} \ + --target linux-x64-lock-${BUILD_VARIANT} \ + --target linux-x64-ota-provider-${BUILD_VARIANT} \ + --target linux-x64-ota-requestor-${BUILD_VARIANT} \ + --target linux-x64-tv-app-${BUILD_VARIANT} \ + build \ + --copy-artifacts-to objdir-clone \ + " + - name: Run Tests + timeout-minutes: 65 + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/tests/run_test_suite.py \ + --chip-tool ./out/linux-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \ + run \ + --iterations 1 \ + --test-timeout-seconds 120 \ + --all-clusters-app ./out/linux-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ + --lock-app ./out/linux-x64-lock-${BUILD_VARIANT}/chip-lock-app \ + --ota-provider-app ./out/linux-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \ + --ota-requestor-app ./out/linux-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ + --tv-app ./out/linux-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \ + " + - name: Uploading core files + uses: actions/upload-artifact@v2 + if: ${{ failure() }} && ${{ !env.ACT }} + with: + name: crash-core-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} + path: /tmp/cores/ + # Cores are big; don't hold on to them too long. + retention-days: 5 + - name: Uploading objdir for debugging + uses: actions/upload-artifact@v2 + if: ${{ failure() }} && ${{ !env.ACT }} + with: + name: crash-objdir-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} + path: objdir-clone/ + # objdirs are big; don't hold on to them too long. + retention-days: 5 + test_suites_darwin: + name: Test Suites - Darwin + timeout-minutes: 150 - strategy: - matrix: - build_variant: [no-ble-tsan-clang, no-ble-asan-clang] - chip_tool: [""] - env: - BUILD_VARIANT: ${{matrix.build_variant}} - CHIP_TOOL_VARIANT: ${{matrix.chip_tool}} - TSAN_OPTIONS: "halt_on_error=1" + strategy: + matrix: + build_variant: [no-ble-tsan-clang, no-ble-asan-clang] + chip_tool: [""] + env: + BUILD_VARIANT: ${{matrix.build_variant}} + CHIP_TOOL_VARIANT: ${{matrix.chip_tool}} + TSAN_OPTIONS: "halt_on_error=1" - if: github.actor != 'restyled-io[bot]' - runs-on: macos-latest + if: github.actor != 'restyled-io[bot]' + runs-on: macos-latest - steps: - - uses: Wandalen/wretry.action@v1.0.15 - name: Checkout - with: - action: actions/checkout@v3 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform darwin - - name: Setup Environment - # coreutils for stdbuf - run: brew install openssl pkg-config coreutils - - name: - Try to ensure the directories for core dumping and diagnostic - log collection exist and we can write them. - run: | - sudo chown ${USER} /cores || true - mkdir -p ~/Library/Logs/DiagnosticReports || true - mkdir objdir-clone || true - - name: Fix pkgconfig link - working-directory: /usr/local/lib/pkgconfig - run: | - pwd - ls -la /usr/local/Cellar/ - ls -la /usr/local/Cellar/openssl@1.1 - OPEN_SSL_VERSION=`ls -la /usr/local/Cellar/openssl@1.1 | cat | tail -n1 | awk '{print $NF}'` - ln -s /usr/local/Cellar/openssl@1.1/$OPEN_SSL_VERSION/lib/pkgconfig/* . - - name: Bootstrap - timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v2 - if: ${{ always() }} && ${{ !env.ACT }} - with: - name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log - - name: Build Apps - timeout-minutes: 40 - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target darwin-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT} \ - --target darwin-x64-all-clusters-${BUILD_VARIANT} \ - --target darwin-x64-lock-${BUILD_VARIANT} \ - --target darwin-x64-ota-provider-${BUILD_VARIANT} \ - --target darwin-x64-ota-requestor-${BUILD_VARIANT} \ - --target darwin-x64-tv-app-${BUILD_VARIANT} \ - build \ - --copy-artifacts-to objdir-clone \ - " - - name: Run Tests - timeout-minutes: 80 - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/tests/run_test_suite.py \ - --chip-tool ./out/darwin-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \ - --target-skip-glob '{TestGroupMessaging,Test_TC_DIAG_TH_NW_2_1,Test_TC_DIAG_TH_NW_2_2,Test_TC_DIAG_TH_NW_2_3,Test_TC_DIAG_TH_NW_2_4}' \ - run \ - --iterations 1 \ - --test-timeout-seconds 120 \ - --all-clusters-app ./out/darwin-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ - --lock-app ./out/darwin-x64-lock-${BUILD_VARIANT}/chip-lock-app \ - --ota-provider-app ./out/darwin-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \ - --ota-requestor-app ./out/darwin-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ - --tv-app ./out/darwin-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \ - " - - name: Uploading core files - uses: actions/upload-artifact@v2 - if: ${{ failure() }} && ${{ !env.ACT }} - with: - name: crash-core-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: /cores/ - # Cores are big; don't hold on to them too long. - retention-days: 5 - - name: Uploading diagnostic logs - uses: actions/upload-artifact@v2 - if: ${{ failure() }} && ${{ !env.ACT }} - with: - name: crash-log-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: ~/Library/Logs/DiagnosticReports/ - - name: Uploading objdir for debugging - uses: actions/upload-artifact@v2 - if: ${{ failure() }} && ${{ !env.ACT }} - with: - name: crash-objdir-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: objdir-clone/ - # objdirs are big; don't hold on to them too long. - retention-days: 5 - repl_tests_linux: - name: REPL Tests - Linux - timeout-minutes: 130 + steps: + - uses: Wandalen/wretry.action@v1.0.15 + name: Checkout + with: + action: actions/checkout@v3 + with: | + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 + - name: Checkout submodules + run: scripts/checkout_submodules.py --shallow --platform darwin + - name: Setup Environment + # coreutils for stdbuf + run: brew install openssl pkg-config coreutils + - name: Try to ensure the directories for core dumping and diagnostic + log collection exist and we can write them. + run: | + sudo chown ${USER} /cores || true + mkdir -p ~/Library/Logs/DiagnosticReports || true + mkdir objdir-clone || true + - name: Fix pkgconfig link + working-directory: /usr/local/lib/pkgconfig + run: | + pwd + ls -la /usr/local/Cellar/ + ls -la /usr/local/Cellar/openssl@1.1 + OPEN_SSL_VERSION=`ls -la /usr/local/Cellar/openssl@1.1 | cat | tail -n1 | awk '{print $NF}'` + ln -s /usr/local/Cellar/openssl@1.1/$OPEN_SSL_VERSION/lib/pkgconfig/* . + - name: Bootstrap + timeout-minutes: 25 + run: scripts/build/gn_bootstrap.sh + - name: Uploading bootstrap logs + uses: actions/upload-artifact@v2 + if: ${{ always() }} && ${{ !env.ACT }} + with: + name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} + path: | + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log + - name: Build Apps + timeout-minutes: 40 + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target darwin-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT} \ + --target darwin-x64-all-clusters-${BUILD_VARIANT} \ + --target darwin-x64-lock-${BUILD_VARIANT} \ + --target darwin-x64-ota-provider-${BUILD_VARIANT} \ + --target darwin-x64-ota-requestor-${BUILD_VARIANT} \ + --target darwin-x64-tv-app-${BUILD_VARIANT} \ + build \ + --copy-artifacts-to objdir-clone \ + " + - name: Run Tests + timeout-minutes: 80 + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/tests/run_test_suite.py \ + --chip-tool ./out/darwin-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \ + --target-skip-glob '{TestGroupMessaging,Test_TC_DIAG_TH_NW_2_1,Test_TC_DIAG_TH_NW_2_2,Test_TC_DIAG_TH_NW_2_3,Test_TC_DIAG_TH_NW_2_4}' \ + run \ + --iterations 1 \ + --test-timeout-seconds 120 \ + --all-clusters-app ./out/darwin-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ + --lock-app ./out/darwin-x64-lock-${BUILD_VARIANT}/chip-lock-app \ + --ota-provider-app ./out/darwin-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \ + --ota-requestor-app ./out/darwin-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ + --tv-app ./out/darwin-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \ + " + - name: Uploading core files + uses: actions/upload-artifact@v2 + if: ${{ failure() }} && ${{ !env.ACT }} + with: + name: crash-core-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} + path: /cores/ + # Cores are big; don't hold on to them too long. + retention-days: 5 + - name: Uploading diagnostic logs + uses: actions/upload-artifact@v2 + if: ${{ failure() }} && ${{ !env.ACT }} + with: + name: crash-log-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} + path: ~/Library/Logs/DiagnosticReports/ + - name: Uploading objdir for debugging + uses: actions/upload-artifact@v2 + if: ${{ failure() }} && ${{ !env.ACT }} + with: + name: crash-objdir-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} + path: objdir-clone/ + # objdirs are big; don't hold on to them too long. + retention-days: 5 + repl_tests_linux: + name: REPL Tests - Linux + timeout-minutes: 130 - env: - TSAN_OPTIONS: "halt_on_error=1 suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt" + env: + TSAN_OPTIONS: "halt_on_error=1 suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt" - if: github.actor != 'restyled-io[bot]' - runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + runs-on: ubuntu-latest - container: - image: connectedhomeip/chip-build:0.5.79 - options: - --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 - net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" + container: + image: connectedhomeip/chip-build:0.5.79 + options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 + net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform linux - - name: - Try to ensure the directories for core dumping exist and we - can write them. - run: | - mkdir /tmp/cores || true - sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true - mkdir objdir-clone || true - - name: Bootstrap - timeout-minutes: 10 - run: scripts/build/gn_bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v2 - if: ${{ always() }} && ${{ !env.ACT }} - with: - name: - bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log - - name: Build Python REPL and example apps - timeout-minutes: 50 - run: | - scripts/run_in_build_env.sh './scripts/build_python.sh --install_wheel build-env' - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-all-clusters-no-ble-no-wifi-tsan-clang-test \ - --target linux-x64-python-bindings \ - build \ - --copy-artifacts-to objdir-clone \ - " - - name: Run Tests - timeout-minutes: 40 - run: | - scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --script-args "--log-level INFO -t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout"' - - name: Uploading core files - uses: actions/upload-artifact@v2 - if: ${{ failure() }} && ${{ !env.ACT }} - with: - name: - crash-core-linux-python-repl - path: /tmp/cores/ - # Cores are big; don't hold on to them too long. - retention-days: 5 - - name: Uploading objdir for debugging - uses: actions/upload-artifact@v2 - if: ${{ failure() }} && ${{ !env.ACT }} - with: - name: - crash-objdir-linux-python-repl - path: objdir-clone/ - # objdirs are big; don't hold on to them too long. - retention-days: 5 + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Checkout submodules + run: scripts/checkout_submodules.py --shallow --platform linux + - name: Try to ensure the directories for core dumping exist and we + can write them. + run: | + mkdir /tmp/cores || true + sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true + mkdir objdir-clone || true + - name: Bootstrap + timeout-minutes: 10 + run: scripts/build/gn_bootstrap.sh + - name: Uploading bootstrap logs + uses: actions/upload-artifact@v2 + if: ${{ always() }} && ${{ !env.ACT }} + with: + name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} + path: | + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log + - name: Build Python REPL and example apps + timeout-minutes: 50 + run: | + scripts/run_in_build_env.sh './scripts/build_python.sh --install_wheel build-env' + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-all-clusters-no-ble-no-wifi-tsan-clang-test \ + --target linux-x64-python-bindings \ + build \ + --copy-artifacts-to objdir-clone \ + " + - name: Run Tests + timeout-minutes: 40 + run: | + scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --script-args "--log-level INFO -t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout"' + - name: Uploading core files + uses: actions/upload-artifact@v2 + if: ${{ failure() }} && ${{ !env.ACT }} + with: + name: crash-core-linux-python-repl + path: /tmp/cores/ + # Cores are big; don't hold on to them too long. + retention-days: 5 + - name: Uploading objdir for debugging + uses: actions/upload-artifact@v2 + if: ${{ failure() }} && ${{ !env.ACT }} + with: + name: crash-objdir-linux-python-repl + path: objdir-clone/ + # objdirs are big; don't hold on to them too long. + retention-days: 5 - repl_tests_darwin: - name: REPL Tests - Darwin - timeout-minutes: 120 + repl_tests_darwin: + name: REPL Tests - Darwin + timeout-minutes: 120 - strategy: - matrix: - build_variant: [no-ble-no-wifi-tsan-clang] - env: - BUILD_VARIANT: ${{matrix.build_variant}} - TSAN_OPTIONS: "halt_on_error=1" + strategy: + matrix: + build_variant: [no-ble-no-wifi-tsan-clang] + env: + BUILD_VARIANT: ${{matrix.build_variant}} + TSAN_OPTIONS: "halt_on_error=1" - if: github.actor != 'restyled-io[bot]' && false - runs-on: macos-latest + if: github.actor != 'restyled-io[bot]' && false + runs-on: macos-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform darwin - - name: Setup Environment - # coreutils for stdbuf - run: brew install openssl pkg-config coreutils - - name: - Try to ensure the directories for core dumping and diagnostic - log collection exist and we can write them. - run: | - sudo chown ${USER} /cores || true - mkdir -p ~/Library/Logs/DiagnosticReports || true - mkdir objdir-clone || true - - name: Fix pkgconfig link - working-directory: /usr/local/lib/pkgconfig - run: | - pwd - ls -la /usr/local/Cellar/ - ls -la /usr/local/Cellar/openssl@1.1 - OPEN_SSL_VERSION=`ls -la /usr/local/Cellar/openssl@1.1 | cat | tail -n1 | awk '{print $NF}'` - ln -s /usr/local/Cellar/openssl@1.1/$OPEN_SSL_VERSION/lib/pkgconfig/* . - - name: Bootstrap - timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v2 - if: ${{ always() }} && ${{ !env.ACT }} - with: - name: - bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log - - name: Build Python REPL and example apps - timeout-minutes: 50 - run: | - scripts/run_in_build_env.sh './scripts/build_python.sh --install_wheel build-env' - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target darwin-x64-all-clusters-${BUILD_VARIANT}-test \ - build \ - --copy-artifacts-to objdir-clone \ - " - - name: Run Tests - timeout-minutes: 30 - run: | - scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/darwin-x64-all-clusters-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 3840 --interface-id -1" --script-args "-t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout"' - - name: Uploading core files - uses: actions/upload-artifact@v2 - if: ${{ failure() }} && ${{ !env.ACT }} - with: - name: - crash-core-darwin-python-repl - path: /cores/ - # Cores are big; don't hold on to them too long. - retention-days: 5 - - name: Uploading diagnostic logs - uses: actions/upload-artifact@v2 - if: ${{ failure() }} && ${{ !env.ACT }} - with: - name: - crash-log-darwin-python-repl - path: ~/Library/Logs/DiagnosticReports/ - - name: Uploading objdir for debugging - uses: actions/upload-artifact@v2 - if: ${{ failure() }} && ${{ !env.ACT }} - with: - name: - crash-objdir-darwin-python-repl - path: objdir-clone/ - # objdirs are big; don't hold on to them too long. - retention-days: 5 + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Checkout submodules + run: scripts/checkout_submodules.py --shallow --platform darwin + - name: Setup Environment + # coreutils for stdbuf + run: brew install openssl pkg-config coreutils + - name: Try to ensure the directories for core dumping and diagnostic + log collection exist and we can write them. + run: | + sudo chown ${USER} /cores || true + mkdir -p ~/Library/Logs/DiagnosticReports || true + mkdir objdir-clone || true + - name: Fix pkgconfig link + working-directory: /usr/local/lib/pkgconfig + run: | + pwd + ls -la /usr/local/Cellar/ + ls -la /usr/local/Cellar/openssl@1.1 + OPEN_SSL_VERSION=`ls -la /usr/local/Cellar/openssl@1.1 | cat | tail -n1 | awk '{print $NF}'` + ln -s /usr/local/Cellar/openssl@1.1/$OPEN_SSL_VERSION/lib/pkgconfig/* . + - name: Bootstrap + timeout-minutes: 25 + run: scripts/build/gn_bootstrap.sh + - name: Uploading bootstrap logs + uses: actions/upload-artifact@v2 + if: ${{ always() }} && ${{ !env.ACT }} + with: + name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} + path: | + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log + - name: Build Python REPL and example apps + timeout-minutes: 50 + run: | + scripts/run_in_build_env.sh './scripts/build_python.sh --install_wheel build-env' + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target darwin-x64-all-clusters-${BUILD_VARIANT}-test \ + build \ + --copy-artifacts-to objdir-clone \ + " + - name: Run Tests + timeout-minutes: 30 + run: | + scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/darwin-x64-all-clusters-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 3840 --interface-id -1" --script-args "-t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout"' + - name: Uploading core files + uses: actions/upload-artifact@v2 + if: ${{ failure() }} && ${{ !env.ACT }} + with: + name: crash-core-darwin-python-repl + path: /cores/ + # Cores are big; don't hold on to them too long. + retention-days: 5 + - name: Uploading diagnostic logs + uses: actions/upload-artifact@v2 + if: ${{ failure() }} && ${{ !env.ACT }} + with: + name: crash-log-darwin-python-repl + path: ~/Library/Logs/DiagnosticReports/ + - name: Uploading objdir for debugging + uses: actions/upload-artifact@v2 + if: ${{ failure() }} && ${{ !env.ACT }} + with: + name: crash-objdir-darwin-python-repl + path: objdir-clone/ + # objdirs are big; don't hold on to them too long. + retention-days: 5