mirror of
https://github.com/qdrant/qdrant.git
synced 2026-08-05 17:40:55 -05:00
* lib/edge/publish/cargo: improve target directory discovery
Don't hardcode workspace root, ask cargo instead.
* Fix warning in qdrant-edge amalgamation
`cargo check` in `lib/edge/publish` produces the following warning:
warning: type `PointerUpdates` is more private than the item `gridstore::tracker::Tracker::<S>::write_pending`
* lib/edge/publish/examples: fix compiler warnings
* refactor: lib/edge/publish/examples: put DATA_DIRECTORY into lib.rs
To match python examples that have the same constant in `common.py`.
* Use `lib/edge/data` dir for both Python and Rust examples
Before this commit, `lib/edge/publish/data` and `lib/edge/python/data`
were used. I'd like Python and Rust to use the same prepared resources
in the future.
* ❗Add lib/edge/Justfile with recipes to build/run examples
I constantly keep forgetting how to compile and run edge stuff.
Also, this would be used in CI in subsequent commits.
* ❗doc: lib/edge/README.md: Combine Rust and Python Edge readmes
Also now we can rename `creates-io-readme.md` to `README.md` like
reasonable people.
* ❗doc: Add qdrant-edge-py README.md
Since the previous commit removed qdrant-edge-py README.md, we need to
add something in its place instead.
The new README is adapted from Rust edge README.
And the previous README wasn't good anyway, see [1], it mentions maturin
which is irrelevant for users.
[1]: https://pypi.org/project/qdrant-edge-py/0.5.0/
* GHA: Add "Setup Qdrant" composite action
We need running Qdrant instance to test edge examples on CI. We can't
use docker for this because we want to run tests on Windows and macOS.
OTOH, this action downloads binaries for all platforms provided in
https://github.com/qdrant/qdrant/releases/tag/v1.17.0
* ❗GHA: Use single worflow for python and rust edge examples
Merge workflows to reuse build cache. Also, modernize it by using `uv`,
and recently introduced `setup-qdrant` and Justfile. Also, make it run
on three platforms (only on merges).
* ❗GHA: edge-{py,rust}-release: also run examples before publishing
Use similar approach as in the previous commit. But note that this time
we build/test also on ARM Linux and Windows.
106 lines
2.5 KiB
YAML
106 lines
2.5 KiB
YAML
name: Qdrant Edge Rust Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
publish:
|
|
description: 'Publish to crates.io'
|
|
type: boolean
|
|
default: false
|
|
required: true
|
|
|
|
|
|
jobs:
|
|
edge-rust-check:
|
|
name: Check Qdrant Edge Rust Package [${{ matrix.os }}]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
- macos-latest
|
|
- ubuntu-24.04-arm
|
|
- ubuntu-latest
|
|
- windows-11-arm
|
|
- windows-latest
|
|
|
|
steps:
|
|
- name: Checkout Qdrant
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Install mold
|
|
if: startsWith(matrix.os, 'ubuntu')
|
|
uses: rui314/setup-mold@v1
|
|
|
|
- name: Install Just
|
|
# TODO: switch to extractions/setup-just@v3 once this PR is merged:
|
|
# https://github.com/extractions/setup-crate/pull/8
|
|
uses: xzfc/setup-just@fb4bb125d47d4680296d3f3766c6ec83f70b3523
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v7
|
|
|
|
- name: Install ast-grep
|
|
run: uv tool install ast-grep-cli
|
|
|
|
- name: Setup Qdrant (for testing examples)
|
|
id: setup-qdrant
|
|
# No Qdrant release for Windows ARM yet.
|
|
# So, build only, but not test.
|
|
if: matrix.os != 'windows-11-arm'
|
|
uses: ./.github/actions/setup-qdrant
|
|
|
|
- name: Restore Rust build cache
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Prepare data files (for testing examples)
|
|
if: steps.setup-qdrant.conclusion == 'success'
|
|
working-directory: lib/edge
|
|
run: just prepare-data
|
|
|
|
- name: Build examples
|
|
working-directory: lib/edge
|
|
run: just rs-examples-build
|
|
|
|
- name: Run examples
|
|
if: steps.setup-qdrant.conclusion == 'success'
|
|
working-directory: lib/edge
|
|
run: just rs-examples
|
|
|
|
|
|
publish:
|
|
name: Publish to crates.io
|
|
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- edge-rust-check
|
|
|
|
if: inputs.publish
|
|
|
|
steps:
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v7
|
|
|
|
- name: Install ast-grep
|
|
run: uv tool install ast-grep-cli
|
|
|
|
- name: Checkout Qdrant
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Amalgamate
|
|
run: uv run lib/edge/publish/amalgamate.py
|
|
|
|
- name: Publish to crates.io
|
|
working-directory: lib/edge/publish
|
|
env:
|
|
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN_EDGE }}
|
|
run: cargo publish -p qdrant-edge --no-verify
|