-
Notifications
You must be signed in to change notification settings - Fork 995
105 lines (92 loc) · 3.49 KB
/
Copy pathpython-testing.yml
File metadata and controls
105 lines (92 loc) · 3.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: Python Testing
on:
push:
branches: [main]
paths:
- "**.py"
- "pyproject.toml"
- "qdp/qdp-core/**/*.rs"
- "qdp/qdp-kernels/**/*.rs"
- "qdp/qdp-python/**/*.rs"
- "qdp/**/Cargo.toml"
- ".github/workflows/python-testing.yml"
pull_request:
branches: [main]
paths:
- "**.py"
- "pyproject.toml"
- "qdp/qdp-core/**/*.rs"
- "qdp/qdp-kernels/**/*.rs"
- "qdp/qdp-python/**/*.rs"
- "qdp/**/Cargo.toml"
- ".github/workflows/python-testing.yml"
workflow_dispatch:
jobs:
rust-check:
# Early gate: type-check both with and without CUDA stubs so duplicate
# stub definitions or cfg mismatches fail quickly instead of surfacing
# during the slower maturin build below. Also runs qdp-core f32 Parquet
# CPU smoke tests (issue #1342).
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
- name: Cargo check (no-CUDA stubs)
working-directory: qdp
env:
QDP_NO_CUDA: "1"
run: cargo check --workspace --tests
# CPU smoke for the f32 Parquet pipeline (issue #1342). No GPU in CI, so
# GPU fidelity cases self-skip when the probe finds no functional GPU
# (stub build: kernel launch returns Err; no driver: cudarc panics and
# catch_unwind treats it as skip). Reader-level assertions still run.
# Scoped to these two binaries — other gpu_*.rs tests lack probe-skip.
- name: Cargo test (f32 Parquet CPU smoke)
working-directory: qdp
env:
QDP_NO_CUDA: "1"
run: cargo test -p qdp-core --test parquet_f32 --test parquet_f32_fidelity
test:
needs: rust-check
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: pip install uv
- name: Install dependencies
run: uv sync --group dev
- name: Build QDP extension
uses: PyO3/maturin-action@v1
with:
working-directory: qdp/qdp-python
command: develop
args: --release
sccache: true
- name: Install PyTorch (CPU)
run: uv pip install torch --index-url https://download.pytorch.org/whl/cpu
- name: Run tests
run: uv run pytest -n auto testing/ -v