diff --git a/.github/workflows/python-test.yml b/.github/workflows/python-test.yml index 1123ec9..fdeffe9 100644 --- a/.github/workflows/python-test.yml +++ b/.github/workflows/python-test.yml @@ -17,7 +17,7 @@ concurrency: env: CARGO_TERM_COLOR: always - RUSTFLAGS: "-C debuginfo=1" + RUSTFLAGS: "-C debuginfo=line-tables-only" CARGO_INCREMENTAL: "0" jobs: @@ -31,8 +31,12 @@ jobs: - uses: actions/checkout@v4 - name: Setup Rust uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + # The rust-cache step below caches the bindings crate. + cache: false - uses: Swatinem/rust-cache@v2 with: + save-if: ${{ github.ref == 'refs/heads/main' }} shared-key: "lance-csr-python" # maturin builds the bindings crate, which sits outside the workspace. workspaces: crates/lance-csr-python diff --git a/.github/workflows/rust-test.yml b/.github/workflows/rust-test.yml index fe668d1..ba33588 100644 --- a/.github/workflows/rust-test.yml +++ b/.github/workflows/rust-test.yml @@ -16,7 +16,7 @@ concurrency: env: CARGO_TERM_COLOR: always - RUSTFLAGS: "-C debuginfo=1" + RUSTFLAGS: "-C debuginfo=line-tables-only" RUST_BACKTRACE: "1" CARGO_INCREMENTAL: "0" @@ -30,6 +30,8 @@ jobs: - uses: Swatinem/rust-cache@v2 with: shared-key: "lance-csr-deps" + # Pull requests restore main's cache but don't save copies that crowd it out. + save-if: ${{ github.ref == 'refs/heads/main' }} - name: Install dependencies run: | sudo apt update @@ -39,7 +41,9 @@ jobs: - name: Run tests run: cargo test --workspace # The Rust guide includes this example; run it so the documented code works. + # Run the binary the workspace test build made: `cargo run -p lance-csr` selects + # different features and would recompile lance-csr. - name: Run embedded example - run: cargo run -p lance-csr --example embedded_query + run: target/debug/examples/embedded_query - name: Check benchmarks run: cargo check -p lance-csr-benches --benches diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 40b3e0f..6e33149 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -27,6 +27,8 @@ jobs: - uses: actions-rust-lang/setup-rust-toolchain@v1 with: components: rustfmt + # Formatting compiles nothing, so there is nothing to cache. + cache: false - name: Check formatting run: cargo fmt --all --check @@ -38,6 +40,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: shared-key: "lance-csr-deps" + save-if: ${{ github.ref == 'refs/heads/main' }} - name: Install dependencies run: | sudo apt update