-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (53 loc) · 1.85 KB
/
Copy pathci.yml
File metadata and controls
59 lines (53 loc) · 1.85 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
name: CI
on:
push:
branches: [main]
pull_request:
# Opt into Node.js 24 for all third-party JavaScript actions ahead of
# GitHub's June 2026 default switch. Silences the Node 20 deprecation
# notice emitted by setup-uv and codecov-action's github-script dep.
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v6
- run: uvx ruff check .
- run: uvx ruff format --check .
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
- run: uv sync --extra dev
- run: uv run pytest tests/ -v -x --tb=short -m "not neuron and not nki_simulator" --cov=trntensor --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: trnsci/trntensor
nki-simulator:
# Runs NKI kernels through nki.simulate(kernel)(numpy_args) on CPU.
# Catches Python-trace-level errors (bad kwargs, dropped ops, shape
# mismatches) pre-merge without AWS round-trips. MLIR verifier
# errors remain hardware-only (simulator explicitly skips compile).
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v6
with:
python-version: "3.12"
- run: uv sync --extra dev
- name: Install NKI simulator
run: uv pip install --extra-index-url https://pip.repos.neuron.amazonaws.com "nki>=0.3.0"
- name: Run simulator-backed kernel tests
env:
TRNTENSOR_USE_SIMULATOR: "1"
run: uv run pytest tests/ -v -m nki_simulator --tb=short