Some checks failed
check / check (push) Failing after 1m57s
The dev/rc/release workflows rebuilt libadwaita from source inside an uncached Fedora container on every single run, because Ubuntu 24.04's packaged libadwaita was too old for gtk4 0.11's v4_12 feature. That from-source build broke repeatedly on drift (rust dep versions, libadwaita ABI, and finally a removed meson option), producing eight straight failed CI runs. Arch's repos already carry current gtk4/libadwaita/gtk4-layer-shell as prebuilt packages, and breadpad only targets BOS/Arch, so there's no reason to build anything from source. Swap the container base to a digest-pinned archlinux image (ci/Containerfile) with those packages installed via pacman, and extract the shared "build the image, run cargo inside it" logic into ci/build.sh so it isn't duplicated three times across the workflows. Cargo's registry/git/target caches persist in named docker volumes across runs. Also: - Add check.yml: clippy + test on feature/**/fix/** pushes, so lint/ build breakage surfaces before it reaches main and triggers a dev-track release. - Fix release.yml's tag trigger (tags-ignore) so an rc tag push no longer also spawns a skipped release.yml run alongside rc-release.yml. Verified locally: the container builds cleanly via pacman (no source compilation), and `cargo build --release --locked --workspace` inside it produces working breadpad/breadman binaries linked against libgtk4-layer-shell.so.0 and libadwaita-1.so.0 respectively.
60 lines
2.1 KiB
YAML
60 lines
2.1 KiB
YAML
name: release
|
|
|
|
on:
|
|
push:
|
|
tags: ['v*']
|
|
tags-ignore: ['v*-rc.*']
|
|
|
|
jobs:
|
|
build:
|
|
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
|
|
run: cd src && bash ci/build.sh cargo build --release --locked
|
|
|
|
- name: prepare artifacts
|
|
run: |
|
|
set -euo pipefail
|
|
VERSION="${GITHUB_REF_NAME#v}"
|
|
PKG_DIR="/srv/breadway-dl/breadpad/${VERSION}"
|
|
mkdir -p "${PKG_DIR}"
|
|
for bin in breadpad breadman; 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/breadpad.example.toml "${PKG_DIR}/"
|
|
cp src/LICENSE "${PKG_DIR}/"
|
|
cp src/bakery.toml "${PKG_DIR}/bakery.toml"
|
|
ln -sfn "${VERSION}" "/srv/breadway-dl/breadpad/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/breadpad/${VERSION}"
|
|
gh release create "${GITHUB_REF_NAME}" --repo Breadway/breadpad \
|
|
--title "breadpad v${VERSION}" --generate-notes 2>/dev/null || true
|
|
gh release upload "${GITHUB_REF_NAME}" --repo Breadway/breadpad \
|
|
"${PKG_DIR}/breadpad-x86_64" \
|
|
"${PKG_DIR}/breadman-x86_64" \
|
|
"${PKG_DIR}/breadpad-x86_64.sha256" \
|
|
"${PKG_DIR}/breadman-x86_64.sha256" \
|
|
--clobber
|