From 096ea92613a365cd781c2930beebac9f051fbdbf Mon Sep 17 00:00:00 2001 From: Andrew Fuller Date: Fri, 7 Mar 2025 23:39:53 +0000 Subject: [PATCH 01/18] de-limit --- .github/workflows/pr-gate.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/pr-gate.yaml b/.github/workflows/pr-gate.yaml index a77efbc4b01..c5461667419 100644 --- a/.github/workflows/pr-gate.yaml +++ b/.github/workflows/pr-gate.yaml @@ -18,8 +18,6 @@ on: - reopened - synchronize - ready_for_review - branches: - - "main" merge_group: concurrency: From 8fb3011ad92a91e2fae6fd410b8554adb1e4b04d Mon Sep 17 00:00:00 2001 From: Andrew Fuller Date: Fri, 7 Mar 2025 23:56:11 +0000 Subject: [PATCH 02/18] fixup! de-limit --- .github/workflows/pr-gate.yaml | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/.github/workflows/pr-gate.yaml b/.github/workflows/pr-gate.yaml index c5461667419..26bee9d6490 100644 --- a/.github/workflows/pr-gate.yaml +++ b/.github/workflows/pr-gate.yaml @@ -62,21 +62,23 @@ jobs: runs-on: ubuntu-latest steps: - name: Check if all jobs passed - shell: bash - run: | - set -euo pipefail - # Required jobs - if [[ "${{ needs.pr-gate-build.outcome }}" != "success" ]]; then - echo "Some job(s) did not succeed." - exit 1 - fi + uses: actions/github-script@v7 + with: + script: | + const requiredJobs = ["pr-gate-build"]; + const optionalJobs = ["smoke-tests"]; - # Optional jobs - # These may be 'skipped' (neither success nor failure) if they were not required. - # Treat skipped as success. - if [[ "${{ needs.smoke-tests }}" == "failure" ]]; then - echo "Some job(s) failed." - exit 1 - fi + for (const job of requiredJobs) { + if (context.payload.workflow_run.jobs[job].outcome !== "success") { + core.setFailed(`Required job '${job}' did not succeed.`); + } + } - echo "Workflow was successful." + for (const job of optionalJobs) { + const outcome = context.payload.workflow_run.jobs[job]?.outcome; + if (outcome === "failure") { + core.setFailed(`Optional job '${job}' failed.`); + } + } + + console.log("Workflow was successful."); From 7c815ac4c98e732cca581ca1c0b9b4ee8b2b4eaa Mon Sep 17 00:00:00 2001 From: Andrew Fuller Date: Sat, 8 Mar 2025 00:11:29 +0000 Subject: [PATCH 03/18] fixup! fixup! de-limit --- .github/workflows/pr-gate.yaml | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pr-gate.yaml b/.github/workflows/pr-gate.yaml index 26bee9d6490..0e79a2ae505 100644 --- a/.github/workflows/pr-gate.yaml +++ b/.github/workflows/pr-gate.yaml @@ -35,9 +35,13 @@ jobs: pr-gate-build: name: Build if: github.event_name != 'pull_request' || !github.event.pull_request.draft - uses: ./.github/workflows/build-artifact.yaml - with: - version: "22.04" + runs-on: ubuntu-latest + steps: + - run: | + exit 0 + # uses: ./.github/workflows/build-artifact.yaml + # with: + # version: "22.04" smoke-tests: needs: pr-gate-build @@ -47,11 +51,15 @@ jobs: platform: [ "tt-beta-ubuntu-2204-n300-large-stable", ] - uses: ./.github/workflows/smoke.yaml - with: - docker-image: ${{ needs.pr-gate-build.outputs.ci-build-docker-image }} - package-artifact-name: ${{ needs.pr-gate-build.outputs.packages-artifact-name }} - runner: ${{ matrix.platform }} + runs-on: ubuntu-latest + steps: + - run: | + exit 0 + # uses: ./.github/workflows/smoke.yaml + # with: + # docker-image: ${{ needs.pr-gate-build.outputs.ci-build-docker-image }} + # package-artifact-name: ${{ needs.pr-gate-build.outputs.packages-artifact-name }} + # runner: ${{ matrix.platform }} # GitHub has so many design limitations it's not even funny. # This job is purely so we can capture the essence of the workflow as a whole in our status checks. @@ -68,14 +76,19 @@ jobs: const requiredJobs = ["pr-gate-build"]; const optionalJobs = ["smoke-tests"]; + // The 'needs' context provides job outcomes + const needs = ${{ toJSON(needs) }}; + + // Check required jobs for (const job of requiredJobs) { - if (context.payload.workflow_run.jobs[job].outcome !== "success") { + if (needs[job]?.outcome !== "success") { core.setFailed(`Required job '${job}' did not succeed.`); } } + // Check optional jobs (treat skipped as success) for (const job of optionalJobs) { - const outcome = context.payload.workflow_run.jobs[job]?.outcome; + const outcome = needs[job]?.outcome || "success"; // Default to success if undefined if (outcome === "failure") { core.setFailed(`Optional job '${job}' failed.`); } From adea6fb480b1f18d20a061b8952f31b2d2cb0873 Mon Sep 17 00:00:00 2001 From: Andrew Fuller Date: Sat, 8 Mar 2025 00:18:55 +0000 Subject: [PATCH 04/18] fixup! fixup! fixup! de-limit --- .github/workflows/pr-gate.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-gate.yaml b/.github/workflows/pr-gate.yaml index 0e79a2ae505..d16724e7536 100644 --- a/.github/workflows/pr-gate.yaml +++ b/.github/workflows/pr-gate.yaml @@ -78,6 +78,7 @@ jobs: // The 'needs' context provides job outcomes const needs = ${{ toJSON(needs) }}; + console.log("Needs context:", needs); // Check required jobs for (const job of requiredJobs) { From 21aa2d2676573fd428ca421386f5ac9f505d3bc8 Mon Sep 17 00:00:00 2001 From: Andrew Fuller Date: Sat, 8 Mar 2025 00:53:31 +0000 Subject: [PATCH 05/18] fixup! fixup! fixup! fixup! de-limit --- .github/workflows/pr-gate.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-gate.yaml b/.github/workflows/pr-gate.yaml index d16724e7536..ad8d7ab295a 100644 --- a/.github/workflows/pr-gate.yaml +++ b/.github/workflows/pr-gate.yaml @@ -76,21 +76,24 @@ jobs: const requiredJobs = ["pr-gate-build"]; const optionalJobs = ["smoke-tests"]; - // The 'needs' context provides job outcomes + // Debugging: print the entire needs context const needs = ${{ toJSON(needs) }}; console.log("Needs context:", needs); // Check required jobs for (const job of requiredJobs) { - if (needs[job]?.outcome !== "success") { + const result = needs[job]?.result; + console.log(`Job: ${job}, Result: ${result}`); + if (result !== "success") { core.setFailed(`Required job '${job}' did not succeed.`); } } // Check optional jobs (treat skipped as success) for (const job of optionalJobs) { - const outcome = needs[job]?.outcome || "success"; // Default to success if undefined - if (outcome === "failure") { + const result = needs[job]?.result || "success"; // Default to success if missing + console.log(`Job: ${job}, Result: ${result}`); + if (result === "failure") { core.setFailed(`Optional job '${job}' failed.`); } } From f9d1b712d400e70ef911ed8687e236fe8828fb18 Mon Sep 17 00:00:00 2001 From: Andrew Fuller Date: Sat, 8 Mar 2025 00:56:12 +0000 Subject: [PATCH 06/18] test first failure --- .github/workflows/pr-gate.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-gate.yaml b/.github/workflows/pr-gate.yaml index ad8d7ab295a..aec64ccd85b 100644 --- a/.github/workflows/pr-gate.yaml +++ b/.github/workflows/pr-gate.yaml @@ -38,7 +38,7 @@ jobs: runs-on: ubuntu-latest steps: - run: | - exit 0 + exit 1 # uses: ./.github/workflows/build-artifact.yaml # with: # version: "22.04" From ecd64609f26c6f54bc038c46f6c4958929a84099 Mon Sep 17 00:00:00 2001 From: Andrew Fuller Date: Sat, 8 Mar 2025 00:57:25 +0000 Subject: [PATCH 07/18] test second failure --- .github/workflows/pr-gate.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-gate.yaml b/.github/workflows/pr-gate.yaml index aec64ccd85b..2329bab2775 100644 --- a/.github/workflows/pr-gate.yaml +++ b/.github/workflows/pr-gate.yaml @@ -38,7 +38,7 @@ jobs: runs-on: ubuntu-latest steps: - run: | - exit 1 + exit 0 # uses: ./.github/workflows/build-artifact.yaml # with: # version: "22.04" @@ -54,7 +54,7 @@ jobs: runs-on: ubuntu-latest steps: - run: | - exit 0 + exit 1 # uses: ./.github/workflows/smoke.yaml # with: # docker-image: ${{ needs.pr-gate-build.outputs.ci-build-docker-image }} From fd4afc0d4086a0f405b26e57efd0394ab13c40d8 Mon Sep 17 00:00:00 2001 From: Andrew Fuller Date: Sat, 8 Mar 2025 00:59:40 +0000 Subject: [PATCH 08/18] test req skip --- .github/workflows/pr-gate.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-gate.yaml b/.github/workflows/pr-gate.yaml index 2329bab2775..efbc89145e2 100644 --- a/.github/workflows/pr-gate.yaml +++ b/.github/workflows/pr-gate.yaml @@ -34,7 +34,7 @@ concurrency: jobs: pr-gate-build: name: Build - if: github.event_name != 'pull_request' || !github.event.pull_request.draft + if: github.event_name != 'pull_request' || !github.event.pull_request.draft && false runs-on: ubuntu-latest steps: - run: | @@ -54,7 +54,7 @@ jobs: runs-on: ubuntu-latest steps: - run: | - exit 1 + exit 0 # uses: ./.github/workflows/smoke.yaml # with: # docker-image: ${{ needs.pr-gate-build.outputs.ci-build-docker-image }} From abc4258d20416b47bf89f27272d3626d58889224 Mon Sep 17 00:00:00 2001 From: Andrew Fuller Date: Sat, 8 Mar 2025 01:00:58 +0000 Subject: [PATCH 09/18] test opt skip --- .github/workflows/pr-gate.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-gate.yaml b/.github/workflows/pr-gate.yaml index efbc89145e2..fcf401e9c2a 100644 --- a/.github/workflows/pr-gate.yaml +++ b/.github/workflows/pr-gate.yaml @@ -34,7 +34,7 @@ concurrency: jobs: pr-gate-build: name: Build - if: github.event_name != 'pull_request' || !github.event.pull_request.draft && false + if: github.event_name != 'pull_request' || !github.event.pull_request.draft runs-on: ubuntu-latest steps: - run: | @@ -44,6 +44,7 @@ jobs: # version: "22.04" smoke-tests: + if: false needs: pr-gate-build strategy: fail-fast: false From facfa9d1dfd663979797c1b21551d5d1e6edc31d Mon Sep 17 00:00:00 2001 From: Andrew Fuller Date: Sat, 8 Mar 2025 01:13:18 +0000 Subject: [PATCH 10/18] move to action --- .github/actions/workflow-status/action.yml | 14 ++++ .github/actions/workflow-status/script.js | 35 ++++++++++ .github/workflows/pr-gate.yaml | 77 +++++++++++----------- 3 files changed, 86 insertions(+), 40 deletions(-) create mode 100644 .github/actions/workflow-status/action.yml create mode 100644 .github/actions/workflow-status/script.js diff --git a/.github/actions/workflow-status/action.yml b/.github/actions/workflow-status/action.yml new file mode 100644 index 00000000000..b3b5c6a9e0f --- /dev/null +++ b/.github/actions/workflow-status/action.yml @@ -0,0 +1,14 @@ +name: "Workflow Status" +description: "Ensures all required jobs succeeded and handles optional jobs correctly." +inputs: + required-jobs: + description: "Comma-separated list of required jobs (must succeed)." + required: true + optional-jobs: + description: "Comma-separated list of optional jobs (skipped is OK, but failure is not)." + required: false + default: "" + +runs: + using: "node16" + main: "script.js" diff --git a/.github/actions/workflow-status/script.js b/.github/actions/workflow-status/script.js new file mode 100644 index 00000000000..2c04592fc67 --- /dev/null +++ b/.github/actions/workflow-status/script.js @@ -0,0 +1,35 @@ +const core = require("@actions/core"); + +async function run() { + try { + const requiredJobs = core.getInput("required-jobs").split(",").map(j => j.trim()); + const optionalJobs = core.getInput("optional-jobs").split(",").map(j => j.trim()).filter(Boolean); + + const needs = JSON.parse(process.env.NEEDS_CONTEXT); + console.log("Needs context:", needs); + + // Check required jobs + for (const job of requiredJobs) { + const result = needs[job]?.result; + console.log(`Job: ${job}, Result: ${result}`); + if (result !== "success") { + core.setFailed(`Required job '${job}' did not succeed.`); + } + } + + // Check optional jobs (treat skipped as success) + for (const job of optionalJobs) { + const result = needs[job]?.result || "success"; // Default to success if missing + console.log(`Job: ${job}, Result: ${result}`); + if (result === "failure") { + core.setFailed(`Optional job '${job}' failed.`); + } + } + + console.log("Workflow was successful."); + } catch (error) { + core.setFailed(`Error: ${error.message}`); + } +} + +run(); diff --git a/.github/workflows/pr-gate.yaml b/.github/workflows/pr-gate.yaml index fcf401e9c2a..b685dfcff69 100644 --- a/.github/workflows/pr-gate.yaml +++ b/.github/workflows/pr-gate.yaml @@ -35,13 +35,9 @@ jobs: pr-gate-build: name: Build if: github.event_name != 'pull_request' || !github.event.pull_request.draft - runs-on: ubuntu-latest - steps: - - run: | - exit 0 - # uses: ./.github/workflows/build-artifact.yaml - # with: - # version: "22.04" + uses: ./.github/workflows/build-artifact.yaml + with: + version: "22.04" smoke-tests: if: false @@ -52,15 +48,11 @@ jobs: platform: [ "tt-beta-ubuntu-2204-n300-large-stable", ] - runs-on: ubuntu-latest - steps: - - run: | - exit 0 - # uses: ./.github/workflows/smoke.yaml - # with: - # docker-image: ${{ needs.pr-gate-build.outputs.ci-build-docker-image }} - # package-artifact-name: ${{ needs.pr-gate-build.outputs.packages-artifact-name }} - # runner: ${{ matrix.platform }} + uses: ./.github/workflows/smoke.yaml + with: + docker-image: ${{ needs.pr-gate-build.outputs.ci-build-docker-image }} + package-artifact-name: ${{ needs.pr-gate-build.outputs.packages-artifact-name }} + runner: ${{ matrix.platform }} # GitHub has so many design limitations it's not even funny. # This job is purely so we can capture the essence of the workflow as a whole in our status checks. @@ -71,32 +63,37 @@ jobs: runs-on: ubuntu-latest steps: - name: Check if all jobs passed - uses: actions/github-script@v7 + uses: ./.github/actions/pr-gate-status with: - script: | - const requiredJobs = ["pr-gate-build"]; - const optionalJobs = ["smoke-tests"]; + required-jobs: "pr-gate-build" + optional-jobs: "smoke-tests" + env: + NEEDS_CONTEXT: '${{ toJSON(needs) }}' + # - name: Check if all jobs passed + # uses: actions/github-script@v7 + # with: + # script: | + # const requiredJobs = ["pr-gate-build"]; + # const optionalJobs = ["smoke-tests"]; - // Debugging: print the entire needs context - const needs = ${{ toJSON(needs) }}; - console.log("Needs context:", needs); + # const needs = ${{ toJSON(needs) }}; - // Check required jobs - for (const job of requiredJobs) { - const result = needs[job]?.result; - console.log(`Job: ${job}, Result: ${result}`); - if (result !== "success") { - core.setFailed(`Required job '${job}' did not succeed.`); - } - } + # // Check required jobs + # for (const job of requiredJobs) { + # const result = needs[job]?.result; + # console.log(`Job: ${job}, Result: ${result}`); + # if (result !== "success") { + # core.setFailed(`Required job '${job}' did not succeed.`); + # } + # } - // Check optional jobs (treat skipped as success) - for (const job of optionalJobs) { - const result = needs[job]?.result || "success"; // Default to success if missing - console.log(`Job: ${job}, Result: ${result}`); - if (result === "failure") { - core.setFailed(`Optional job '${job}' failed.`); - } - } + # // Check optional jobs (treat skipped as success) + # for (const job of optionalJobs) { + # const result = needs[job]?.result || "success"; // Default to success if missing + # console.log(`Job: ${job}, Result: ${result}`); + # if (result === "failure") { + # core.setFailed(`Optional job '${job}' failed.`); + # } + # } - console.log("Workflow was successful."); + # console.log("Workflow was successful."); From 649dd38a5345cafe198907567485310848f95e0b Mon Sep 17 00:00:00 2001 From: Andrew Fuller Date: Sat, 8 Mar 2025 01:20:35 +0000 Subject: [PATCH 11/18] re-test --- .github/workflows/pr-gate.yaml | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pr-gate.yaml b/.github/workflows/pr-gate.yaml index b685dfcff69..f46212b310e 100644 --- a/.github/workflows/pr-gate.yaml +++ b/.github/workflows/pr-gate.yaml @@ -35,9 +35,13 @@ jobs: pr-gate-build: name: Build if: github.event_name != 'pull_request' || !github.event.pull_request.draft - uses: ./.github/workflows/build-artifact.yaml - with: - version: "22.04" + runs-on: ubuntu-latest + steps: + - run: | + exit 0 + # uses: ./.github/workflows/build-artifact.yaml + # with: + # version: "22.04" smoke-tests: if: false @@ -48,11 +52,15 @@ jobs: platform: [ "tt-beta-ubuntu-2204-n300-large-stable", ] - uses: ./.github/workflows/smoke.yaml - with: - docker-image: ${{ needs.pr-gate-build.outputs.ci-build-docker-image }} - package-artifact-name: ${{ needs.pr-gate-build.outputs.packages-artifact-name }} - runner: ${{ matrix.platform }} + runs-on: ubuntu-latest + steps: + - run: | + exit 0 + #uses: ./.github/workflows/smoke.yaml + #with: + # docker-image: ${{ needs.pr-gate-build.outputs.ci-build-docker-image }} + # package-artifact-name: ${{ needs.pr-gate-build.outputs.packages-artifact-name }} + # runner: ${{ matrix.platform }} # GitHub has so many design limitations it's not even funny. # This job is purely so we can capture the essence of the workflow as a whole in our status checks. @@ -63,7 +71,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check if all jobs passed - uses: ./.github/actions/pr-gate-status + uses: ./.github/actions/workflow-status with: required-jobs: "pr-gate-build" optional-jobs: "smoke-tests" From ca00e43bdecea419440039e1735a3a3bc4a96296 Mon Sep 17 00:00:00 2001 From: Andrew Fuller Date: Sat, 8 Mar 2025 01:23:56 +0000 Subject: [PATCH 12/18] ref --- .github/workflows/pr-gate.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-gate.yaml b/.github/workflows/pr-gate.yaml index f46212b310e..8ad347e1c22 100644 --- a/.github/workflows/pr-gate.yaml +++ b/.github/workflows/pr-gate.yaml @@ -71,7 +71,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check if all jobs passed - uses: ./.github/actions/workflow-status + uses: tenstorrent/tt-metal/.github/actions/workflow-status@afuller/test with: required-jobs: "pr-gate-build" optional-jobs: "smoke-tests" From fe69589069fae07bef6e498ebe6d02e8f9a0a3f5 Mon Sep 17 00:00:00 2001 From: Andrew Fuller Date: Sat, 8 Mar 2025 01:34:43 +0000 Subject: [PATCH 13/18] shuffle dance --- .github/actions/workflow-status/action.yml | 33 ++++++++++++++++++-- .github/actions/workflow-status/script.js | 35 ---------------------- 2 files changed, 31 insertions(+), 37 deletions(-) delete mode 100644 .github/actions/workflow-status/script.js diff --git a/.github/actions/workflow-status/action.yml b/.github/actions/workflow-status/action.yml index b3b5c6a9e0f..61905f089c3 100644 --- a/.github/actions/workflow-status/action.yml +++ b/.github/actions/workflow-status/action.yml @@ -1,5 +1,6 @@ name: "Workflow Status" description: "Ensures all required jobs succeeded and handles optional jobs correctly." + inputs: required-jobs: description: "Comma-separated list of required jobs (must succeed)." @@ -10,5 +11,33 @@ inputs: default: "" runs: - using: "node16" - main: "script.js" + using: "composite" + steps: + - name: Check Jobs with github-script + uses: actions/github-script@v7 + with: + script: | + const requiredJobs = "${{ inputs.required-jobs }}".split(","); + const optionalJobs = "${{ inputs.optional-jobs }}".split(","); + + const needs = ${{ toJSON(needs) }}; + + // Check required jobs + for (const job of requiredJobs) { + const result = needs[job]?.result; + console.log(`Job: ${job}, Result: ${result}`); + if (result !== "success") { + core.setFailed(`Required job '${job}' did not succeed.`); + } + } + + // Check optional jobs (treat skipped as success) + for (const job of optionalJobs) { + const result = needs[job]?.result || "success"; // Default to success if missing + console.log(`Job: ${job}, Result: ${result}`); + if (result === "failure") { + core.setFailed(`Optional job '${job}' failed.`); + } + } + + console.log("Workflow was successful."); diff --git a/.github/actions/workflow-status/script.js b/.github/actions/workflow-status/script.js deleted file mode 100644 index 2c04592fc67..00000000000 --- a/.github/actions/workflow-status/script.js +++ /dev/null @@ -1,35 +0,0 @@ -const core = require("@actions/core"); - -async function run() { - try { - const requiredJobs = core.getInput("required-jobs").split(",").map(j => j.trim()); - const optionalJobs = core.getInput("optional-jobs").split(",").map(j => j.trim()).filter(Boolean); - - const needs = JSON.parse(process.env.NEEDS_CONTEXT); - console.log("Needs context:", needs); - - // Check required jobs - for (const job of requiredJobs) { - const result = needs[job]?.result; - console.log(`Job: ${job}, Result: ${result}`); - if (result !== "success") { - core.setFailed(`Required job '${job}' did not succeed.`); - } - } - - // Check optional jobs (treat skipped as success) - for (const job of optionalJobs) { - const result = needs[job]?.result || "success"; // Default to success if missing - console.log(`Job: ${job}, Result: ${result}`); - if (result === "failure") { - core.setFailed(`Optional job '${job}' failed.`); - } - } - - console.log("Workflow was successful."); - } catch (error) { - core.setFailed(`Error: ${error.message}`); - } -} - -run(); From 112631f01a19d70f6e1302ef6e8272c93a3e734e Mon Sep 17 00:00:00 2001 From: Andrew Fuller Date: Sat, 8 Mar 2025 01:39:24 +0000 Subject: [PATCH 14/18] env var --- .github/actions/workflow-status/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/workflow-status/action.yml b/.github/actions/workflow-status/action.yml index 61905f089c3..340312d408e 100644 --- a/.github/actions/workflow-status/action.yml +++ b/.github/actions/workflow-status/action.yml @@ -20,7 +20,7 @@ runs: const requiredJobs = "${{ inputs.required-jobs }}".split(","); const optionalJobs = "${{ inputs.optional-jobs }}".split(","); - const needs = ${{ toJSON(needs) }}; + const needs = JSON.parse(process.env.NEEDS_CONTEXT); // Check required jobs for (const job of requiredJobs) { From 412c6a73008b208b584616983824e379363c4d9a Mon Sep 17 00:00:00 2001 From: Andrew Fuller Date: Sat, 8 Mar 2025 01:57:20 +0000 Subject: [PATCH 15/18] test multiples --- .github/workflows/pr-gate.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-gate.yaml b/.github/workflows/pr-gate.yaml index 8ad347e1c22..1628e4d01d8 100644 --- a/.github/workflows/pr-gate.yaml +++ b/.github/workflows/pr-gate.yaml @@ -73,7 +73,7 @@ jobs: - name: Check if all jobs passed uses: tenstorrent/tt-metal/.github/actions/workflow-status@afuller/test with: - required-jobs: "pr-gate-build" + required-jobs: "pr-gate-build, smoke-tests" optional-jobs: "smoke-tests" env: NEEDS_CONTEXT: '${{ toJSON(needs) }}' From e9bf153eea118034af4f8a11efdc25cffef5d98c Mon Sep 17 00:00:00 2001 From: Andrew Fuller Date: Sat, 8 Mar 2025 01:58:55 +0000 Subject: [PATCH 16/18] test multiples x2 --- .github/workflows/pr-gate.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr-gate.yaml b/.github/workflows/pr-gate.yaml index 1628e4d01d8..4690462bd5c 100644 --- a/.github/workflows/pr-gate.yaml +++ b/.github/workflows/pr-gate.yaml @@ -44,7 +44,6 @@ jobs: # version: "22.04" smoke-tests: - if: false needs: pr-gate-build strategy: fail-fast: false From 2fc3e3a12228c84eeadd97ab162f98acd56e5b56 Mon Sep 17 00:00:00 2001 From: Andrew Fuller Date: Sat, 8 Mar 2025 02:01:48 +0000 Subject: [PATCH 17/18] handle whitespace --- .github/actions/workflow-status/action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/actions/workflow-status/action.yml b/.github/actions/workflow-status/action.yml index 340312d408e..7277a44a9aa 100644 --- a/.github/actions/workflow-status/action.yml +++ b/.github/actions/workflow-status/action.yml @@ -17,8 +17,9 @@ runs: uses: actions/github-script@v7 with: script: | - const requiredJobs = "${{ inputs.required-jobs }}".split(","); - const optionalJobs = "${{ inputs.optional-jobs }}".split(","); + const requiredJobs = "${{ inputs.required-jobs }}".split(",").map(job => job.trim()); + const optionalJobs = "${{ inputs.optional-jobs }}".split(",").map(job => job.trim()); + const needs = JSON.parse(process.env.NEEDS_CONTEXT); From 369d5baeeaee1a4e3fde4cee9fd4f0ccb4886b29 Mon Sep 17 00:00:00 2001 From: Andrew Fuller Date: Sat, 8 Mar 2025 02:03:21 +0000 Subject: [PATCH 18/18] last test --- .github/workflows/pr-gate.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-gate.yaml b/.github/workflows/pr-gate.yaml index 4690462bd5c..1628e4d01d8 100644 --- a/.github/workflows/pr-gate.yaml +++ b/.github/workflows/pr-gate.yaml @@ -44,6 +44,7 @@ jobs: # version: "22.04" smoke-tests: + if: false needs: pr-gate-build strategy: fail-fast: false