Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 6 additions & 25 deletions .github/actions/setup-rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,15 @@ inputs:
required: false
components:
description: "optional override for the components to install for the step (e.g. clippy, rustfmt, miri)"
default: "clippy, rustfmt"
required: false
targets:
description: "optional targets override (e.g. wasm32-unknown-unknown)"
required: false
cache-suffix:
description: "optional suffix for cache key to isolate builds with different RUSTFLAGS (e.g. 'sanitizer')"
enable-sccache:
description: "Should sccache be enabled, true by default."
required: false
default: ""
timestamp:
description: "Timestamp cache with cargo sweep"
default: "false"
default: "true"

runs:
using: "composite"
Expand All @@ -47,17 +45,10 @@ runs:
with:
toolchain: "${{ steps.toolchain-config.outputs.toolchain }}"
targets: "${{ inputs.targets }}"
components: "${{ inputs.components || 'clippy, rustfmt' }}"

- name: Rust Dependency Cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref_name == 'develop' }}
# os and arch by default
shared-key: "rust-cache-${{ github.job }}-${{ runner.environment }}-${{ steps.rust-toolchain.outputs.cachekey }}-${{ inputs.targets }}${{ inputs.cache-suffix && format('-{0}', inputs.cache-suffix) || '' }}"
env-vars: "RUSTFLAGS"
components: "${{ inputs.components }}"

- name: Rust Compile Cache
if: inputs.enable-sccache == 'true'
uses: mozilla-actions/sccache-action@v0.0.9

- name: Install Protoc (for lance-encoding build step)
Expand All @@ -66,13 +57,3 @@ runs:
with:
version: "29.3"
repo-token: ${{ inputs.repo-token }}

- name: Install Sweep
shell: bash
if: ${{ inputs.timestamp == 'true' && github.ref_name == 'develop' }}
run: cargo install cargo-sweep

- name: Timestamp Cache
shell: bash
if: ${{ inputs.timestamp == 'true' && github.ref_name == 'develop' }}
run: cargo sweep --stamp
39 changes: 5 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,14 @@ jobs:
timeout-minutes: 120
steps:
- uses: actions/checkout@v6
- name: Rust Dependency Cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref_name == 'develop' }}
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
enable-sccache: "false"
- uses: mlugg/setup-zig@v2
- name: Install uv
uses: spiraldb/actions/.github/actions/setup-uv@0.18.5
Expand Down Expand Up @@ -228,7 +233,6 @@ jobs:
uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
timestamp: "true"
- name: Install wasm32 target
if: ${{ matrix.config.target == 'wasm32-unknown-unknown' }}
run: rustup target add wasm32-unknown-unknown
Expand All @@ -240,9 +244,6 @@ jobs:
run: |
git status --porcelain
test -z "$(git status --porcelain)"
- name: Prune cache
if: ${{ github.ref_name == 'develop' && steps.setup-rust.outputs.deps-cache-hit != 'true' }}
run: cargo sweep --file

check-min-deps:
name: "Check build with minimal dependencies"
Expand Down Expand Up @@ -286,7 +287,6 @@ jobs:
with:
toolchain: nightly
repo-token: ${{ secrets.GITHUB_TOKEN }}
timestamp: "true"
- name: Rust Lint - Format
run: cargo +nightly fmt --all --check
- name: Rustc check
Expand All @@ -297,9 +297,6 @@ jobs:
run: cargo clippy --locked --all-features --all-targets -- -D warnings
- name: Rust Lint - Clippy Default Features
run: cargo clippy --locked --all-targets -- -D warnings
- name: Prune cache
if: ${{ github.ref_name == 'develop' && steps.setup-rust.outputs.deps-cache-hit != 'true' }}
run: cargo sweep --file

rust-lint-no-default:
name: "Rust (lint, no default, ${{ matrix.partition }}/2)"
Expand All @@ -324,17 +321,13 @@ jobs:
uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
timestamp: "true"
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: Rust Lint - Clippy No Default Features
shell: bash
run: |
# https://spiraldb.slack.com/archives/C07BV3GKAJ2/p1732736281946729
cargo hack clippy --no-default-features --partition ${{ matrix.partition }}/2 -- -D warnings
- name: Prune cache
if: ${{ github.ref_name == 'develop' && steps.setup-rust.outputs.deps-cache-hit != 'true' }}
run: cargo sweep --file

rust-semver:
name: "Rust (semver checks)"
Expand All @@ -358,7 +351,6 @@ jobs:
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

# We have to set the correct Cargo.toml versions so semver checks uses the previous release.
- name: Latest Tag
id: latest-tag
Expand Down Expand Up @@ -407,7 +399,6 @@ jobs:
uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
timestamp: "true"
- name: Install grcov
uses: taiki-e/install-action@grcov
- name: Install nextest
Expand Down Expand Up @@ -441,14 +432,6 @@ jobs:
disable_search: true
flags: ${{ matrix.suite }}
use_oidc: true
- name: Cleanup coverage file
shell: bash
run: |
du -sh target/coverage/
rm -rf target/coverage/
- name: Prune cache
if: ${{ github.ref_name == 'develop' && steps.setup-rust.outputs.deps-cache-hit != 'true' }}
run: cargo sweep --file

rust-test:
name: "Rust tests (sanitizer)"
Expand Down Expand Up @@ -488,7 +471,6 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
toolchain: nightly
components: "rust-src, rustfmt, clippy, llvm-tools-preview"
timestamp: "true"
- name: Install build dependencies
run: |
sudo apt-get update
Expand All @@ -512,9 +494,6 @@ jobs:
--no-fail-fast \
--target x86_64-unknown-linux-gnu \
-p vortex-buffer -p vortex-ffi -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array
- name: Prune cache
if: ${{ github.ref_name == 'develop' && steps.setup-rust.outputs.deps-cache-hit != 'true' }}
run: cargo sweep --file

rust-test-other:
name: "Rust tests (${{ matrix.os }})"
Expand Down Expand Up @@ -555,7 +534,6 @@ jobs:
uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
timestamp: "true"
- name: Install nextest
uses: taiki-e/install-action@v2
with:
Expand All @@ -567,9 +545,6 @@ jobs:
- name: Rust Tests (Other)
if: matrix.os != 'windows-x64'
run: cargo nextest run --locked --workspace --all-features --no-fail-fast --exclude vortex-bench --exclude xtask
- name: Prune cache
if: ${{ github.ref_name == 'develop' && steps.setup-rust.outputs.deps-cache-hit != 'true' }}
run: cargo sweep --file

build-java:
name: "Java"
Expand Down Expand Up @@ -673,7 +648,6 @@ jobs:
uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
timestamp: "true"
- name: Build and run C++ unit tests
run: |
mkdir -p vortex-cxx/build
Expand All @@ -685,9 +659,6 @@ jobs:
cmake -S vortex-cxx/examples -B vortex-cxx/examples/build -DCMAKE_BUILD_TYPE=Release
cmake --build vortex-cxx/examples/build --parallel $(nproc)
vortex-cxx/examples/build/hello-vortex vortex-cxx/examples/goldenfiles/example.vortex
- name: Prune cache
if: ${{ github.ref_name == 'develop' && steps.setup-rust.outputs.deps-cache-hit != 'true' }}
run: cargo sweep --file

wasm-integration:
name: "wasm-integration"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
enable-sccache: "false"
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/fuzzer-fix-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
toolchain: nightly
enable-sccache: "false"

- name: Install llvm
uses: aminya/setup-cpp@v1
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
targets: ${{ matrix.target.target }}
enable-sccache: "false"

- name: Cargo Set Version
run: |
Expand Down Expand Up @@ -90,6 +91,7 @@ jobs:
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
enable-sccache: "false"
- run: cargo build --release --package vortex-jni
- uses: actions/upload-artifact@v5
with:
Expand Down Expand Up @@ -131,6 +133,7 @@ jobs:
with:
targets: ${{ matrix.target.target }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
enable-sccache: "false"
- run: cargo build --release --package vortex-jni
- uses: actions/upload-artifact@v5
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
enable-sccache: "false"

- name: Cargo Set Version
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/wasm-fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
toolchain: nightly
targets: "wasm32-wasip1"
components: "rust-src"
enable-sccache: "false"

- name: Build WASM fuzz target
run: |
Expand Down
Loading