This is an automated email from the ASF dual-hosted git repository.
jiayu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/sedona-spatialbench.git
The following commit(s) were added to refs/heads/main by this push:
new 95bfa03 CI: fix caching and skip workflow runs for Markdown-only
changes (#23)
95bfa03 is described below
commit 95bfa035d48b189ca2ce77321a49c3c660123520
Author: Pranav Toggi <[email protected]>
AuthorDate: Fri Sep 19 21:06:50 2025 -0700
CI: fix caching and skip workflow runs for Markdown-only changes (#23)
* CI: fix caching; skip workflow for docs
* make lint run in parallel; don't ignore rust.yaml changes
---
.github/workflows/rust.yml | 104 ++++++++++++++-------------------------------
1 file changed, 31 insertions(+), 73 deletions(-)
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index f6bca63..27a362a 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -3,8 +3,20 @@ name: Rust
on:
push:
branches: ["main"]
+ paths-ignore:
+ - 'docs/**'
+ - 'images/**'
+ - '*.md'
pull_request:
- workflow_dispatch: # Allow manual triggering
+ paths-ignore:
+ - 'docs/**'
+ - 'images/**'
+ - '*.md'
+ workflow_dispatch:
+
+concurrency:
+ group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }}
+ cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
@@ -18,16 +30,10 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- - name: Cache cargo registry and build artifacts
- uses: actions/cache@v4
+ - uses: Swatinem/rust-cache@v2
with:
- path: |
- ~/.cargo/registry
- ~/.cargo/git
- target
- key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- restore-keys: |
- ${{ runner.os }}-cargo-
+ # Update this key to force a new cache
+ prefix-key: "rust-lint-v1"
- name: Run cargo-fmt
run: cargo fmt --all -- --check
- name: Run cargo-clippy
@@ -38,105 +44,57 @@ jobs:
# Tests for spatialbench
test-tests-spatialbench:
runs-on: ubuntu-latest
- needs: lint
steps:
- uses: actions/checkout@v4
- - name: Setup Rust toolchain
- uses: dtolnay/rust-toolchain@stable
- - name: Cache cargo registry and build artifacts
- uses: actions/cache@v4
+ - uses: dtolnay/rust-toolchain@stable
+ - uses: Swatinem/rust-cache@v2
with:
- path: |
- ~/.cargo/registry
- ~/.cargo/git
- target
- key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- restore-keys: |
- ${{ runner.os }}-cargo-
+ prefix-key: "rust-test-tests-spatialbench-v1"
- name: Tests (spatialbench)
run: cargo test -p spatialbench --tests
- # doc examples test for spatialbench (takes a while)
test-doc-spatialbench:
runs-on: ubuntu-latest
- needs: lint
steps:
- uses: actions/checkout@v4
- - name: Setup Rust toolchain
- uses: dtolnay/rust-toolchain@stable
- - name: Cache cargo registry and build artifacts
- uses: actions/cache@v4
+ - uses: dtolnay/rust-toolchain@stable
+ - uses: Swatinem/rust-cache@v2
with:
- path: |
- ~/.cargo/registry
- ~/.cargo/git
- target
- key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- restore-keys: |
- ${{ runner.os }}-cargo-
+ prefix-key: "rust-test-doc-spatialbench-v1"
- name: Doc Tests (spatialbench)
run: cargo test -p spatialbench --doc
- # All tests for spatialbench-arrow
test-all-spatialbench-arrow:
runs-on: ubuntu-latest
- needs: lint
steps:
- uses: actions/checkout@v4
- - name: Setup Rust toolchain
- uses: dtolnay/rust-toolchain@stable
- - name: Cache cargo registry and build artifacts
- uses: actions/cache@v4
+ - uses: dtolnay/rust-toolchain@stable
+ - uses: Swatinem/rust-cache@v2
with:
- path: |
- ~/.cargo/registry
- ~/.cargo/git
- target
- key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- restore-keys: |
- ${{ runner.os }}-cargo-
+ prefix-key: "rust-test-all-spatialbench-arrow-v1"
- name: All Tests (spatialbench-arrow)
run: cargo test -p spatialbench-arrow
- # All tests for spatialbench-cli
test-all-spatialbench-cli:
runs-on: ubuntu-latest
- needs: lint
steps:
- uses: actions/checkout@v4
- - name: Setup Rust toolchain
- uses: dtolnay/rust-toolchain@stable
- - name: Cache cargo registry and build artifacts
- uses: actions/cache@v4
+ - uses: dtolnay/rust-toolchain@stable
+ - uses: Swatinem/rust-cache@v2
with:
- path: |
- ~/.cargo/registry
- ~/.cargo/git
- target
- key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- restore-keys: |
- ${{ runner.os }}-cargo-
+ prefix-key: "rust-test-all-spatialbench-cli-v1"
- name: All Tests (spatialbench-cli)
run: cargo test -p spatialbench-cli
# documentation build
docs:
runs-on: ubuntu-latest
- needs: lint
steps:
- uses: actions/checkout@v4
- - name: Setup Rust toolchain
- uses: dtolnay/rust-toolchain@stable
- - name: Cache cargo registry and build artifacts
- uses: actions/cache@v4
+ - uses: dtolnay/rust-toolchain@stable
+ - uses: Swatinem/rust-cache@v2
with:
- path: |
- ~/.cargo/registry
- ~/.cargo/git
- target
- key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- restore-keys: |
- ${{ runner.os }}-cargo-
+ prefix-key: "rust-docs-v1"
- name: Build docs
env:
RUSTDOCFLAGS: "-D warnings"