scythe/.gitlab-ci.yml
spearzificial d01cdcb449 fix(ci): package the unified scythe binary instead of removed targets
The multicall consolidation removed the scythe-daemon and scythe-ui crate
targets, but every packaging path still copied them, so a tag push failed
at the first packaging step and no release could be produced.

- release.yml: tarball, .deb and AppImage ship scythe plus daemon/ui/vrec
  symlinks; AppRun execs scythe; Windows bundle copies scythe.exe only
- gitlab-ci.yml: artifacts publish target/release/scythe; Windows job
  builds --bin scythe
- rpm spec and flatpak manifest install one binary and link the aliases
- NSIS installers target scythe.exe for shortcuts, finish page,
  DisplayIcon and forwarded args, keeping legacy taskkill lines so old
  installs shut down cleanly

Also make the gitlab fmt job advisory: it reported drift across 20 files
and build-linux hard-depended on it, blocking every build. A whole-tree
reformat belongs in its own commit.
2026-10-20 16:31:46 +05:30

105 lines
2.5 KiB
YAML

stages:
- check
- build
- package
variables:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: "1"
# Cache the target dir — Rust builds are slow, everything after the first is fast.
cache:
key:
files:
- Cargo.lock
prefix: cargo
paths:
- target/
# ---------- check ----------
# The codebase is not rustfmt-clean yet; this job reports drift without blocking
# builds. Run `cargo fmt` in a dedicated commit before promoting it to a hard gate.
fmt:
stage: check
image: rust:latest
script:
- rustup component add rustfmt
- cargo fmt --check
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
allow_failure: true
clippy:
stage: check
image: rust:latest
before_script:
- apt-get update && apt-get install -y pkg-config libssl-dev
- rustup component add clippy
script:
- cargo clippy --all-targets -- --deny warnings
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
allow_failure: true
test:
stage: check
image: rust:latest
before_script:
- apt-get update && apt-get install -y pkg-config libssl-dev
script:
- cargo test --locked
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
# ---------- build ----------
build-linux:
stage: build
image: rust:latest
before_script:
- apt-get update && apt-get install -y
pkg-config libssl-dev
libavcodec-dev libavformat-dev libavutil-dev libavfilter-dev
libavdevice-dev libswscale-dev libswresample-dev
libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev
libxkbcommon-dev libgtk-3-dev
script:
- cargo build --release --locked
artifacts:
name: "scythe-linux-x86_64"
paths:
- target/release/scythe
expire_in: 30 days
build-windows:
stage: build
image: rust:latest
before_script:
- apt-get update && apt-get install -y
mingw-w64
pkg-config libssl-dev
gcc-mingw-w64-x86-64
script:
- rustup target add x86_64-pc-windows-gnu
- cargo build --release --locked --target x86_64-pc-windows-gnu --bin scythe
artifacts:
name: "scythe-windows-x86_64"
paths:
- target/x86_64-pc-windows-gnu/release/scythe.exe
expire_in: 30 days
# ---------- package ----------
# Real releases only on tags, so a main-branch push doesn't burn CI minutes.
release:
stage: package
image: rust:latest
needs: [build-linux]
rules:
- if: $CI_COMMIT_TAG
script:
- echo "Release build for $CI_COMMIT_TAG"
- cargo build --release --locked
artifacts:
name: "scythe-$CI_COMMIT_TAG"
paths:
- target/release/scythe
expire_in: 90 days