Files
alkane-os/.gitea/workflows/source-pr.yml
T
noahandClaude Opus 5.5 abb6bfd35d
source-pr / source (pull_request) Successful in 2m9s
source-pr / source (pull_request) Failing after 10s
ci: keep the patch-whitespace check off vendored third-party trees
The afw line adds the cargo vendor tree (vendor/) and the flare-ui source
(third-party/). Their upstream files carry trailing whitespace and SSE golden
fixtures end with a blank line by format; editing them would break cargo's
vendor checksums and the fixtures. Exclude both trees from git diff --check in
source-pr and fast-pr, as the toolkit's gate does. No first-party file fails
the check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
2026-11-12 14:55:25 -06:00

58 lines
1.9 KiB
YAML

name: source-pr
on:
pull_request:
branches: [next, main]
workflow_dispatch:
concurrency:
group: alkane-os-source-pr-${{ github.ref }}
cancel-in-progress: true
jobs:
source:
runs-on: alkane-fast
container:
image: gitea.bluefla.re/blueflare/alkane-ci@sha256:9d2a992bbcb91014af3c85d2e1ec8c5990701cecf83fd06c8d46f9ef13dbd948
env:
CARGO_TARGET_DIR: target
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Detect changed surface
id: surface
run: python3 ci/pr_surface.py >> "$GITHUB_OUTPUT"
- name: Check patch whitespace
run: |
if [ "${GITHUB_EVENT_NAME:-}" = pull_request ]; then
base="$(git merge-base HEAD "origin/$GITHUB_BASE_REF")"
git diff --check "$base" HEAD -- . ':(exclude)vendor' ':(exclude)third-party'
else
git diff --check HEAD^ HEAD -- . ':(exclude)vendor' ':(exclude)third-party'
fi
- name: Check CI and evidence tools
if: steps.surface.outputs.surface != 'documentation'
run: |
python3 -m compileall -q ci
for test in ci/test-*.py; do python3 "$test"; done
python3 ci/evidence_status.py
python3 ci/experiment_priority.py
- name: Install source formatter
if: steps.surface.outputs.surface == 'rust'
run: rustup component add rustfmt
- name: Check source formatting
if: steps.surface.outputs.surface == 'rust'
run: cargo fmt --check
- name: Check changed Rust source
if: steps.surface.outputs.surface == 'rust'
run: |
if [ "${GITHUB_BASE_REF:-}" = main ]; then
cargo build --release --offline --locked
else
cargo check --offline --locked
fi
- name: Clean generated build
if: always()
run: python3 ci/cleanup-generated.py