Skip to content

Commit 3c3638e

Browse files
erichutchinsclaude
andcommitted
ci: improve caching — debuginfo=0, save-if main only, pin test-os Python, enable uv cache
- Add -C debuginfo=0 to RUSTFLAGS to reduce Rust compile time and memory - Set save-if: main on all rust-cache steps so PR runs don't thrash the cache - Add enable-cache: true to all setup-uv steps - Pin test-os Python to 3.12 (was unspecified, resolved to runner default) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 7d71024 commit 3c3638e

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/publish_to_pypi.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ concurrency:
1616
permissions:
1717
contents: read # Default read-only permissions
1818

19-
# Make sure CI fails on all warnings, including Clippy lints
19+
# Treat all Rust warnings as errors; skip debug symbols to reduce compile time/memory
2020
env:
21-
RUSTFLAGS: "-Dwarnings"
21+
RUSTFLAGS: "-Dwarnings -C debuginfo=0"
2222

2323
jobs:
2424
# ------------------------------------------------------------------
@@ -45,11 +45,14 @@ jobs:
4545

4646
- name: Rust Cache
4747
uses: swatinem/rust-cache@v2
48+
with:
49+
save-if: ${{ github.ref_name == 'main' }}
4850

4951
- name: Install uv and Python
5052
uses: astral-sh/setup-uv@v5
5153
with:
5254
python-version: ${{ matrix.python-version }}
55+
enable-cache: true
5356

5457
- name: install deps
5558
run: uv sync --group dev
@@ -83,9 +86,14 @@ jobs:
8386

8487
- name: cache rust
8588
uses: Swatinem/rust-cache@v2
89+
with:
90+
save-if: ${{ github.ref_name == 'main' }}
8691

8792
- name: install uv
8893
uses: astral-sh/setup-uv@v5
94+
with:
95+
python-version: "3.12"
96+
enable-cache: true
8997

9098
- name: install deps
9199
run: uv sync --group dev

0 commit comments

Comments
 (0)