Skip to content

Commit 06707f2

Browse files
committed
CI: tighten driver hash test key/regex and disable auxiliary checkout creds
Signed-off-by: Ralf Juengling <rjuengling@nvidia.com>
1 parent 5151c9a commit 06707f2

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ jobs:
153153
ref: ${{ github.sha }}
154154
path: .driver-tools
155155
sparse-checkout: ci/tools
156+
persist-credentials: false
156157

157158
- name: Install GPU driver
158159
if: ${{ matrix.DRIVER != 'latest' && matrix.DRIVER != 'earliest' }}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ jobs:
126126
ref: ${{ github.sha }}
127127
path: .driver-tools
128128
sparse-checkout: ci/tools
129+
persist-credentials: false
129130

130131
- name: Install GPU driver
131132
if: ${{ matrix.DRIVER != 'latest' && matrix.DRIVER != 'earliest' }}

‎ci/tools/tests/test_test_matrix_driver_hashes.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ def test_test_matrix_custom_drivers_have_valid_consistent_sha256() -> None:
3131
continue
3232
custom_rows += 1
3333
sha256 = row.get("DRIVER_SHA256", "")
34-
assert SHA256_RE.match(sha256), f"{platform}.{section_name}[{index}] has invalid DRIVER_SHA256"
35-
key = (platform, str(row["ARCH"]), str(row["GPU"]), str(driver))
34+
assert SHA256_RE.fullmatch(sha256), f"{platform}.{section_name}[{index}] has invalid DRIVER_SHA256"
35+
key = (platform, str(row["ARCH"]), "" if platform == "linux" else str(row["GPU"]), str(driver))
3636
assert seen_hashes.setdefault(key, sha256) == sha256, f"Conflicting DRIVER_SHA256 for {key}"
3737

3838
assert custom_rows > 0

0 commit comments

Comments
 (0)