ci: add GitHub Actions workflows for CI and release builds

This commit is contained in:
kilyabin
2026-06-18 00:33:45 +04:00
parent c42cf61db4
commit c2cb260c9f
3 changed files with 197 additions and 3 deletions
+42
View File
@@ -0,0 +1,42 @@
name: CI
on:
push:
branches: [master, main]
pull_request:
jobs:
check:
name: Check & Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust (stable)
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Install system dependencies
run: |
sudo apt-get update -q
sudo apt-get install -y --no-install-recommends \
libwayland-dev \
libxkbcommon-dev \
pkg-config
- name: cargo check
run: cargo check
- name: cargo clippy
run: cargo clippy -- -D warnings
+123
View File
@@ -0,0 +1,123 @@
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
name: Build ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
artifact: scr33ny-x86_64-linux
- target: aarch64-unknown-linux-gnu
artifact: scr33ny-aarch64-linux
cross: true
steps:
- uses: actions/checkout@v4
- name: Install Rust (stable)
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.toml') }}
restore-keys: ${{ runner.os }}-${{ matrix.target }}-cargo-
# Native x86_64 build
- name: Install system dependencies (native)
if: ${{ !matrix.cross }}
run: |
sudo apt-get update -q
sudo apt-get install -y --no-install-recommends \
libwayland-dev \
libxkbcommon-dev \
pkg-config
- name: Build (native)
if: ${{ !matrix.cross }}
run: cargo build --release --target ${{ matrix.target }}
# ARM64 cross-compilation via cross
- name: Install cross
if: ${{ matrix.cross }}
uses: taiki-e/install-action@v2
with:
tool: cross
- name: Build (cross)
if: ${{ matrix.cross }}
run: cross build --release --target ${{ matrix.target }}
env:
CROSS_NO_WARNINGS: 0
- name: Rename binary
run: |
cp target/${{ matrix.target }}/release/scr33ny ${{ matrix.artifact }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.artifact }}
release:
name: Create GitHub Release
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: List artifacts
run: ls -lh artifacts/
- name: Create release
uses: softprops/action-gh-release@v2
with:
name: "scr33ny ${{ github.ref_name }}"
body: |
## Install
Download the binary for your architecture, make it executable, and move it to your PATH:
```bash
# x86_64 (most desktops/laptops)
curl -Lo scr33ny https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/scr33ny-x86_64-linux
chmod +x scr33ny
sudo mv scr33ny /usr/local/bin/
# ARM64 (Raspberry Pi 4+, Apple Silicon VM, etc.)
curl -Lo scr33ny https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/scr33ny-aarch64-linux
chmod +x scr33ny
sudo mv scr33ny /usr/local/bin/
```
**Requirements:** Wayland compositor, `libwayland-client`, `libxkbcommon`.
See [README](https://github.com/${{ github.repository }}#readme) for usage and config.
files: |
artifacts/scr33ny-x86_64-linux/scr33ny-x86_64-linux
artifacts/scr33ny-aarch64-linux/scr33ny-aarch64-linux
draft: false
prerelease: ${{ contains(github.ref_name, '-') }}
+32 -3
View File
@@ -23,14 +23,43 @@ The screen goes black. OLED pixels turn off. Burn-in protection kicks in.
## Install
### Pre-built binary (recommended)
Download the latest binary from [Releases](https://github.com/kilyabin/scr33ny/releases/latest):
```bash
git clone <repo>
# x86_64 (most desktops/laptops)
curl -Lo scr33ny https://github.com/kilyabin/scr33ny/releases/latest/download/scr33ny-x86_64-linux
chmod +x scr33ny
sudo mv scr33ny /usr/local/bin/
# ARM64 (Raspberry Pi 4+, etc.)
curl -Lo scr33ny https://github.com/kilyabin/scr33ny/releases/latest/download/scr33ny-aarch64-linux
chmod +x scr33ny
sudo mv scr33ny /usr/local/bin/
```
**Runtime requirements:** Wayland compositor, `libwayland-client`, `libxkbcommon`.
These are present on any Wayland desktop (Sway, Hyprland, GNOME Wayland, KDE Wayland).
### Build from source
Requires a Rust toolchain (`rustup.rs`) and Wayland dev headers:
```bash
# Arch Linux
sudo pacman -S wayland libxkbcommon pkgconf
# Ubuntu / Debian
sudo apt install libwayland-dev libxkbcommon-dev pkg-config
```
```bash
git clone https://github.com/kilyabin/scr33ny
cd scr33ny
cargo install --path .
```
Requires a Rust toolchain (`rustup.rs`). No system libraries beyond Wayland.
---
## Usage