diff --git a/.github/workflows/test-wheel-linux.yml b/.github/workflows/test-wheel-linux.yml index 0bb470b26c3..e328939d052 100644 --- a/.github/workflows/test-wheel-linux.yml +++ b/.github/workflows/test-wheel-linux.yml @@ -128,6 +128,10 @@ jobs: steps: - name: Checkout ${{ github.event.repository.name }} uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + # Test sources must match the wheels under test (nightly runs + # reuse wheels built from an older commit of main). + ref: ${{ inputs.sha || github.sha }} - name: Setup proxy cache uses: nv-gha-runners/setup-proxy-cache@main diff --git a/.github/workflows/test-wheel-windows.yml b/.github/workflows/test-wheel-windows.yml index 7abfc74126b..8256981bff8 100644 --- a/.github/workflows/test-wheel-windows.yml +++ b/.github/workflows/test-wheel-windows.yml @@ -107,6 +107,10 @@ jobs: steps: - name: Checkout ${{ github.event.repository.name }} uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + # Test sources must match the wheels under test (nightly runs + # reuse wheels built from an older commit of main). + ref: ${{ inputs.sha || github.sha }} - name: Setup proxy cache uses: nv-gha-runners/setup-proxy-cache@main diff --git a/cuda_bindings/tests/test_cuda.py b/cuda_bindings/tests/test_cuda.py index 80ac5da0fd0..65212efbcb7 100644 --- a/cuda_bindings/tests/test_cuda.py +++ b/cuda_bindings/tests/test_cuda.py @@ -655,6 +655,8 @@ def test_ffi_coverage_jit_option_binary_loader_thread_count(): def test_ffi_coverage_jit_wall_time_pointer_is_valid(): """CU_JIT_WALL_TIME must give CUDA a valid writable float address, not a garbage pointer.""" helper = cuda._HelperCUjit_option(cuda.CUjit_option.CU_JIT_WALL_TIME, 0.0) + # Guard against NULL so a regression fails instead of segfaulting. + assert helper.cptr != 0 # Write a sentinel float via ctypes to confirm the pointer is addressable. ctypes.c_float.from_address(helper.cptr).value = 3.14 assert ctypes.c_float.from_address(helper.cptr).value == pytest.approx(3.14, rel=1e-5)