Files
qdrant/.github/workflows/edge-test.yml
xzfc d8383861b2 Test edge examples on CI (#8318)
* 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.
2026-03-11 17:13:46 +00:00

105 lines
2.4 KiB
YAML

name: Qdrant Edge Tests
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ '**' ]
jobs:
edge-test:
name: Test Qdrant Edge
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# For PRs, only run on ubuntu to save CI time
os: >-
${{
github.event_name == 'pull_request'
&& fromJSON('["ubuntu-latest"]')
|| fromJSON('["ubuntu-latest", "macos-latest", "windows-latest"]')
}}
steps:
- name: Checkout Qdrant
uses: actions/checkout@v6
- name: Install Rust nightly (for fmt)
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Install mold
if: runner.os == 'Linux'
uses: rui314/setup-mold@v1
- name: Enable mold
if: runner.os == 'Linux'
run: |
mkdir .cargo
cat >.cargo/config.toml <<-EOF
[target.x86_64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-C", "link-arg=-fuse-ld=/usr/local/bin/mold"]
EOF
- name: Install Python
uses: actions/setup-python@v6
with:
python-version: '3.14'
- name: Install Just
uses: extractions/setup-just@v3
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Install tools
run: |
uv tool install ast-grep-cli
uv tool install maturin
- name: Setup Qdrant
uses: ./.github/actions/setup-qdrant
- name: Restore Rust build cache
uses: Swatinem/rust-cache@v2
- name: Prepare data files
id: rs-prepare-data
working-directory: lib/edge
run: just prepare-data
- name: 🦀 Check Rust
working-directory: lib/edge
run: just rs-check
- name: 🦀 Build Rust examples
working-directory: lib/edge
run: just rs-examples-build
- name: 🦀 Run Rust examples
working-directory: lib/edge
run: just rs-examples
- name: 🐍 Build Python edge
working-directory: lib/edge/python
run: just py-build
- name: 🐍 Run Python examples
working-directory: lib/edge
run: just py-examples
- name: Check for uncommitted changes
if: always()
run: git diff --exit-code