From e2efe803e1667d49fcadcc18957f6405e15155b0 Mon Sep 17 00:00:00 2001 From: mtfishman Date: Wed, 22 Apr 2026 12:49:38 -0400 Subject: [PATCH] Tests.yml: trivially-pass non-canonical check-compat-bounds cells Non-canonical reusable-workflow invocations (not ubuntu-latest + julia=1) previously produced gray "skipped" `Check compat bounds` checks because the gate was at the job level. Move the gate to every step inside the job so non-canonical invocations run a single echo and exit green. Adds ~15-30s of runner provisioning per non-canonical cell, but keeps the check UI clean and the real work running exactly once. --- .github/workflows/Tests.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index 2587a2d..ff9b998 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -195,34 +195,46 @@ jobs: # blocks auto-merge. # # The check is platform-independent, so when the caller invokes this - # reusable workflow via a matrix (typical), we only run it on the canonical - # (ubuntu-latest, julia=1) cell to avoid running it N times. + # reusable workflow via a matrix (typical) we want the real work to run + # only once — on the canonical (ubuntu-latest, julia=1) cell. We gate each + # step with that condition rather than the job itself so non-canonical + # invocations resolve to a trivially-successful job instead of a skipped + # one (skipped jobs render as gray checks). if: >- inputs.check-compat-bounds - && inputs.os == 'ubuntu-latest' - && inputs.julia-version == '1' && (!github.event.pull_request.draft || inputs.run-all-on-draft) runs-on: "ubuntu-latest" timeout-minutes: ${{ inputs.timeout-minutes }} steps: + - name: "Skip (not canonical cell)" + if: "${{ inputs.os != 'ubuntu-latest' || inputs.julia-version != '1' }}" + run: | + echo "Compat-bounds check only runs on (ubuntu-latest, julia=1) per reusable-workflow invocation; this is ($OS, $VER)." + env: + OS: "${{ inputs.os }}" + VER: "${{ inputs.julia-version }}" + - uses: actions/checkout@v4 + if: "${{ inputs.os == 'ubuntu-latest' && inputs.julia-version == '1' }}" - name: "Setup Julia" + if: "${{ inputs.os == 'ubuntu-latest' && inputs.julia-version == '1' }}" uses: julia-actions/setup-julia@v2 with: version: "1" - uses: julia-actions/cache@v2 - if: "${{ inputs.cache }}" + if: "${{ inputs.os == 'ubuntu-latest' && inputs.julia-version == '1' && inputs.cache }}" with: token: "${{ secrets.GITHUB_TOKEN }}" - uses: julia-actions/julia-buildpkg@v1 - if: "${{ inputs.buildpkg }}" + if: "${{ inputs.os == 'ubuntu-latest' && inputs.julia-version == '1' && inputs.buildpkg }}" with: localregistry: "${{ inputs.localregistry }}" - name: "Check compat upper bounds" + if: "${{ inputs.os == 'ubuntu-latest' && inputs.julia-version == '1' }}" uses: ITensor/ITensorActions/.github/actions/check-compat-bounds@main with: workspace-root: "."