-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathci.sh
More file actions
executable file
·21 lines (20 loc) · 997 Bytes
/
Copy pathci.sh
File metadata and controls
executable file
·21 lines (20 loc) · 997 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash
# Canonical CI dispatcher for this hybrid Rust+Python repo.
#
# WHY this exists (and not a bare `uv run python ci.py`):
# With a maturin-backed pyproject.toml at the repo root, a bare `uv run`
# walks up the tree, discovers pyproject.toml, and triggers a full maturin
# wheel build *before* running anything. A 200 ms fmt-check blows up to a
# 5+ minute cold build. `--no-project` suppresses that discovery, and
# `--script` reads PEP 723 inline deps from ci.py so the gate runs in an
# isolated venv with just what it needs.
#
# Both flags are load-bearing. See zackees/zccache#835 rules 2-3 for the
# full rationale.
#
# Reserve full `uv run` (without these flags) for named build entry points
# like `./test`, `./build`, `ci/build_wheel.py` — places that genuinely
# need the maturin wheel + extension module materialized.
set -euo pipefail
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
exec uv run --no-project --script "$script_dir/ci.py" "$@"