Merge pull request 'ci: build on bread-ecosystem's shared Arch container' (#2) from feature/shared-ci into main

Reviewed-on: #2
This commit is contained in:
Breadway 2026-08-05 20:09:43 +08:00
commit bbff5f951c
7 changed files with 88 additions and 3 deletions

View file

@ -20,7 +20,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 beta version - name: compute beta version
run: | run: |

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

@ -20,7 +20,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

@ -16,7 +16,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" breadcast "$ROOT" "$@"

39
ci/deps.txt Normal file
View file

@ -0,0 +1,39 @@
# Build-time deps layered onto the shared bread-ci image on top of its base
# set (base-devel git pkgconf rust gtk4 libadwaita gtk4-layer-shell graphene
# -- see bread-ecosystem's ci/Containerfile). This is NOT bakery.toml's
# system_deps list (that's runtime: what an end-user machine needs to run
# breadcast/breadcastd) -- it's what's actually pkg-config-probed or linked
# against while *compiling* the crate, verified against:
#
# - breadcast-caststream-sys/build.rs, which calls
# pkg_config::probe_library("jsoncpp") and
# pkg_config::probe_library("libcrypto") to build+link the vendored
# openscreen Cast Streaming C++ sources. `pacman -Fl jsoncpp` /
# `pacman -Fl openssl` confirm both ship their headers AND .pc files in
# the same package (jsoncpp.pc, libcrypto.pc) -- no separate -dev split
# on Arch, so the runtime package name is also the build-time one.
#
# - Cargo.lock, which pulls in gstreamer-sys/-base-sys (breadcast-core,
# breadcastd depend on the `gstreamer` crate directly) and
# gstreamer-app-sys/-video-sys (breadcast-core's `gstreamer-app` /
# `gstreamer-video` deps, used by the capture/encode pipeline). Their
# .pc files (gstreamer-1.0.pc, gstreamer-base-1.0.pc from the
# `gstreamer` package; gstreamer-app-1.0.pc, gstreamer-video-1.0.pc from
# `gst-plugins-base-libs`) come from these two packages, not from
# `gtk4`'s own transitive pull of them -- listed explicitly here so the
# build doesn't silently depend on an incidental side effect of gtk4's
# dependency graph.
#
# Deliberately NOT included: gst-plugin-pipewire, gst-plugins-bad,
# gst-plugin-hlssink3, gst-plugin-va (all in bakery.toml's system_deps).
# These are GStreamer elements referenced only by factory-name string at
# runtime (e.g. "vah264enc", "hlssink3" -- see breadcast-core/src/pipeline/
# mod.rs), loaded dynamically via the plugin registry, never linked by any
# Rust sys crate in Cargo.lock. `pacman -Fl` on all four ships no headers
# breadcast compiles against (gst-plugin-hlssink3 has one .pc file,
# gsthlssink3.pc, but nothing in Cargo.lock binds to it) -- pure runtime
# dependencies, correctly excluded from the build image.
gstreamer
gst-plugins-base-libs
jsoncpp
openssl