Skip to content

v3.7.1

v3.7.1 #94

name: Build and publish release packages
permissions:
contents: write
packages: write
on:
release:
# 'published' is triggered when publishing draft release, 'created' is not
types: [published]
env:
# phase34 / #320 — CI starts cold, so incremental compilation
# only adds artifacts and slows the build (Rust perf-team:
# https://kobzol.github.io/rust/rustc/2025/05/20/disable-debuginfo-to-improve-rust-compile-times.html).
CARGO_INCREMENTAL: "0"
jobs:
# Build dashboard first - shared by all jobs
build-dashboard:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: '20'
- name: Install pnpm
run: npm install -g pnpm@10 # pinned: pnpm 11 ignores pnpm.overrides (see sdk-publish-typescript.yml)
- name: Set version from release tag
run: echo "VITE_APP_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Build dashboard
run: |
cd dashboard
pnpm install --frozen-lockfile
pnpm build
- name: Upload dashboard artifacts
uses: actions/upload-artifact@v4
with:
name: dashboard-dist
path: dashboard/dist
retention-days: 1
# Separated Linux builds - each runs independently
# If one fails, others continue
build-linux-x86_64-gnu:
needs: build-dashboard
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Download dashboard artifacts
uses: actions/download-artifact@v4
with:
name: dashboard-dist
path: dashboard/dist
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc-multilib clang cmake protobuf-compiler libssl-dev pkg-config
rustup default stable
rustup update
- name: Override leaked Windows OPENSSL_DIR (point at system libssl)
# The ubuntu-latest GH-hosted runner image leaks
# OPENSSL_DIR=C:/Program Files/OpenSSL-Win64 (and
# OPENSSL_NO_VENDOR=1) into Linux jobs, which together make
# openssl-sys's build script panic with "OpenSSL include
# directory does not exist" before the vendored-openssl
# feature can take over. Point at the system libssl-dev
# install instead -- same fix applied to rust.yml in 7fad253d.
run: |
echo "OPENSSL_DIR=/usr" >> $GITHUB_ENV
echo "OPENSSL_INCLUDE_DIR=/usr/include" >> $GITHUB_ENV
echo "OPENSSL_LIB_DIR=/usr/lib/x86_64-linux-gnu" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig" >> $GITHUB_ENV
shell: bash
- name: Build and publish vectorizer
uses: taiki-e/upload-rust-binary-action@v1
with:
bin: vectorizer
target: x86_64-unknown-linux-gnu
token: ${{ secrets.GITHUB_TOKEN }}
- name: Build and publish vectorizer-cli
uses: taiki-e/upload-rust-binary-action@v1
with:
bin: vectorizer-cli
target: x86_64-unknown-linux-gnu
token: ${{ secrets.GITHUB_TOKEN }}
build-mac-binaries:
needs: build-dashboard
strategy:
matrix:
# x86_64-apple-darwin used to live here; dropped because
# `ort-sys` (transitive via the `fastembed` default feature)
# ships no prebuilt for Intel Mac and the workflow has no
# `ORT_STRATEGY=compile` plumbing. Apple Silicon is the only
# supported macOS target now -- the sibling
# `build-mac-metal-binaries` job covers the same target with
# Metal GPU support.
include:
- target: aarch64-apple-darwin
os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- name: Download dashboard artifacts
uses: actions/download-artifact@v4
with:
name: dashboard-dist
path: dashboard/dist
- name: Install dependencies
run: |
brew update-reset
brew install gcc cmake protobuf
rustup default stable
rustup update
rustup show
cargo -Vv
- name: Build and publish vectorizer
uses: taiki-e/upload-rust-binary-action@v1
with:
bin: vectorizer
target: ${{ matrix.target }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Build and publish vectorizer-cli
uses: taiki-e/upload-rust-binary-action@v1
with:
bin: vectorizer-cli
target: ${{ matrix.target }}
token: ${{ secrets.GITHUB_TOKEN }}
build-mac-metal-binaries:
needs: build-dashboard
name: Build macOS ARM with Metal GPU support
strategy:
matrix:
include:
- target: aarch64-apple-darwin
os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- name: Download dashboard artifacts
uses: actions/download-artifact@v4
with:
name: dashboard-dist
path: dashboard/dist
- name: Install dependencies
run: |
brew update-reset
brew install gcc cmake protobuf
rustup default stable
rustup update
rustup target add ${{ matrix.target }}
rustup show
cargo -Vv
# Tag separado para Mac com Metal: asset nomeado vectorizer-*-metal (resto = manifesto automático)
- name: Build vectorizer with Metal support
uses: taiki-e/upload-rust-binary-action@v1
with:
bin: vectorizer
target: ${{ matrix.target }}
features: hive-gpu
archive: vectorizer-${{ matrix.target }}-metal
token: ${{ secrets.GITHUB_TOKEN }}
- name: Build vectorizer-cli with Metal support
uses: taiki-e/upload-rust-binary-action@v1
with:
bin: vectorizer-cli
target: ${{ matrix.target }}
features: hive-gpu
archive: vectorizer-cli-${{ matrix.target }}-metal
token: ${{ secrets.GITHUB_TOKEN }}
build-windows-binaries:
needs: build-dashboard
strategy:
matrix:
include:
- os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Install minimal stable
uses: dtolnay/rust-toolchain@stable
- uses: actions/checkout@v7
- name: Download dashboard artifacts
uses: actions/download-artifact@v4
with:
name: dashboard-dist
path: dashboard/dist
- uses: Swatinem/rust-cache@v2
- name: Install protoc
# GitHub-releases-backed install instead of the Chocolatey mirror, which
# returns flaky 503s on Windows runners.
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: cargo build --release
- name: Build and publish vectorizer
uses: taiki-e/upload-rust-binary-action@v1
with:
bin: vectorizer
token: ${{ secrets.GITHUB_TOKEN }}
- name: Build and publish vectorizer-cli
uses: taiki-e/upload-rust-binary-action@v1
with:
bin: vectorizer-cli
token: ${{ secrets.GITHUB_TOKEN }}