refactor(query-engine): unify instant/range key resolution (#581 stag… #663
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Rust Projects CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - 'asap-query-engine/**' | |
| - 'asap-planner-rs/**' | |
| - 'asap-common/dependencies/rs/**' | |
| - 'asap-common/tests/**' | |
| - 'asap-common/sketch-core/**' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| - '.github/workflows/rust.yml' | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| branches: [ main ] | |
| paths: | |
| - 'asap-query-engine/**' | |
| - 'asap-planner-rs/**' | |
| - 'asap-common/dependencies/rs/**' | |
| - 'asap-common/tests/**' | |
| - 'asap-common/sketch-core/**' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| - '.github/workflows/rust.yml' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| format-and-lint: | |
| if: github.event_name != 'pull_request' || github.event.pull_request.draft == false | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| components: rustfmt, clippy | |
| - name: Install protoc | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y protobuf-compiler | |
| - name: Run sccache-cache | |
| uses: mozilla-actions/[email protected] | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }} | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| - name: Run clippy | |
| run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings | |
| env: | |
| RUSTC_WRAPPER: sccache | |
| test: | |
| if: github.event_name != 'pull_request' || github.event.pull_request.draft == false | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| - name: Install protoc | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y protobuf-compiler | |
| - name: Run sccache-cache | |
| uses: mozilla-actions/[email protected] | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }} | |
| - name: Run all workspace tests | |
| run: cargo test --workspace --locked | |
| env: | |
| RUSTC_WRAPPER: sccache | |
| docker: | |
| runs-on: ubuntu-latest | |
| needs: [format-and-lint, test] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # - name: Configure git for private dependencies | |
| # run: git config --global url."https://x-access-token:${{ secrets.PRIVATE_REPO_TOKEN }}@github.com/".insteadOf "https://github.com/" | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build Docker image | |
| run: docker build -f asap-query-engine/Dockerfile -t sketchdb-queryengine-rust:latest . |