Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .github/workflows/sym-arch-002a5-differential-validity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: SYM-ARCH-002A5 Differential Validity

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
- research/sym-arch-002a3-validity-v1
paths:
- '.github/workflows/sym-arch-002a5-differential-validity.yml'
- 'crates/domains/symthaea-psych-bench/src/experiment/differential.rs'
- 'crates/domains/symthaea-psych-bench/src/experiment/validity.rs'
- 'crates/domains/symthaea-psych-bench/src/experiment/mod.rs'
- 'crates/domains/symthaea-psych-bench/src/lib.rs'
- 'crates/domains/symthaea-psych-bench/Cargo.toml'
- 'docs/research/SYM_ARCH_002A5_DIFFERENTIAL_VALIDITY_V1.md'
- 'Cargo.toml'
- 'Cargo.lock'
workflow_dispatch:

concurrency:
# Automatic branch/PR validation keeps only the newest run. Manual validation
# is deliberate and receives a unique group through github.run_id.
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name == 'workflow_dispatch' && github.run_id || 'auto' }}
cancel-in-progress: true

permissions:
contents: read

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1

jobs:
differential-validity:
name: Validate differential benchmark semantics
# Draft stacked PRs cannot merge and should not consume scarce runner capacity.
# Promoting to ready-for-review explicitly triggers this exact gate.
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@1.96.0
with:
components: rustfmt

- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-sym-arch-002a5-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-sym-arch-002a5-

- name: Check A5 Rust formatting
run: |
rustfmt --edition 2024 --check \
crates/domains/symthaea-psych-bench/src/experiment/differential.rs \
crates/domains/symthaea-psych-bench/src/lib.rs

- name: Run differential validity tests
run: |
cargo test -p symthaea-psych-bench --lib experiment_differential:: -- --nocapture

- name: Check psych-bench library
run: |
cargo check -p symthaea-psych-bench --lib
Loading