diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 08c5d30f3beaeb..5553cccdfbc611 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -28,6 +28,10 @@ jobs: name: Test Suites - Linux timeout-minutes: 60 + strategy: + matrix: + type: [debug, tsan] + if: github.actor != 'restyled-io[bot]' runs-on: ubuntu-latest @@ -54,25 +58,37 @@ jobs: uses: actions/upload-artifact@v2 if: ${{ always() }} with: - name: bootstrap-logs + name: bootstrap-logs-${{ matrix.type }} path: | .environment/gn_out/.ninja_log .environment/pigweed-venv/*.log - name: Build all clusters app timeout-minutes: 5 run: | - scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug/standalone/ chip_config_network_layer_ble=false + case ${{ matrix.type }} in + "debug") GN_ARGS='is_tsan=false';; + "tsan") GN_ARGS='is_tsan=true';; + *) ;; + esac + + scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug/standalone/ chip_config_network_layer_ble=false "$GN_ARGS" - name: Build chip-tool timeout-minutes: 5 run: | - scripts/examples/gn_build_example.sh examples/chip-tool out/debug/standalone/ + case ${{ matrix.type }} in + "debug") GN_ARGS='is_tsan=false';; + "tsan") GN_ARGS='is_tsan=true';; + *) ;; + esac + + scripts/examples/gn_build_example.sh examples/chip-tool out/debug/standalone/ "$GN_ARGS" - name: Copy objdir run: | # The idea is to not upload our objdir unless builds have # actually succeeded, because that just wastes space. rsync -a out/debug/standalone/ objdir-clone || true - name: Run Tests - timeout-minutes: 5 + timeout-minutes: 10 run: | ifconfig -a scripts/tests/test_suites.sh @@ -80,7 +96,7 @@ jobs: uses: actions/upload-artifact@v2 if: ${{ failure() }} with: - name: crash-core-linux + name: crash-core-linux-${{ matrix.type }} path: /tmp/cores/ # Cores are big; don't hold on to them too long. retention-days: 5 @@ -88,7 +104,7 @@ jobs: uses: actions/upload-artifact@v2 if: ${{ failure() }} with: - name: crash-objdir-linux + name: crash-objdir-linux-${{ matrix.type }} path: objdir-clone/ # objdirs are big; don't hold on to them too long. retention-days: 5 @@ -96,6 +112,10 @@ jobs: name: Test Suites - Darwin timeout-minutes: 60 + strategy: + matrix: + type: [debug, tsan] + if: github.actor != 'restyled-io[bot]' runs-on: macos-latest @@ -127,32 +147,44 @@ jobs: uses: actions/upload-artifact@v2 if: ${{ always() }} with: - name: bootstrap-logs + name: bootstrap-logs-${{ matrix.type }} path: | .environment/gn_out/.ninja_log .environment/pigweed-venv/*.log - name: Run Build Test Server timeout-minutes: 5 run: | - scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug/standalone/ chip_config_network_layer_ble=false + case ${{ matrix.type }} in + "debug") GN_ARGS='is_tsan=false';; + "tsan") GN_ARGS='is_tsan=true';; + *) ;; + esac + + scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug/standalone/ chip_config_network_layer_ble=false "$GN_ARGS" - name: Build chip-tool timeout-minutes: 5 run: | - scripts/examples/gn_build_example.sh examples/chip-tool out/debug/standalone/ + case ${{ matrix.type }} in + "debug") GN_ARGS='is_tsan=false';; + "tsan") GN_ARGS='is_tsan=true';; + *) ;; + esac + + scripts/examples/gn_build_example.sh examples/chip-tool out/debug/standalone/ "$GN_ARGS" - name: Copy objdir run: | # The idea is to not upload our objdir unless builds have # actually succeeded, because that just wastes space. rsync -a out/debug/standalone/ objdir-clone || true - name: Run Test Suites - timeout-minutes: 5 + timeout-minutes: 10 run: | scripts/tests/test_suites.sh - name: Uploading core files uses: actions/upload-artifact@v2 if: ${{ failure() }} with: - name: crash-core-darwin + name: crash-core-darwin-${{ matrix.type }} path: /cores/ # Cores are big; don't hold on to them too long. retention-days: 5 @@ -160,13 +192,13 @@ jobs: uses: actions/upload-artifact@v2 if: ${{ failure() }} with: - name: crash-log-darwin + name: crash-log-darwin-${{ matrix.type }} path: ~/Library/Logs/DiagnosticReports/ - name: Uploading objdir for debugging uses: actions/upload-artifact@v2 if: ${{ failure() }} with: - name: crash-objdir-darwin + name: crash-objdir-darwin-${{ matrix.type }} path: objdir-clone/ # objdirs are big; don't hold on to them too long. retention-days: 5