Skip to content

Commit 7d93e3b

Browse files
committed
CI: load harden-pip via $/ in the wheel test workflows
CodeRabbit noted on #3197 that the wheel test jobs check out inputs.sha, which in nightly runs is the head of the last successful main CI run and can predate the harden-pip action. A ./.github/actions reference resolves against that checkout, so every nightly wheel-test job would fail at "Harden pip" until a main CI run that includes the action succeeds (the same pitfall #3052 worked around for download-artifact-retry). Reference the action with GitHub's self-repository syntax instead, which resolves at the running workflow's commit regardless of the checkout. It requires runner 2.336.0 or newer; the GPU runners report 2.337.0. actionlint v1.7.12, the latest release, does not yet recognize $/ (rhysd/actionlint#711), so add narrow per-file ignores for it. Refs #3195, #3197 Signed-off-by: Ralf Juengling <[email protected]>
1 parent 72dff4d commit 7d93e3b

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

‎.github/actionlint.yaml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,11 @@ paths:
2121
".github/workflows/ci-workflow-health.yml":
2222
ignore:
2323
- 'unexpected key "queue" for "concurrency" section'
24+
# GitHub supports self-repository ($/) action references, but the latest
25+
# actionlint release does not yet recognize them (rhysd/actionlint#711).
26+
".github/workflows/test-wheel-linux.yml":
27+
ignore:
28+
- 'specifying action "\$/[^"]+" in invalid format because ref is missing'
29+
".github/workflows/test-wheel-windows.yml":
30+
ignore:
31+
- 'specifying action "\$/[^"]+" in invalid format because ref is missing'

‎.github/workflows/test-wheel-linux.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,9 @@ jobs:
333333
AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache"
334334

335335
- name: Harden pip
336-
uses: ./.github/actions/harden-pip
336+
# $/ resolves at the workflow's commit. ./ would resolve against the
337+
# inputs.sha checkout, which can predate this action.
338+
uses: $/.github/actions/harden-pip
337339

338340
- name: Set up mini CTK
339341
if: ${{ matrix.LOCAL_CTK == '1' }}

‎.github/workflows/test-wheel-windows.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,9 @@ jobs:
312312
allow-prereleases: ${{ startsWith(matrix.PY_VER, '3.16') }}
313313

314314
- name: Harden pip
315-
uses: ./.github/actions/harden-pip
315+
# $/ resolves at the workflow's commit. ./ would resolve against the
316+
# inputs.sha checkout, which can predate this action.
317+
uses: $/.github/actions/harden-pip
316318

317319
- name: Verify LongPathsEnabled
318320
run: |

0 commit comments

Comments
 (0)