breadsearch/.forgejo/workflows/release.yml
Breadway 4f9f4de911
All checks were successful
dev release / build (push) Successful in 5m25s
CI: build inside bread-ecosystem's shared Arch container
Ports breadsearch onto the shared, pinned Arch build image already
proven in breadpad, so this repo's release CI stops installing its
toolchain/GTK4 stack directly on the bare self-hosted runner.

- ci/build.sh + ci/bread-ecosystem.rev: thin wrapper cloning
  bread-ecosystem pinned to a commit sha and delegating to its own
  ci/build.sh.
- dev-release.yml/rc-release.yml/release.yml: route the existing
  build/test cargo invocations through ci/build.sh, unchanged
  otherwise.
- check.yml: fast clippy/test signal on feature/**  and fix/** pushes.

No ci/deps.txt: breadmill's npu/rocm/cuda/openvino features (pulled
in by --features full) all use ort's load-dynamic (dlopen) mode, so
none of them link against a real ONNX Runtime EP at build time —
confirmed against breadmill/Cargo.toml and by breadpad already
building ort with its own rocm feature against the same base image
with no extra packages. The GUI's librsvg system dep is a runtime
icon-loader dependency (bakery.toml's system_deps), not something
linked at build/link time, so the base image's gtk4/gtk4-layer-shell
already cover what compiling breadsearch needs.
2026-08-15 22:33:15 +08:00

68 lines
2.7 KiB
YAML

name: release
on:
push:
tags: ["v*"]
jobs:
build:
if: ${{ !contains(github.ref_name, '-rc.') }}
runs-on: [self-hosted, hestia]
steps:
- name: checkout
run: |
set -euo pipefail
rm -rf src && mkdir src
git clone --branch "${GITHUB_REF_NAME}" --depth 1 \
"https://git.breadway.dev/${GITHUB_REPOSITORY}.git" src
- name: build
# --features full (breadmill's npu+rocm+cuda combined) ships one binary
# that can use any backend at runtime via --npu/--rocm/--cuda or
# `backend` in config.toml. All three are ort load-dynamic (dlopen)
# EPs, so this doesn't require the NPU/ROCm/CUDA toolkits to be
# present on the build host — see breadmill/Cargo.toml.
run: cd src && bash ci/build.sh cargo build --release --locked --workspace --features full
- name: test
run: cd src && bash ci/build.sh cargo test --release --locked --workspace --features full
- name: prepare artifacts
run: |
set -euo pipefail
VERSION="${GITHUB_REF_NAME#v}"
PKG_DIR="/srv/breadway-dl/breadsearch/${VERSION}"
mkdir -p "${PKG_DIR}"
for bin in breadsearch breadmill; do
cp "src/target/release/${bin}" "${PKG_DIR}/${bin}-x86_64"
strip "${PKG_DIR}/${bin}-x86_64"
sha256sum "${PKG_DIR}/${bin}-x86_64" | awk '{print $1}' \
> "${PKG_DIR}/${bin}-x86_64.sha256"
done
cp src/packaging/breadmill.service "${PKG_DIR}/"
cp src/config.example.toml "${PKG_DIR}/"
cp src/bakery.toml "${PKG_DIR}/bakery.toml"
ln -sfn "${VERSION}" "/srv/breadway-dl/breadsearch/latest"
- name: regenerate index.json
run: |
set -euo pipefail
rm -rf /tmp/bread-ecosystem-ci
git clone https://git.breadway.dev/Breadway/bread-ecosystem.git /tmp/bread-ecosystem-ci
bash /tmp/bread-ecosystem-ci/scripts/gen-index.sh
- name: upload to GitHub Release
env:
GH_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }}
run: |
set -euo pipefail
VERSION="${GITHUB_REF_NAME#v}"
PKG_DIR="/srv/breadway-dl/breadsearch/${VERSION}"
gh release create "${GITHUB_REF_NAME}" --repo Breadway/breadsearch \
--title "breadsearch v${VERSION}" --generate-notes 2>/dev/null || true
gh release upload "${GITHUB_REF_NAME}" --repo Breadway/breadsearch \
"${PKG_DIR}/breadsearch-x86_64" \
"${PKG_DIR}/breadmill-x86_64" \
"${PKG_DIR}/breadsearch-x86_64.sha256" \
"${PKG_DIR}/breadmill-x86_64.sha256" \
--clobber