mirror of
https://github.com/astral-sh/uv.git
synced 2025-09-27 04:29:10 +00:00
Only write to rust cache in CI from main branch (#874)
Each cache entry is ~1 GB of our allotted 10 GB for the repository which
is quite a bit. We're probably losing cache entries all the time since
we add an entry per commit per pull request.
Saving the cache takes ~3 minutes
([example](2035812496
)),
it's probably just slowing down CI. It's ~25% of our test runtime and
~50% of our clippy runtime.
This commit is contained in:
parent
811332eacc
commit
d47eeccca8
2 changed files with 6 additions and 0 deletions
4
.github/workflows/ci.yaml
vendored
4
.github/workflows/ci.yaml
vendored
|
@ -37,6 +37,8 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
rustup component add clippy
|
rustup component add clippy
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
- name: "Clippy"
|
- name: "Clippy"
|
||||||
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
|
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
|
||||||
|
|
||||||
|
@ -65,6 +67,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
tool: cargo-insta
|
tool: cargo-insta
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
- name: "Tests (Ubuntu)"
|
- name: "Tests (Ubuntu)"
|
||||||
if: ${{ matrix.os == 'ubuntu-latest' }}
|
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||||
run: cargo insta test --all --all-features --unreferenced reject
|
run: cargo insta test --all --all-features --unreferenced reject
|
||||||
|
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
@ -96,6 +96,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: swatinem/rust-cache@v2
|
- uses: swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
- name: Install cargo-dist
|
- name: Install cargo-dist
|
||||||
run: ${{ matrix.install_dist }}
|
run: ${{ matrix.install_dist }}
|
||||||
- name: Build artifacts
|
- name: Build artifacts
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue