Files
qdrant/.github/workflows/release-artifacts.yml
qdrant-cloud-bot 9efc061764 ci: fix and consolidate Rust build caches (#9516)
* ci: fix rust-cache running before checkout in shard-snapshot job

The `test-shard-snapshot-api-s3-minio` job ran `Swatinem/rust-cache`
before `actions/checkout`, so there was no `Cargo.lock`/source present
when the cache action ran. As a result the action no-opped and the job
never actually restored or saved a Rust build cache. Move the cache
step to run after checkout.

Co-authored-by: Cursor <cursoragent@cursor.com>

* ci: remove dead rust-cache steps from docker-only jobs

These jobs only build Docker images via `docker buildx`/docker build
and never invoke cargo directly, so the `Swatinem/rust-cache` step
never populates or restores anything useful:

- integration-tests.yml: `test-consistency` (docker buildx + shell
  consistency checks only)
- docker-image.yml: `build` and `build-gpu` (docker buildx only)

Drop the unused cache steps.

Co-authored-by: Cursor <cursoragent@cursor.com>

* ci: drop rust-cache from coverage and release workflows

These workflows run on rare triggers (coverage: nightly schedule;
release-artifacts: on release publish), so by the time they run again
their cache is almost always already evicted from the 10 GB Actions
cache budget. They mostly just consume cache space that would otherwise
be useful to the frequently-run PR builds, so remove the rust-cache
steps entirely:

- coverage.yml: unit-coverage and integration-coverage
- release-artifacts.yml: build-windows-binaries

Co-authored-by: Cursor <cursoragent@cursor.com>

* ci: drop explicit clippy cache key in rust-lint

The lint job has no compatible cache peer to share with: clippy
produces clippy-driver metadata that cargo fingerprints separately
from normal build/test artifacts, and its `--all-features` invocation
pulls in the GPU dependency crates, so it matches neither the
rust-tests nor the gpu group. With nothing to share, the explicit
`key: clippy` is equivalent to the default per-job key, so drop it for
consistency with the rest of the workflows.

Co-authored-by: Cursor <cursoragent@cursor.com>

* ci: dedicated rust-cache keys with single writer per group

Give related jobs explicit cache keys and let only the broadest build
in each group save the cache (`save-if: "false"` on the others), so a
narrower build can't overwrite it with fewer compiled dependencies
first.

- `rust-tests` (rust.yml): explicit `shared-key: rust-tests`. It builds
  `--workspace --tests`, which pulls in dev-dependency features that the
  integration-tests builds (plain `cargo build`) do not, so it is kept
  as its own dependency cache rather than merged with integration-tests.
- `integration-tests`: writer = integration-tests; readers =
  integration-tests-consensus, test-shard-snapshot-api-s3-minio.
- `edge`: writer = edge-test (clippy + examples build); reader =
  edge-rust-check. Both build the amalgamated qdrant-edge `examples`
  package.

rust-gpu keeps its own default cache (the `gpu` feature adds the
ash/gpu-allocator/shaderc dependency crates).

Co-authored-by: Cursor <cursoragent@cursor.com>

* Reuse `integration-tests` build cache for `io-bridge-object-store-tests` workflow

* Cleanup Docker cache in GHA workflows

* ci: only save rust-cache on the integration branch

Under the 10 GB Actions cache budget there's no practical benefit to
saving feature-branch build caches: they'd be evicted before being
reused. Scope every rust-cache *writer* to save only on `dev` (the
branch PRs target and restore from) via `save-if`:

- rust.yml, rust-lint.yml, edge-test.yml, integration-tests.yml

Reader jobs already have `save-if: "false"` and are unchanged.

Also drop rust-cache from rust-gpu.yml entirely: it only runs on
`master` pushes (releases, a few times a month at most), so any cache
would always be evicted between runs.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>
2026-06-20 13:44:45 +02:00

168 lines
5.5 KiB
YAML

name: Build and publish release packages
permissions:
contents: write
on:
release:
# 'published' is triggered when publishing draft release, 'created' is not
types: [published]
jobs:
build-linux-binaries:
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc-multilib clang cmake protobuf-compiler
rustup default stable
rustup update
rustup show
cargo -Vv
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install Protoc
uses: ./.github/actions/setup-protoc
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
- name: Install cross-compilation tools
with:
target: ${{ matrix.target }}
if: startsWith(matrix.os, 'ubuntu') && contains(matrix.target, '-musl')
uses: taiki-e/setup-cross-toolchain-action@3d9770ce98eb7dbcf378563182a5e8031165f75b # v1.41.0
- name: Build and publish
uses: taiki-e/upload-rust-binary-action@f0d45ae91ee7b8ee928de7a9d04d893a08bcbec6 # v1.30.2
with:
bin: qdrant
target: ${{ matrix.target }}
- name: Build Debian Package
if: matrix.target == 'x86_64-unknown-linux-musl'
run: |
bash -x tools/sync-web-ui.sh
cargo install cargo-deb
cargo deb --no-strip --target ${{ matrix.target }}
- name: Upload Debian package
if: matrix.target == 'x86_64-unknown-linux-musl'
uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # 2.11.5
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/${{ matrix.target }}/debian/*.deb
tag: ${{ github.ref }}
overwrite: true
file_glob: true
build-mac-binaries:
strategy:
matrix:
include:
- target: x86_64-apple-darwin
os: macos-latest
- target: aarch64-apple-darwin
os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Install dependencies
run: |
brew update-reset
brew install gcc cmake protobuf-c
rustup default stable
rustup update
rustup show
cargo -Vv
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Build and publish
uses: taiki-e/upload-rust-binary-action@f0d45ae91ee7b8ee928de7a9d04d893a08bcbec6 # v1.30.2
with:
bin: qdrant
target: ${{ matrix.target }}
build-windows-binaries:
strategy:
matrix:
include:
- os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Install minimal stable
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install Protoc
uses: ./.github/actions/setup-protoc
- name: Build
run: cargo build --release --locked
- name: Build and publish
uses: taiki-e/upload-rust-binary-action@f0d45ae91ee7b8ee928de7a9d04d893a08bcbec6 # v1.30.2
with:
bin: qdrant
build-app-image:
strategy:
matrix:
include:
- os: ubuntu-22.04
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc-multilib clang cmake protobuf-compiler libfuse2
- name: Install Protoc
uses: ./.github/actions/setup-protoc
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
- name: Build release binary
run: cargo build --release --locked
- name: Build AppImage
shell: bash
run: |
mkdir -p AppDir
cp docs/logo.svg qdrant.svg
cp target/release/qdrant .
curl -Lo linuxdeploy-x86_64.AppImage \
https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage
./linuxdeploy-x86_64.AppImage \
--appdir AppDir \
--executable qdrant \
-d pkg/appimage/qdrant.desktop \
-i qdrant.svg \
--custom-apprun pkg/appimage/AppRun.sh
wget -O dist-qdrant.zip "$(curl --silent "https://api.github.com/repos/qdrant/qdrant-web-ui/releases/latest" | jq -r '.assets[] | select(.name=="dist-qdrant.zip") | .browser_download_url')"
unzip -o dist-qdrant.zip -d static
mv -n static/dist/* static/
rm -rf static/dist
mv static AppDir/usr/share
./linuxdeploy-x86_64.AppImage \
--appdir AppDir \
--output appimage
- name: Upload AppImage
uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # 2.11.5
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "qdrant-x86_64.AppImage"
tag: ${{ github.ref }}
overwrite: true
file_glob: true