P1-A: normalizer derives `online` from rtnetlink event kind (link.up/down,
route.default.changed, address.added/removed) so bread.network.connected
fires correctly on all systems using rtnetlink.
P1-B: stream_events consumes the subscribe ack before the event loop so the
first line is not printed as garbage.
P1-C: UPowerAdapter::probe() validates D-Bus synchronously before committing;
the sysfs fallback now actually triggers when D-Bus is unavailable.
P2-A: profile.list returns the full profile state (active + history) instead
of the always-empty profiles map.
P2-B: profile history capped at 50 entries in both StateCommand and
apply_event_to_state to prevent unbounded growth.
P2-C: RtnetlinkAdapter::new() no longer spawns an orphaned tokio task;
it validates availability by constructing and immediately dropping the
connection tuple.
P2-D: Lua-side hyprland_request_socket() logs a warn when multiple
Hyprland instances are found, matching the adapter-side behaviour.
P2-E: Malformed JSON from an IPC client returns an error response and
continues rather than closing the entire connection.
P3-A: Remove the `ends_with(".*")` prefix-match shortcut from both the
subscription table and the IPC event filter. `bread.*` now means
one segment (matching documented API semantics: `* = one segment`).
Tests updated accordingly.
P4-A: Remove unused `git2` and `glob` workspace dependencies (left over
from bread-sync extraction).
P4-B: breadd dev-dependency `tempfile` declared via workspace = true.
P4-C: Remove unreachable XDG_CONFIG_HOME branch in modules_dir(); dirs
already reads that var internally before returning None.
P4-D: Delete duplicate send_request_with_stream(); print_doctor() now
uses socket.exists() + send_request() directly.
P5-A: release.yml drops `--lib` from cargo test so integration tests run
in the release gate.
P6-A: bluetooth_spawn / bluetooth_query replace expect() on tokio runtime
construction with error logging / error propagation.
P6-B: Spin loops in lua/mod.rs add std:🧵:yield_now() after the
PAUSE hint to reduce CPU burn under sustained RwLock contention.
P6-C: All Mutex::lock().expect("... poisoned") in lua/mod.rs replaced with
unwrap_or_else(|e| e.into_inner()) for poison recovery.
P7-B: bread.system.startup event moved from main.rs into ipc::Server::serve()
so it fires after the socket is bound (smaller race window for early
subscribers).
69 lines
2.1 KiB
YAML
69 lines
2.1 KiB
YAML
name: release
|
|
|
|
on:
|
|
push:
|
|
tags: ["v*"]
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
env:
|
|
DL_DIR: /srv/breadway-dl
|
|
ECOSYSTEM_DIR: /home/breadway/Projects/bread-ecosystem
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: [self-hosted, hestia]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: install build deps
|
|
run: sudo apt-get install -y libudev-dev libdbus-1-dev pkg-config 2>/dev/null || true
|
|
|
|
- name: build
|
|
run: cargo build --release --locked
|
|
|
|
- name: test
|
|
run: cargo test --release --locked --workspace
|
|
|
|
- name: prepare artifacts
|
|
run: |
|
|
VERSION="${GITHUB_REF_NAME#v}"
|
|
PKG_DIR="${DL_DIR}/bread/${VERSION}"
|
|
mkdir -p "${PKG_DIR}"
|
|
for bin in breadd bread; do
|
|
cp "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 packaging/systemd/breadd.service "${PKG_DIR}/"
|
|
cp bakery.toml "${PKG_DIR}/bakery.toml"
|
|
ln -sfn "${VERSION}" "${DL_DIR}/bread/latest"
|
|
|
|
- name: ensure bread-ecosystem
|
|
run: |
|
|
if [[ -d "${ECOSYSTEM_DIR}/.git" ]]; then
|
|
git -C "${ECOSYSTEM_DIR}" pull --ff-only
|
|
else
|
|
mkdir -p "$(dirname "${ECOSYSTEM_DIR}")"
|
|
git clone https://github.com/Breadway/bread-ecosystem.git "${ECOSYSTEM_DIR}"
|
|
fi
|
|
|
|
- name: regenerate index.json
|
|
run: bash "${ECOSYSTEM_DIR}/scripts/gen-index.sh"
|
|
|
|
- name: upload to GitHub Release
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
VERSION="${GITHUB_REF_NAME#v}"
|
|
PKG_DIR="${DL_DIR}/bread/${VERSION}"
|
|
gh release create "${GITHUB_REF_NAME}" \
|
|
--title "bread v${VERSION}" --generate-notes 2>/dev/null || true
|
|
gh release upload "${GITHUB_REF_NAME}" \
|
|
"${PKG_DIR}/breadd-x86_64" \
|
|
"${PKG_DIR}/bread-x86_64" \
|
|
"${PKG_DIR}/breadd-x86_64.sha256" \
|
|
"${PKG_DIR}/bread-x86_64.sha256" \
|
|
--clobber
|