CI: adopt the shared pinned-Arch-container build system
Some checks failed
check / check (push) Failing after 35s

Adds ci/build.sh + ci/bread-ecosystem.rev (pinned to bread-ecosystem
147cfbbf96ae4b171027defa1130d2caddb934b1), points the three release
workflows' build step through it, and adds check.yml as breadarr's first
lint/test gate on feature/fix branches. No ci/deps.txt: verified ort-sys's
build.rs has no system build-time requirements beyond rust/base-devel
(its download-binaries feature is pure-Rust ureq/lzma-rust2/hmac-sha256).
This commit is contained in:
Breadway 2026-08-05 19:15:47 +08:00
parent 3cbac5ffe9
commit 6f1fe776ad
6 changed files with 49 additions and 3 deletions

View file

@ -0,0 +1,24 @@
name: check
# Fast-fail lint/test on short-lived work branches, before it ever reaches
# main and triggers a dev-track release build.
on:
push:
branches: ['feature/**', 'fix/**']
jobs:
check:
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: clippy
run: cd src && bash ci/build.sh cargo clippy --workspace --all-targets --locked -- -D warnings
- name: test
run: cd src && bash ci/build.sh cargo test --workspace --locked

View file

@ -19,7 +19,7 @@ jobs:
"https://git.breadway.dev/${GITHUB_REPOSITORY}.git" src "https://git.breadway.dev/${GITHUB_REPOSITORY}.git" src
- name: build - name: build
run: cd src && cargo build --release --locked run: cd src && bash ci/build.sh cargo build --release --locked
- name: compute dev version - name: compute dev version
run: | run: |

View file

@ -21,7 +21,7 @@ jobs:
"https://git.breadway.dev/${GITHUB_REPOSITORY}.git" src "https://git.breadway.dev/${GITHUB_REPOSITORY}.git" src
- name: build - name: build
run: cd src && cargo build --release --locked run: cd src && bash ci/build.sh cargo build --release --locked
- name: prepare artifacts - name: prepare artifacts
run: | run: |

View file

@ -17,7 +17,7 @@ jobs:
"https://git.breadway.dev/${GITHUB_REPOSITORY}.git" src "https://git.breadway.dev/${GITHUB_REPOSITORY}.git" src
- name: build - name: build
run: cd src && cargo build --release --locked run: cd src && bash ci/build.sh cargo build --release --locked
- name: prepare artifacts - name: prepare artifacts
run: | run: |

1
ci/bread-ecosystem.rev Normal file
View file

@ -0,0 +1 @@
147cfbbf96ae4b171027defa1130d2caddb934b1

21
ci/build.sh Executable file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env bash
# Delegates to bread-ecosystem's shared CI build image/script, pinned to
# the commit in ci/bread-ecosystem.rev — not `main`. bread-ecosystem's CI
# files now affect every product's release pipeline, so bumping the pin
# is a deliberate act instead of silent drift (see the bread-theme test
# that broke here for exactly that reason, before it was pinned by rev).
#
# Usage: ci/build.sh cargo build --release --locked
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
REV="$(cat "${ROOT}/ci/bread-ecosystem.rev")"
CACHE_DIR="/tmp/bread-ecosystem-ci-${REV}"
if [ ! -d "$CACHE_DIR" ]; then
rm -rf /tmp/bread-ecosystem-ci-*
git clone https://git.breadway.dev/Breadway/bread-ecosystem.git "$CACHE_DIR"
git -C "$CACHE_DIR" checkout --quiet "$REV"
fi
bash "${CACHE_DIR}/ci/build.sh" breadarr "$ROOT" "$@"