CI runs fmt, clippy and tests. Tag releases build Linux and Windows (mingw cross) artifacts, SHA256SUMS and an Ed25519 signed manifest, then publish via the Gitea API. Helper scripts live in scripts/release, docs in docs/release.md.
63 lines
1.8 KiB
YAML
63 lines
1.8 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches: ["**"]
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ci-${{ gitea.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
CARGO_INCREMENTAL: "0"
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install system dependencies
|
|
run: |
|
|
SUDO=$(command -v sudo || true)
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
$SUDO apt-get update
|
|
$SUDO apt-get install -y --no-install-recommends \
|
|
build-essential curl ca-certificates pkg-config cmake protobuf-compiler \
|
|
libasound2-dev libopus-dev libudev-dev \
|
|
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev \
|
|
libssl-dev libxkbcommon-dev libwayland-dev libfontconfig1-dev libdbus-1-dev
|
|
|
|
- name: Install Rust toolchain
|
|
run: |
|
|
if ! command -v rustup >/dev/null; then
|
|
curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
|
|
fi
|
|
. "$HOME/.cargo/env" 2>/dev/null || true
|
|
rustup toolchain install stable --profile minimal -c rustfmt -c clippy
|
|
rustup default stable
|
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
|
cargo --version
|
|
|
|
- name: Cache cargo
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry/index
|
|
~/.cargo/registry/cache
|
|
~/.cargo/git/db
|
|
target
|
|
key: cargo-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
|
|
restore-keys: |
|
|
cargo-${{ runner.os }}-
|
|
|
|
- name: Format
|
|
run: cargo fmt --check
|
|
|
|
- name: Clippy
|
|
run: cargo clippy --all-targets -- -D warnings
|
|
|
|
- name: Test
|
|
run: cargo test --workspace
|