-
Notifications
You must be signed in to change notification settings - Fork 19
93 lines (87 loc) · 2.63 KB
/
CI.yml
File metadata and controls
93 lines (87 loc) · 2.63 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
name: CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
# Allow one concurrent deployment
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: test ${{ matrix.py }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
py:
- "3.13"
- "3.12"
- "3.11"
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
python-version: ${{ matrix.py }}
- uses: dtolnay/rust-toolchain@1.79.0
- uses: Swatinem/rust-cache@v2
- run: uv sync --extra test --locked
- run: uv run pytest --benchmark-disable -vvv --durations=10
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- uses: dtolnay/rust-toolchain@1.79.0
- uses: Swatinem/rust-cache@v2
- run: uv sync --extra test --locked
- run: make mypy
- run: make stubtest
benchmark:
runs-on: ${{ matrix.runner }}
strategy:
matrix:
# Run on codspeed for walltime and ubuntu for instrumenentation
runner: [ ubuntu-latest, codspeed-macro ]
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
# Work around import-time SciPy/sklearn segfaults on the codspeed ARM64 Python 3.13 runner.
python-version: "3.12"
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
python-version: "3.12"
- uses: dtolnay/rust-toolchain@1.79.0
- uses: Swatinem/rust-cache@v2
- run: |
export UV_PROJECT_ENVIRONMENT="${pythonLocation}"
uv sync --extra test --locked --python 3.12
- uses: CodSpeedHQ/action@v4.11.1
with:
token: ${{ secrets.CODSPEED_TOKEN }}
# allow updating snapshots due to indeterministic benchmarks
run: pytest -vvv --snapshot-update --durations=10 --codspeed-max-rounds=10 python/tests/test_array_api.py -k "test_jit or test_run_lda"
mode: ${{ matrix.runner == 'ubuntu-latest' && 'instrumentation' || 'walltime' }}
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- uses: dtolnay/rust-toolchain@1.79.0
- uses: Swatinem/rust-cache@v2
- name: Install graphviz
run: |
sudo apt-get update
sudo apt-get install -y graphviz
- run: uv sync --extra docs --locked
- run: make docs