4040 runs-on : ubuntu-latest
4141 outputs :
4242 skip : ${{ steps.get-should-skip.outputs.skip }}
43+ doc-only : ${{ steps.get-should-skip.outputs.doc_only }}
4344 steps :
4445 - name : Checkout repository
4546 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -50,11 +51,16 @@ jobs:
5051 run : |
5152 set -euxo pipefail
5253 if ${{ startsWith(github.ref_name, 'pull-request/') }}; then
53- skip="$(gh pr view "$(grep -Po '(\d+)$' <<< '${{ github.ref_name }}')" --json title --jq '.title | contains("[no-ci]")')"
54+ pr_number="$(grep -Po '(\d+)$' <<< '${{ github.ref_name }}')"
55+ pr_title="$(gh pr view "${pr_number}" --json title --jq '.title')"
56+ skip="$(echo "${pr_title}" | grep -q '\[no-ci\]' && echo true || echo false)"
57+ doc_only="$(echo "${pr_title}" | grep -q '\[doc-only\]' && echo true || echo false)"
5458 else
5559 skip=false
60+ doc_only=false
5661 fi
5762 echo "skip=${skip}" >> "$GITHUB_OUTPUT"
63+ echo "doc_only=${doc_only}" >> "$GITHUB_OUTPUT"
5864
5965 # LLVM build stages (matching GitLab build-llvm stage)
6066 build-llvm-linux-64 :
6975 build-llvm-linux-aarch64 :
7076 needs :
7177 - should-skip
72- if : ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) }}
78+ if : ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) && !fromJSON(needs.should-skip.outputs.doc-only) }}
7379 uses : ./.github/workflows/build-llvm.yml
7480 with :
7581 host-platform : linux-aarch64
7884 build-llvm-windows :
7985 needs :
8086 - should-skip
81- if : ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) }}
87+ if : ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) && !fromJSON(needs.should-skip.outputs.doc-only) }}
8288 uses : ./.github/workflows/build-llvm.yml
8389 with :
8490 host-platform : win-64
@@ -115,7 +121,7 @@ jobs:
115121 host-platform :
116122 - linux-aarch64
117123 name : Build ${{ matrix.host-platform }}
118- if : ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) }}
124+ if : ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) && !fromJSON(needs.should-skip.outputs.doc-only) }}
119125 uses : ./.github/workflows/build-wheel.yml
120126 with :
121127 host-platform : ${{ matrix.host-platform }}
@@ -134,7 +140,7 @@ jobs:
134140 host-platform :
135141 - win-64
136142 name : Build ${{ matrix.host-platform }}
137- if : ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) }}
143+ if : ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.skip) && !fromJSON(needs.should-skip.outputs.doc-only) }}
138144 uses : ./.github/workflows/build-wheel.yml
139145 with :
140146 host-platform : ${{ matrix.host-platform }}
@@ -149,10 +155,11 @@ jobs:
149155 host-platform :
150156 - linux-64
151157 name : Test ${{ matrix.host-platform }}
152- if : ${{ github.repository_owner == 'nvidia' }}
158+ if : ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.doc-only) }}
153159 permissions :
154160 contents : read # This is required for actions/checkout
155161 needs :
162+ - should-skip
156163 - build-linux-64
157164 uses : ./.github/workflows/test-wheel-linux.yml
158165 with :
@@ -167,10 +174,11 @@ jobs:
167174 host-platform :
168175 - linux-aarch64
169176 name : Test ${{ matrix.host-platform }}
170- if : ${{ github.repository_owner == 'nvidia' }}
177+ if : ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.doc-only) }}
171178 permissions :
172179 contents : read # This is required for actions/checkout
173180 needs :
181+ - should-skip
174182 - build-linux-aarch64
175183 uses : ./.github/workflows/test-wheel-linux.yml
176184 with :
@@ -184,10 +192,11 @@ jobs:
184192 host-platform :
185193 - win-64
186194 name : Test ${{ matrix.host-platform }}
187- if : ${{ github.repository_owner == 'nvidia' }}
195+ if : ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.doc-only) }}
188196 permissions :
189197 contents : read # This is required for actions/checkout
190198 needs :
199+ - should-skip
191200 - build-windows
192201 uses : ./.github/workflows/test-wheel-windows.yml
193202 with :
@@ -196,76 +205,83 @@ jobs:
196205
197206 test-expensive-linux-64 :
198207 name : Expensive Test linux-64
199- if : ${{ github.repository_owner == 'nvidia' }}
208+ if : ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.doc-only) }}
200209 permissions :
201210 contents : read # This is required for actions/checkout
202211 needs :
212+ - should-skip
203213 - build-linux-64
204214 uses : ./.github/workflows/test-expensive-linux.yml
205215 with :
206216 host-platform : linux-64
207217
208218 test-expensive-linux-aarch64 :
209219 name : Expensive Test linux-aarch64
210- if : ${{ github.repository_owner == 'nvidia' }}
220+ if : ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.doc-only) }}
211221 permissions :
212222 contents : read # This is required for actions/checkout
213223 needs :
224+ - should-skip
214225 - build-linux-aarch64
215226 uses : ./.github/workflows/test-expensive-linux.yml
216227 with :
217228 host-platform : linux-aarch64
218229
219230 test-cudf-source-linux-64 :
220231 name : cudf source Test linux-64
221- if : ${{ github.repository_owner == 'nvidia' }}
232+ if : ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.doc-only) }}
222233 permissions :
223234 contents : read
224235 needs :
236+ - should-skip
225237 - build-linux-64
226238 uses : ./.github/workflows/test-cudf-source-linux.yml
227239 with :
228240 host-platform : linux-64
229241
230242 test-cudf-source-linux-aarch64 :
231243 name : cudf source Test linux-aarch64
232- if : ${{ github.repository_owner == 'nvidia' }}
244+ if : ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.doc-only) }}
233245 permissions :
234246 contents : read
235247 needs :
248+ - should-skip
236249 - build-linux-aarch64
237250 uses : ./.github/workflows/test-cudf-source-linux.yml
238251 with :
239252 host-platform : linux-aarch64
240253
241254 test-numbast-mlir-linux-64 :
242255 name : Numbast MLIR Test linux-64
243- if : ${{ github.repository_owner == 'nvidia' }}
256+ if : ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.doc-only) }}
244257 permissions :
245258 contents : read
246259 needs :
260+ - should-skip
247261 - build-linux-64
248262 uses : ./.github/workflows/test-numbast-mlir-linux.yml
249263 with :
250264 host-platform : linux-64
251265
252266 test-numbast-mlir-linux-aarch64 :
253267 name : Numbast MLIR Test linux-aarch64
254- if : ${{ github.repository_owner == 'nvidia' }}
268+ if : ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.doc-only) }}
255269 permissions :
256270 contents : read
257271 needs :
272+ - should-skip
258273 - build-linux-aarch64
259274 uses : ./.github/workflows/test-numbast-mlir-linux.yml
260275 with :
261276 host-platform : linux-aarch64
262277
263278 test-cuda-gdb-linux-64 :
264279 name : cuda-gdb Test linux-64
265- if : ${{ github.repository_owner == 'nvidia' }}
280+ if : ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.doc-only) }}
266281 permissions :
267282 contents : read
268283 needs :
284+ - should-skip
269285 - build-linux-64
270286 uses : ./.github/workflows/test-wheel-linux.yml
271287 with :
@@ -277,10 +293,11 @@ jobs:
277293
278294 test-cuda-gdb-linux-aarch64 :
279295 name : cuda-gdb Test linux-aarch64
280- if : ${{ github.repository_owner == 'nvidia' }}
296+ if : ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.doc-only) }}
281297 permissions :
282298 contents : read
283299 needs :
300+ - should-skip
284301 - build-linux-aarch64
285302 uses : ./.github/workflows/test-wheel-linux.yml
286303 with :
@@ -327,6 +344,7 @@ jobs:
327344 if : always()
328345 runs-on : ubuntu-latest
329346 needs :
347+ - should-skip
330348 - test-linux-64
331349 - test-linux-aarch64
332350 - test-windows
@@ -344,51 +362,47 @@ jobs:
344362 steps :
345363 - name : Exit
346364 run : |
347- # if any dependencies were cancelled or failed, that's a failure
348- #
349- # see https://docs.github.com/en/actions/reference/workflows-and-actions/expressions#always
350- # and https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks
351- # for why this cannot be encoded in the job-level `if:` field
352- #
353- # TL; DR: `$REASONS`
354- #
355- # The intersection of skipped-as-success and required status checks
356- # creates a scenario where if you DON'T `always()` run this job, the
357- # status check UI will block merging and if you DO `always()` run and
358- # a dependency is _cancelled_ (due to a critical failure, which is
359- # somehow not considered a failure ¯\_(ツ)_/¯) then the critically
360- # failing job(s) will timeout causing a cancellation here and the
361- # build to succeed which we don't want (originally this was just
362- # 'exit 0')
363- if ${{ needs.test-windows.result == 'cancelled' ||
364- needs.test-windows.result == 'failure' ||
365- needs.test-linux-64.result == 'cancelled' ||
366- needs.test-linux-64.result == 'failure' ||
367- needs.test-linux-aarch64.result == 'cancelled' ||
368- needs.test-linux-aarch64.result == 'failure' ||
369- needs.test-expensive-linux-64.result == 'cancelled' ||
370- needs.test-expensive-linux-64.result == 'failure' ||
371- needs.test-expensive-linux-aarch64.result == 'cancelled' ||
372- needs.test-expensive-linux-aarch64.result == 'failure' ||
373- needs.test-cudf-source-linux-64.result == 'cancelled' ||
374- needs.test-cudf-source-linux-64.result == 'failure' ||
375- needs.test-cudf-source-linux-aarch64.result == 'cancelled' ||
376- needs.test-cudf-source-linux-aarch64.result == 'failure' ||
377- needs.test-numbast-mlir-linux-64.result == 'cancelled' ||
378- needs.test-numbast-mlir-linux-64.result == 'failure' ||
379- needs.test-numbast-mlir-linux-aarch64.result == 'cancelled' ||
380- needs.test-numbast-mlir-linux-aarch64.result == 'failure' ||
381- needs.test-cuda-gdb-linux-64.result == 'cancelled' ||
382- needs.test-cuda-gdb-linux-64.result == 'failure' ||
383- needs.test-cuda-gdb-linux-aarch64.result == 'cancelled' ||
384- needs.test-cuda-gdb-linux-aarch64.result == 'failure' ||
385- needs.build-docs.result == 'cancelled' ||
386- needs.build-docs.result == 'failure' }}; then
387- # needs.coverage-report.result == 'cancelled' ||
388- # needs.coverage-report.result == 'failure' ||
389- # needs.test-simulator.result == 'cancelled' ||
390- # needs.test-simulator.result == 'failure' ||
391- exit 1
392- else
365+ # GitHub treats `result == 'skipped'` as success for required
366+ # status checks (see CCCL gate comment + cccl#605). The previous
367+ # `cancelled || failure` predicate let upstream build failures
368+ # propagate as `skipped` on downstream test jobs and silently
369+ # pass this aggregator. Adopt CCCL's `check_result` pattern:
370+ # require an explicit `expected` status per dependency, where
371+ # anything else (including `skipped` from a failed upstream)
372+ # fails the gate. `if: always()` on the job still ensures this
373+ # step runs even when needs are skipped.
374+ if [[ "${{ needs.should-skip.outputs.skip }}" == "true" ]]; then
375+ echo "[no-ci] - skipping aggregator checks"
393376 exit 0
394377 fi
378+
379+ doc_only="${{ needs.should-skip.outputs.doc-only }}"
380+ status="success"
381+ check_result() {
382+ name=$1; expected=$2; result=$3
383+ echo "Checking $name: result='$result' (expected '$expected')"
384+ if [[ "$result" != "$expected" ]]; then
385+ echo "::error::$name did not match expected result"
386+ status="failed"
387+ fi
388+ }
389+
390+ # always expected to succeed (even in [doc-only] mode)
391+ check_result "should-skip" "success" "${{ needs.should-skip.result }}"
392+ check_result "build-docs" "success" "${{ needs.build-docs.result }}"
393+
394+ # [doc-only] flips these from 'success' to 'skipped'
395+ if [[ "$doc_only" == "true" ]]; then expected="skipped"; else expected="success"; fi
396+ check_result "test-linux-64" "$expected" "${{ needs.test-linux-64.result }}"
397+ check_result "test-linux-aarch64" "$expected" "${{ needs.test-linux-aarch64.result }}"
398+ check_result "test-windows" "$expected" "${{ needs.test-windows.result }}"
399+ check_result "test-expensive-linux-64" "$expected" "${{ needs.test-expensive-linux-64.result }}"
400+ check_result "test-expensive-linux-aarch64" "$expected" "${{ needs.test-expensive-linux-aarch64.result }}"
401+ check_result "test-cudf-source-linux-64" "$expected" "${{ needs.test-cudf-source-linux-64.result }}"
402+ check_result "test-cudf-source-linux-aarch64" "$expected" "${{ needs.test-cudf-source-linux-aarch64.result }}"
403+ check_result "test-numbast-mlir-linux-64" "$expected" "${{ needs.test-numbast-mlir-linux-64.result }}"
404+ check_result "test-numbast-mlir-linux-aarch64" "$expected" "${{ needs.test-numbast-mlir-linux-aarch64.result }}"
405+ check_result "test-cuda-gdb-linux-64" "$expected" "${{ needs.test-cuda-gdb-linux-64.result }}"
406+ check_result "test-cuda-gdb-linux-aarch64" "$expected" "${{ needs.test-cuda-gdb-linux-aarch64.result }}"
407+
408+ [[ "$status" == "success" ]]
0 commit comments