From a699310c741717f994705efac7b934ea0c9b9db3 Mon Sep 17 00:00:00 2001 From: blozano-tt Date: Wed, 23 Oct 2024 14:58:15 -0700 Subject: [PATCH 1/7] #0: Trigger all-post-commit-workflows with PR comment --- .../workflows/all-post-commit-workflows.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/all-post-commit-workflows.yaml b/.github/workflows/all-post-commit-workflows.yaml index f07f6b7dcbb..a35811eb63e 100644 --- a/.github/workflows/all-post-commit-workflows.yaml +++ b/.github/workflows/all-post-commit-workflows.yaml @@ -15,6 +15,8 @@ on: - CI push: branches: ["main"] + issue_comment: + types: [created] permissions: actions: read @@ -26,9 +28,11 @@ permissions: jobs: static-checks: + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} uses: ./.github/workflows/all-static-checks.yaml secrets: inherit build-wheels: + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-artifact strategy: matrix: @@ -43,22 +47,26 @@ jobs: from-precompiled: true secrets: inherit test-wheels: + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-wheels uses: ./.github/workflows/_test-wheels-impl.yaml with: from-precompiled: true secrets: inherit build-docker-image-2004: + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} uses: ./.github/workflows/build-docker-artifact.yaml secrets: inherit with: os: ubuntu-20.04-amd64 build-docker-image-2204: + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} uses: ./.github/workflows/build-docker-artifact.yaml secrets: inherit with: os: ubuntu-22.04-amd64 build-artifact: + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-docker-image-2004 uses: ./.github/workflows/build-artifact.yaml secrets: inherit @@ -66,6 +74,7 @@ jobs: build-docker: false build-type: ${{ inputs.build-type || 'Release' }} build-artifact-profiler: + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-docker-image-2004 uses: ./.github/workflows/build-artifact.yaml with: @@ -75,6 +84,7 @@ jobs: secrets: inherit # UMD Unit Tests umd-unit-tests: + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} secrets: inherit strategy: fail-fast: false @@ -90,6 +100,7 @@ jobs: runner-label: ${{ matrix.test-group.runner-label }} # Slow Dispatch Unit Tests sd-unit-tests: + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-artifact secrets: inherit strategy: @@ -106,6 +117,7 @@ jobs: runner-label: ${{ matrix.test-group.runner-label }} # Fast Dispatch Unit Tests fast-dispatch-unit-tests: + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-wheels secrets: inherit strategy: @@ -122,6 +134,7 @@ jobs: runner-label: ${{ matrix.test-group.runner-label }} # TTNN FD Unit tests ttnn-unit-tests: + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-wheels secrets: inherit strategy: @@ -138,6 +151,7 @@ jobs: runner-label: ${{ matrix.test-group.runner-label }} # FD Model Tests models-unit-tests: + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-wheels secrets: inherit strategy: @@ -154,6 +168,7 @@ jobs: runner-label: ${{ matrix.test-group.runner-label }} # FD C++ Unit Tests cpp-unit-tests: + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-artifact secrets: inherit strategy: @@ -169,14 +184,17 @@ jobs: arch: ${{ matrix.test-group.arch }} runner-label: ${{ matrix.test-group.runner-label }} profiler-regression: + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-artifact-profiler uses: ./.github/workflows/run-profiler-regression.yaml secrets: inherit build-docs: + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-artifact uses: ./.github/workflows/docs-latest-public.yaml secrets: inherit build: + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: [build-artifact, build-docker-image-2204] uses: ./.github/workflows/build.yaml secrets: inherit From eaef6e5d5b02a3e4faf339e2d5a67d585d23a0f8 Mon Sep 17 00:00:00 2001 From: blozano-tt Date: Wed, 23 Oct 2024 15:20:32 -0700 Subject: [PATCH 2/7] #0: Trigger all-post-commit-workflows with PR comment --- .../workflows/all-post-commit-workflows.yaml | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/all-post-commit-workflows.yaml b/.github/workflows/all-post-commit-workflows.yaml index a35811eb63e..bf8a44c37f1 100644 --- a/.github/workflows/all-post-commit-workflows.yaml +++ b/.github/workflows/all-post-commit-workflows.yaml @@ -28,11 +28,11 @@ permissions: jobs: static-checks: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} + if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} uses: ./.github/workflows/all-static-checks.yaml secrets: inherit build-wheels: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} + if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} needs: build-artifact strategy: matrix: @@ -47,26 +47,26 @@ jobs: from-precompiled: true secrets: inherit test-wheels: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} + if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} needs: build-wheels uses: ./.github/workflows/_test-wheels-impl.yaml with: from-precompiled: true secrets: inherit build-docker-image-2004: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} + if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} uses: ./.github/workflows/build-docker-artifact.yaml secrets: inherit with: os: ubuntu-20.04-amd64 build-docker-image-2204: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} + if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} uses: ./.github/workflows/build-docker-artifact.yaml secrets: inherit with: os: ubuntu-22.04-amd64 build-artifact: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} + if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} needs: build-docker-image-2004 uses: ./.github/workflows/build-artifact.yaml secrets: inherit @@ -74,7 +74,7 @@ jobs: build-docker: false build-type: ${{ inputs.build-type || 'Release' }} build-artifact-profiler: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} + if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} needs: build-docker-image-2004 uses: ./.github/workflows/build-artifact.yaml with: @@ -84,7 +84,7 @@ jobs: secrets: inherit # UMD Unit Tests umd-unit-tests: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} + if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} secrets: inherit strategy: fail-fast: false @@ -100,7 +100,7 @@ jobs: runner-label: ${{ matrix.test-group.runner-label }} # Slow Dispatch Unit Tests sd-unit-tests: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} + if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} needs: build-artifact secrets: inherit strategy: @@ -117,7 +117,7 @@ jobs: runner-label: ${{ matrix.test-group.runner-label }} # Fast Dispatch Unit Tests fast-dispatch-unit-tests: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} + if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} needs: build-wheels secrets: inherit strategy: @@ -134,7 +134,7 @@ jobs: runner-label: ${{ matrix.test-group.runner-label }} # TTNN FD Unit tests ttnn-unit-tests: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} + if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} needs: build-wheels secrets: inherit strategy: @@ -151,7 +151,7 @@ jobs: runner-label: ${{ matrix.test-group.runner-label }} # FD Model Tests models-unit-tests: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} + if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} needs: build-wheels secrets: inherit strategy: @@ -168,7 +168,7 @@ jobs: runner-label: ${{ matrix.test-group.runner-label }} # FD C++ Unit Tests cpp-unit-tests: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} + if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} needs: build-artifact secrets: inherit strategy: @@ -184,17 +184,17 @@ jobs: arch: ${{ matrix.test-group.arch }} runner-label: ${{ matrix.test-group.runner-label }} profiler-regression: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} + if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} needs: build-artifact-profiler uses: ./.github/workflows/run-profiler-regression.yaml secrets: inherit build-docs: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} + if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} needs: build-artifact uses: ./.github/workflows/docs-latest-public.yaml secrets: inherit build: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} + if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} needs: [build-artifact, build-docker-image-2204] uses: ./.github/workflows/build.yaml secrets: inherit From b1862b141902a22502f7c4596ba426650e53d184 Mon Sep 17 00:00:00 2001 From: blozano-tt Date: Wed, 23 Oct 2024 15:50:22 -0700 Subject: [PATCH 3/7] #0: Test --- .github/workflows/all-static-checks.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/all-static-checks.yaml b/.github/workflows/all-static-checks.yaml index 914ba2fa1ee..8d454ee3bd1 100644 --- a/.github/workflows/all-static-checks.yaml +++ b/.github/workflows/all-static-checks.yaml @@ -6,9 +6,12 @@ on: pull_request: branches: - "main" + issue_comment: + types: [created] jobs: check-spdx-licenses: + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && contains(github.event.comment.body, '/run-tests')) }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -22,17 +25,20 @@ jobs: - name: Check SPDX licenses run: python -m check_copyright --verbose --dry-run --config ./check_copyright_config.yaml . check-metal-kernel-count: + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && contains(github.event.comment.body, '/run-tests')) }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Check kernel count in base metal is less than maximum run: if (( $(find tt_metal/kernels/ -type f | wc -l) > 7 )); then exit 1; fi check-black: + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && contains(github.event.comment.body, '/run-tests')) }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: psf/black@23.10.1 check-doc: + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && contains(github.event.comment.body, '/run-tests')) }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -41,6 +47,7 @@ jobs: - name: Run checks on docs run: TT_METAL_HOME=$(pwd) docs/spellcheck.sh check-forbidden-imports: + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && contains(github.event.comment.body, '/run-tests')) }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -51,6 +58,7 @@ jobs: if (( $(grep -Rnw 'tests/tt_metal' -e 'tt_lib' | wc -l ) > 0 )); then exit 1; fi if (( $(grep -Rnw 'tests/tt_metal' -e 'tt_eager' | wc -l ) > 10 )); then exit 1; fi check-sweeps-workflow: + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && contains(github.event.comment.body, '/run-tests')) }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From da5d6cd400d37c196440a8647801324da2a1f090 Mon Sep 17 00:00:00 2001 From: blozano-tt Date: Wed, 23 Oct 2024 16:03:19 -0700 Subject: [PATCH 4/7] #0: Test --- .github/workflows/test-comment.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/test-comment.yaml diff --git a/.github/workflows/test-comment.yaml b/.github/workflows/test-comment.yaml new file mode 100644 index 00000000000..9578f173e2f --- /dev/null +++ b/.github/workflows/test-comment.yaml @@ -0,0 +1,19 @@ + +name: "All post-commit tests via comment" + +on: + issue_comment: + types: [created] + +jobs: + test: + runs-on: ubuntu-latest + if: github.event.issue.pull_request && contains(github.event.comment.body, '/test') + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Test + run: | + echo "Testing..." + ls From 038bba152d3e7541cc1fbee957ebcc5ce0dbb11c Mon Sep 17 00:00:00 2001 From: blozano-tt Date: Wed, 23 Oct 2024 16:10:58 -0700 Subject: [PATCH 5/7] Revert "#0: Test" This reverts commit b1862b141902a22502f7c4596ba426650e53d184. --- .github/workflows/all-static-checks.yaml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/all-static-checks.yaml b/.github/workflows/all-static-checks.yaml index 8d454ee3bd1..914ba2fa1ee 100644 --- a/.github/workflows/all-static-checks.yaml +++ b/.github/workflows/all-static-checks.yaml @@ -6,12 +6,9 @@ on: pull_request: branches: - "main" - issue_comment: - types: [created] jobs: check-spdx-licenses: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && contains(github.event.comment.body, '/run-tests')) }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -25,20 +22,17 @@ jobs: - name: Check SPDX licenses run: python -m check_copyright --verbose --dry-run --config ./check_copyright_config.yaml . check-metal-kernel-count: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && contains(github.event.comment.body, '/run-tests')) }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Check kernel count in base metal is less than maximum run: if (( $(find tt_metal/kernels/ -type f | wc -l) > 7 )); then exit 1; fi check-black: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && contains(github.event.comment.body, '/run-tests')) }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: psf/black@23.10.1 check-doc: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && contains(github.event.comment.body, '/run-tests')) }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -47,7 +41,6 @@ jobs: - name: Run checks on docs run: TT_METAL_HOME=$(pwd) docs/spellcheck.sh check-forbidden-imports: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && contains(github.event.comment.body, '/run-tests')) }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -58,7 +51,6 @@ jobs: if (( $(grep -Rnw 'tests/tt_metal' -e 'tt_lib' | wc -l ) > 0 )); then exit 1; fi if (( $(grep -Rnw 'tests/tt_metal' -e 'tt_eager' | wc -l ) > 10 )); then exit 1; fi check-sweeps-workflow: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && contains(github.event.comment.body, '/run-tests')) }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 431c7340ee1e9ae3e8b492a5d6c481a8d2b4af34 Mon Sep 17 00:00:00 2001 From: blozano-tt Date: Wed, 23 Oct 2024 16:11:08 -0700 Subject: [PATCH 6/7] Revert "#0: Trigger all-post-commit-workflows with PR comment" This reverts commit eaef6e5d5b02a3e4faf339e2d5a67d585d23a0f8. --- .../workflows/all-post-commit-workflows.yaml | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/all-post-commit-workflows.yaml b/.github/workflows/all-post-commit-workflows.yaml index bf8a44c37f1..a35811eb63e 100644 --- a/.github/workflows/all-post-commit-workflows.yaml +++ b/.github/workflows/all-post-commit-workflows.yaml @@ -28,11 +28,11 @@ permissions: jobs: static-checks: - if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} uses: ./.github/workflows/all-static-checks.yaml secrets: inherit build-wheels: - if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-artifact strategy: matrix: @@ -47,26 +47,26 @@ jobs: from-precompiled: true secrets: inherit test-wheels: - if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-wheels uses: ./.github/workflows/_test-wheels-impl.yaml with: from-precompiled: true secrets: inherit build-docker-image-2004: - if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} uses: ./.github/workflows/build-docker-artifact.yaml secrets: inherit with: os: ubuntu-20.04-amd64 build-docker-image-2204: - if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} uses: ./.github/workflows/build-docker-artifact.yaml secrets: inherit with: os: ubuntu-22.04-amd64 build-artifact: - if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-docker-image-2004 uses: ./.github/workflows/build-artifact.yaml secrets: inherit @@ -74,7 +74,7 @@ jobs: build-docker: false build-type: ${{ inputs.build-type || 'Release' }} build-artifact-profiler: - if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-docker-image-2004 uses: ./.github/workflows/build-artifact.yaml with: @@ -84,7 +84,7 @@ jobs: secrets: inherit # UMD Unit Tests umd-unit-tests: - if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} secrets: inherit strategy: fail-fast: false @@ -100,7 +100,7 @@ jobs: runner-label: ${{ matrix.test-group.runner-label }} # Slow Dispatch Unit Tests sd-unit-tests: - if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-artifact secrets: inherit strategy: @@ -117,7 +117,7 @@ jobs: runner-label: ${{ matrix.test-group.runner-label }} # Fast Dispatch Unit Tests fast-dispatch-unit-tests: - if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-wheels secrets: inherit strategy: @@ -134,7 +134,7 @@ jobs: runner-label: ${{ matrix.test-group.runner-label }} # TTNN FD Unit tests ttnn-unit-tests: - if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-wheels secrets: inherit strategy: @@ -151,7 +151,7 @@ jobs: runner-label: ${{ matrix.test-group.runner-label }} # FD Model Tests models-unit-tests: - if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-wheels secrets: inherit strategy: @@ -168,7 +168,7 @@ jobs: runner-label: ${{ matrix.test-group.runner-label }} # FD C++ Unit Tests cpp-unit-tests: - if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-artifact secrets: inherit strategy: @@ -184,17 +184,17 @@ jobs: arch: ${{ matrix.test-group.arch }} runner-label: ${{ matrix.test-group.runner-label }} profiler-regression: - if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-artifact-profiler uses: ./.github/workflows/run-profiler-regression.yaml secrets: inherit build-docs: - if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-artifact uses: ./.github/workflows/docs-latest-public.yaml secrets: inherit build: - if: ${{ github.event_name != 'issue_comment' || (contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-tests')) }} + if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: [build-artifact, build-docker-image-2204] uses: ./.github/workflows/build.yaml secrets: inherit From a43a724ee218c11ee44632e6decd20e607f0a51d Mon Sep 17 00:00:00 2001 From: blozano-tt Date: Wed, 23 Oct 2024 16:11:12 -0700 Subject: [PATCH 7/7] Revert "#0: Trigger all-post-commit-workflows with PR comment" This reverts commit a699310c741717f994705efac7b934ea0c9b9db3. --- .../workflows/all-post-commit-workflows.yaml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/.github/workflows/all-post-commit-workflows.yaml b/.github/workflows/all-post-commit-workflows.yaml index a35811eb63e..f07f6b7dcbb 100644 --- a/.github/workflows/all-post-commit-workflows.yaml +++ b/.github/workflows/all-post-commit-workflows.yaml @@ -15,8 +15,6 @@ on: - CI push: branches: ["main"] - issue_comment: - types: [created] permissions: actions: read @@ -28,11 +26,9 @@ permissions: jobs: static-checks: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} uses: ./.github/workflows/all-static-checks.yaml secrets: inherit build-wheels: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-artifact strategy: matrix: @@ -47,26 +43,22 @@ jobs: from-precompiled: true secrets: inherit test-wheels: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-wheels uses: ./.github/workflows/_test-wheels-impl.yaml with: from-precompiled: true secrets: inherit build-docker-image-2004: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} uses: ./.github/workflows/build-docker-artifact.yaml secrets: inherit with: os: ubuntu-20.04-amd64 build-docker-image-2204: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} uses: ./.github/workflows/build-docker-artifact.yaml secrets: inherit with: os: ubuntu-22.04-amd64 build-artifact: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-docker-image-2004 uses: ./.github/workflows/build-artifact.yaml secrets: inherit @@ -74,7 +66,6 @@ jobs: build-docker: false build-type: ${{ inputs.build-type || 'Release' }} build-artifact-profiler: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-docker-image-2004 uses: ./.github/workflows/build-artifact.yaml with: @@ -84,7 +75,6 @@ jobs: secrets: inherit # UMD Unit Tests umd-unit-tests: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} secrets: inherit strategy: fail-fast: false @@ -100,7 +90,6 @@ jobs: runner-label: ${{ matrix.test-group.runner-label }} # Slow Dispatch Unit Tests sd-unit-tests: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-artifact secrets: inherit strategy: @@ -117,7 +106,6 @@ jobs: runner-label: ${{ matrix.test-group.runner-label }} # Fast Dispatch Unit Tests fast-dispatch-unit-tests: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-wheels secrets: inherit strategy: @@ -134,7 +122,6 @@ jobs: runner-label: ${{ matrix.test-group.runner-label }} # TTNN FD Unit tests ttnn-unit-tests: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-wheels secrets: inherit strategy: @@ -151,7 +138,6 @@ jobs: runner-label: ${{ matrix.test-group.runner-label }} # FD Model Tests models-unit-tests: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-wheels secrets: inherit strategy: @@ -168,7 +154,6 @@ jobs: runner-label: ${{ matrix.test-group.runner-label }} # FD C++ Unit Tests cpp-unit-tests: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-artifact secrets: inherit strategy: @@ -184,17 +169,14 @@ jobs: arch: ${{ matrix.test-group.arch }} runner-label: ${{ matrix.test-group.runner-label }} profiler-regression: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-artifact-profiler uses: ./.github/workflows/run-profiler-regression.yaml secrets: inherit build-docs: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: build-artifact uses: ./.github/workflows/docs-latest-public.yaml secrets: inherit build: - if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '/run-tests') }} needs: [build-artifact, build-docker-image-2204] uses: ./.github/workflows/build.yaml secrets: inherit