Files
codename-206/.github/workflows/ci.yaml
T
mikkeli 7a92485cf1 ci: path-filter the pull_request trigger too
The push trigger was already restricted to master and to source paths,
but pull_request carried only a branch filter — so a PR touching nothing
but the README would have run a full build. A branch filter constrains
where a workflow fires, not what fires it.

Both filters now list the same six paths. A docs-only change runs nothing,
on either trigger.

Note that .github/workflows/** is deliberately absent from both lists, so
editing this file does not run it. That is the intended trade: fewer
pointless builds, at the cost of a broken workflow surfacing on the next
source change rather than immediately.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WHt4DykxXaQnyaJfyS8KCn
2026-09-04 19:26:35 +09:00

65 lines
1.8 KiB
YAML

name: CI
on:
push:
branches: [ master ]
paths:
- 'src/**'
- 'xtask/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'bundler.toml'
- 'tools/**'
# Mirrors the push filter. Without it a PR touching only the README would run a
# full build - the branch filter alone constrains where, not what.
pull_request:
branches: [ master ]
paths:
- 'src/**'
- 'xtask/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'bundler.toml'
- 'tools/**'
workflow_dispatch:
# Target the self-hosted Rust/audio runner registered to the `musiikki` org.
#
# The runner is host-mode, so the rustup toolchain installed for the
# `gitea-runner` user is used directly — nothing installs per run, and the cargo
# registry cache stays warm between jobs.
#
# Adapted from musiikki/nih-plug-template. The template gates VST3 behind an
# opt-in `vst3` feature and so builds twice; this plugin always ships VST3
# (nih_plug is taken with default features), so one build covers both formats.
jobs:
build:
name: Build
runs-on: rust-audio
steps:
- uses: actions/checkout@v4
- name: Toolchain
run: |
cargo --version
rustc --version
echo "CARGO_HOME=${CARGO_HOME:?not set on this runner}"
# Cheap and needs no toolchain, so it runs first: a rename that only
# landed in half the files is worth catching before spending a build on it.
- name: Branding consistency
run: sh tools/check-branding.sh
- name: Build
run: cargo build --release
- name: Test
run: cargo test --release
# Proves the xtask bundler still works, which a plain `cargo build` does
# not exercise — the bundle step is where bundler.toml and the crate name
# have to agree.
- name: Bundle
run: cargo xtask bundle bari_206 --release