Skip to content

Merge pull request #333 from egohygiene/copilot/synthesize-canonical-… #622

Merge pull request #333 from egohygiene/copilot/synthesize-canonical-…

Merge pull request #333 from egohygiene/copilot/synthesize-canonical-… #622

Workflow file for this run

name: CI
on:
push:
branches:
- '**'
pull_request:
jobs:
build-and-test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.94"
components: clippy
- name: Install FFmpeg
run: |
sudo apt-get update
sudo apt-get install -y ffmpeg
- name: Warn on plaintext AI API keys
run: |
matches="$(git ls-files '*.yml' '*.yaml' | xargs grep -nH '^[[:space:]]*api_key[[:space:]]*:' || true)"
if [ -n "$matches" ]; then
echo "$matches"
while IFS= read -r line; do
[ -n "$line" ] || continue
echo "::warning title=Plaintext AI API key configuration detected::$line uses api_key; prefer api_key_env"
done <<< "$matches"
fi
- name: Lint (clippy)
run: cargo clippy -- -D warnings
- name: Build
run: cargo build --verbose
- name: Test
run: cargo test --verbose
validate-examples:
name: Validate bundled examples
runs-on: ubuntu-latest
needs: build-and-test
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.94"
- name: Build renderflow
run: cargo build --release
- name: Validate hello-world example (dry-run)
working-directory: examples/hello-world
run: ../../target/release/renderflow build --dry-run
- name: Validate transforms example (dry-run)
working-directory: examples/transforms
run: ../../target/release/renderflow build --dry-run
- name: Run library embedding example
run: cargo run --example library_basic
- name: Run plugin registration example
run: cargo run --example plugin_registration
validate-pkgbuild:
name: Validate PKGBUILD git (Arch Linux)
runs-on: ubuntu-latest
container: archlinux:latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: pacman -Syu --noconfirm base-devel namcap
- name: Validate PKGBUILD with namcap
run: namcap pkg/aur/renderflow-git/PKGBUILD
validate-pkgbuild-stable:
name: Validate PKGBUILD stable (Arch Linux)
runs-on: ubuntu-latest
container: archlinux:latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: pacman -Syu --noconfirm base-devel namcap
- name: Validate PKGBUILD with namcap
run: namcap pkg/aur/renderflow/PKGBUILD
installer-smoke-test:
name: Installer smoke test
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.94"
- name: Build release binary
run: cargo build --release
- name: Prepare local release assets with checksum
run: |
mkdir -p /tmp/renderflow-release
cp target/release/renderflow /tmp/renderflow-release/renderflow-x86_64-unknown-linux-gnu
sha256sum /tmp/renderflow-release/renderflow-x86_64-unknown-linux-gnu > /tmp/renderflow-release/renderflow-x86_64-unknown-linux-gnu.sha256
- name: Install from portable installer script
run: |
mkdir -p /tmp/renderflow-bin
RENDERFLOW_DOWNLOAD_BASE_URL="file:///tmp/renderflow-release" \
RENDERFLOW_INSTALL_DIR="/tmp/renderflow-bin" \
sh scripts/install.sh
/tmp/renderflow-bin/renderflow --version
validate-snap:
name: Validate Snap package
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build Snap
uses: snapcore/action-build@v1