Skip to content

Commit 7cc95b6

Browse files
committed
ci: gate cuda san on cuda changes
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
1 parent 49b0088 commit 7cc95b6

1 file changed

Lines changed: 35 additions & 1 deletion

File tree

.github/workflows/cuda.yaml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ on:
1212
branches: [develop]
1313
pull_request: { }
1414
workflow_dispatch: { }
15+
schedule:
16+
# Nightly full run at 04:00 UTC. Regular CUDA build/test/cudf jobs run on
17+
# every PR; the compute-sanitizer matrix is path-filtered to the CUDA
18+
# crates for speed. This nightly run (and push-to-develop) restores
19+
# sanitizer coverage for changes in dependency crates (vortex-array,
20+
# vortex-buffer, encodings, ...) that can affect GPU kernels without
21+
# touching vortex-cuda/ itself.
22+
- cron: "0 4 * * *"
1523

1624
permissions:
1725
contents: read
@@ -21,6 +29,29 @@ env:
2129
RUST_BACKTRACE: 1
2230

2331
jobs:
32+
changes:
33+
name: "Detect CUDA changes"
34+
# Only meaningful on PRs; gates the sanitizer matrix only. Other events
35+
# (schedule/push/dispatch) run the sanitizers unconditionally via the
36+
# always() guard on cuda-test-sanitizer below.
37+
if: github.event_name == 'pull_request'
38+
runs-on: ubuntu-latest
39+
timeout-minutes: 10
40+
permissions:
41+
pull-requests: read
42+
outputs:
43+
cuda: ${{ steps.filter.outputs.cuda }}
44+
steps:
45+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
46+
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4
47+
id: filter
48+
with:
49+
filters: |
50+
cuda:
51+
- "vortex-cuda/**"
52+
- "vortex-test/**"
53+
- ".github/workflows/**"
54+
2455
cuda-build-lint:
2556
if: github.repository == 'vortex-data/vortex'
2657
name: "CUDA build & lint"
@@ -92,7 +123,10 @@ jobs:
92123
--verbose
93124
94125
cuda-test-sanitizer:
95-
if: github.repository == 'vortex-data/vortex'
126+
needs: [changes]
127+
if: >-
128+
always() && github.repository == 'vortex-data/vortex' &&
129+
(github.event_name != 'pull_request' || needs.changes.outputs.cuda == 'true')
96130
name: "CUDA tests (${{ matrix.sanitizer }})"
97131
timeout-minutes: 30
98132
runs-on: runs-on=${{ github.run_id }}/runner=gpu/tag=cuda-test-sanitizer

0 commit comments

Comments
 (0)