Skip to content
Closed
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ jobs:

- name: cargo clippy
if: (needs.changes.result != 'success' || needs.changes.outputs.rust == 'true') && needs.changes.outputs.rust_full != 'false'
run: cargo clippy --locked --workspace --all-targets --features celox/systemverilog,celox-test-suite/verilator,celox-test-suite/icarus --no-deps
run: cargo clippy --locked --workspace --exclude lydite-celox --all-targets --features celox/systemverilog,celox-test-suite/verilator,celox-test-suite/icarus --no-deps

- name: Lint the crates this pull request can affect
if: needs.changes.outputs.rust_full == 'false' && needs.changes.outputs.rust_lint_packages != ''
Expand All @@ -162,7 +162,7 @@ jobs:
if: (needs.changes.result != 'success' || needs.changes.outputs.rust == 'true') && needs.changes.outputs.rust_full != 'false'
env:
RUSTDOCFLAGS: -D warnings
run: cargo doc --locked --workspace --no-deps
run: cargo doc --locked --workspace --exclude lydite-celox --no-deps

- name: Build the API documentation this pull request can affect
if: needs.changes.outputs.rust_full == 'false' && needs.changes.outputs.rust_doc_libraries != ''
Expand Down
27 changes: 22 additions & 5 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
schedule:
- cron: "17 2 * * *"
workflow_dispatch:
inputs:
runner_probe:
description: Check Macro Runner availability without building or benchmarking
type: boolean
default: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -16,9 +21,20 @@ env:
permissions: {}

jobs:
runner-probe:
name: Probe CodSpeed runner
if: github.event_name == 'workflow_dispatch' && inputs.runner_probe
runs-on: codspeed-macro-arm64-graviton-ubuntu-22-04
timeout-minutes: 2
steps:
- name: Verify the ARM64 runner is available
run: test "$(uname -m)" = aarch64

codspeed:
name: CodSpeed
runs-on: ubuntu-latest
if: inputs.runner_probe != true
timeout-minutes: 60
runs-on: codspeed-macro-arm64-graviton-ubuntu-22-04
outputs:
run-id: ${{ steps.benchmarks.outputs.run-id }}
permissions:
Expand All @@ -39,19 +55,20 @@ jobs:
tool: cargo-codspeed@5.0.1

- name: Build compile-time benchmarks
run: cargo codspeed build --locked -p celox --bench compilation
run: cargo codspeed build --locked --measurement-mode walltime -p celox --bench compilation

- name: Run compile-time benchmarks
id: benchmarks
timeout-minutes: 15
uses: CodSpeedHQ/action@v5
with:
mode: simulation
run: cargo codspeed run -p celox
mode: walltime
run: cargo codspeed run --measurement-mode walltime -p celox --bench compilation

report:
name: Report CodSpeed
needs: codspeed
if: always() && (github.ref_name == 'master' || github.ref_name == 'develop')
if: always() && inputs.runner_probe != true && (github.ref_name == 'master' || github.ref_name == 'develop')
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
Expand Down
112 changes: 10 additions & 102 deletions .github/workflows/lydite-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ name: Lydite
# linted by ci.yml; this workflow owns Lydite tests and conformance gates.

on:
# PRs select affected lanes; the heavy bridge runs on PRs only for Lydite-owned
# changes. Daily and manual runs enable every lane and report failures.
# Only Lydite core gates run here. Celox bridge/proof replay is disabled.
pull_request:
merge_group:
schedule:
Expand Down Expand Up @@ -37,7 +36,6 @@ jobs:
runs-on: ubuntu-26.04
outputs:
core: ${{ steps.scope.outputs.core }}
bridge: ${{ steps.scope.outputs.bridge }}
defaults:
run:
working-directory: .
Expand All @@ -57,7 +55,7 @@ jobs:
rust:
timeout-minutes: 30
needs: changes
if: always() && (needs.changes.result != 'success' || needs.changes.outputs.core == 'true' || needs.changes.outputs.bridge == 'true')
if: always() && (needs.changes.result != 'success' || needs.changes.outputs.core == 'true')
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@v7
Expand All @@ -72,21 +70,10 @@ jobs:
- name: Install recorded solver version
run: python -m pip install z3-solver==5.1.0
- name: Test affected Lydite packages and documentation
env:
CORE: ${{ needs.changes.outputs.core }}
BRIDGE: ${{ needs.changes.outputs.bridge }}
DETECTION: ${{ needs.changes.result }}
run: |
args=()
if [ "$DETECTION" != success ] || [ "$CORE" = true ]; then
args+=(-p lydite -p lydite-ir -p lydite-solver -p lydite-syntax -p lydite-verify)
fi
if [ "$DETECTION" != success ] || [ "$BRIDGE" = true ]; then
args+=(-p lydite-celox)
fi
Z3_BIN="$(command -v z3)"
export Z3_BIN
cargo test --locked "${args[@]}"
cargo test --locked -p lydite -p lydite-ir -p lydite-solver -p lydite-syntax -p lydite-verify

documentation:
needs: changes
Expand All @@ -110,7 +97,7 @@ jobs:
persist-credentials: false
- uses: ./.github/actions/setup-rust
- name: Build the isolated editor worker
run: cargo build --release --locked --bin lydite-editor
run: cargo build --release --locked -p lydite --bin lydite-editor
- name: Check bounded responses and reject deadlock and dropped-request mutants
run: |
cargo test --release --locked -p lydite --test responses --bin lydite-editor
Expand Down Expand Up @@ -160,88 +147,9 @@ jobs:
if-no-files-found: error
retention-days: 14

# The bridge lanes use the in-tree Celox and share one release build.
bridge:
needs: changes
if: always() && (needs.changes.result != 'success' || needs.changes.outputs.bridge == 'true')
runs-on: ubuntu-26.04
# Cold builds plus replay and the sequential proof/mutation gates.
timeout-minutes: 150
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: ./.github/actions/setup-rust
with:
components: rustfmt
- name: Reproduce source violations and AXI4-Lite protocol regressions with Celox
run: ./conformance/axi4lite/run_ci.sh "$RUNNER_TEMP/celox-replay"
- name: Upload complete replay evidence
if: always()
uses: actions/upload-artifact@v7
with:
name: celox-replay-${{ github.run_id }}-${{ github.run_attempt }}
path: ${{ runner.temp }}/celox-replay/
if-no-files-found: error
retention-days: 14

# Keep collecting proof evidence after a replay failure.
# The conformance gates are pinned to Python 3.12.
- uses: actions/setup-python@v7
if: ${{ !cancelled() }}
with:
python-version: "3.12"
- name: Run every reusable suite case with proof-backed reads
if: ${{ !cancelled() }}
run: ./conformance/veryl-proof/run_ci.sh "$RUNNER_TEMP/veryl-proof"
- name: Verify symbolic Veryl pipeline against ISA and reject RTL mutants
if: ${{ !cancelled() }}
run: ./conformance/veryl-symbolic/run_ci.sh "$RUNNER_TEMP/veryl-symbolic"
- name: Verify typed lemma candidates and proof-use diagnostics
if: ${{ !cancelled() }}
run: python3 -m audit.lemma_candidates.ci --out "$RUNNER_TEMP/lemma-candidates"
- name: Verify selected RV32I architecture, memory, latency and mutations
if: ${{ !cancelled() }}
run: ./conformance/veryl-symbolic/run_rv32i_ci.sh "$RUNNER_TEMP/selected-rv32i"
- name: Verify fixed automatic-proof held-outs and original-formula mutants
if: ${{ !cancelled() }}
run: ./conformance/veryl-symbolic/run_automatic_ci.sh "$RUNNER_TEMP/automatic-proof"
- name: Verify checked equality sharing and retain explicit Unknown diagnostics
if: ${{ !cancelled() }}
run: |
python3 -m unittest audit.equality_sharing.test_generate audit.equality_sharing.test_evidence audit.equality_sharing.test_ci
python3 -m audit.equality_sharing.ci --checker ../target/release/lydite --out "$RUNNER_TEMP/equality-sharing"
- name: Verify whole-word frontier controls and original-formula mutants
if: ${{ !cancelled() }}
run: |
python3 -m unittest audit.word_frontier.test_generate audit.word_frontier.test_ci
python3 -m audit.word_frontier.ci --checker ../target/release/lydite --expected-checker-sha256 "$(sha256sum ../target/release/lydite | cut -d' ' -f1)" --out "$RUNNER_TEMP/word-frontier"
- name: Verify guarded word expansion and reject escaped guards
if: ${{ !cancelled() }}
run: |
cargo test --release --locked -p lydite-solver equality_sharing::tests
python3 -m unittest audit.guarded_expansion.test_generate audit.guarded_expansion.test_ci
python3 -m audit.guarded_expansion.ci --checker ../target/release/lydite --expected-checker-sha256 "$(sha256sum ../target/release/lydite | cut -d' ' -f1)" --out "$RUNNER_TEMP/guarded-expansion"
- name: Upload proof and diagnostic evidence
if: always()
uses: actions/upload-artifact@v7
with:
name: veryl-proof-${{ github.run_id }}-${{ github.run_attempt }}
path: |
${{ runner.temp }}/veryl-proof/
${{ runner.temp }}/veryl-symbolic/
${{ runner.temp }}/selected-rv32i/
${{ runner.temp }}/automatic-proof/
${{ runner.temp }}/equality-sharing/
${{ runner.temp }}/word-frontier/
${{ runner.temp }}/guarded-expansion/
${{ runner.temp }}/lemma-candidates/
if-no-files-found: error
retention-days: 14

result:
name: Lydite checks
needs: [changes, rust, documentation, editor, veryl-fv, bridge]
needs: [changes, rust, documentation, editor, veryl-fv]
if: always()
runs-on: ubuntu-26.04
defaults:
Expand All @@ -256,17 +164,17 @@ jobs:
import json, os
needs = json.loads(os.environ["NEEDS"])
assert needs["changes"]["result"] == "success", needs
assert all(needs["changes"]["outputs"].get(key) in ("true", "false") for key in ("core", "bridge")), needs
for job, lane in {"rust": None, "documentation": "core", "editor": "core", "veryl-fv": "core", "bridge": "bridge"}.items():
assert needs["changes"]["outputs"].get("core") in ("true", "false"), needs
for job in ("rust", "documentation", "editor", "veryl-fv"):
outputs = needs["changes"]["outputs"]
selected = outputs.get(lane) == "true" if lane else any(outputs.get(key) == "true" for key in ("core", "bridge"))
selected = outputs.get("core") == "true"
assert needs[job]["result"] == ("success" if selected else "skipped"), (job, needs[job])
PYCODE

# Report daily/manual runs; the bridge does not gate Celox PRs.
# Report daily/manual core runs.
report:
name: Report Lydite validation
needs: [changes, rust, documentation, editor, veryl-fv, bridge, result]
needs: [changes, rust, documentation, editor, veryl-fv, result]
if: ${{ !cancelled() && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && (github.ref_name == 'master' || github.ref_name == 'develop') }}
runs-on: ubuntu-26.04
permissions:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,14 @@ jobs:
- name: Dispatch full CI on develop
run: gh workflow run ci.yml --repo "$GITHUB_REPOSITORY" --ref develop

# lydite-checks.yml schedules the default branch itself; its bridge lanes do not run
# for Celox PRs, so check develop's in-tree Celox daily as well.
# Lydite core validation also runs on develop; bridge gates are disabled.
queue-lydite-develop:
name: Queue develop Lydite validation
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Dispatch every Lydite lane on develop
- name: Dispatch Lydite core validation on develop
run: gh workflow run lydite-checks.yml --repo "$GITHUB_REPOSITORY" --ref develop

# heliodor-bench.yml schedules the stable master lane directly. Dispatch the
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
- name: Build Rust API documentation
env:
RUSTDOCFLAGS: -D warnings
run: cargo doc --locked --workspace --no-deps
run: cargo doc --locked --workspace --exclude lydite-celox --no-deps

publish:
name: Publish to crates.io
Expand Down
39 changes: 22 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ interpreter, native and Cranelift backends in both two-state and four-state mode
wide-value latch checks, and a small sorter compilation smoke test.
The 257/512-bit per-bit graph cases and sorter sizes 4/8/16/32 are measured by
`benches/compilation.rs` in the existing daily/manual CodSpeed workflow.
Compilation benchmarks use CodSpeed walltime measurement on its ARM64 Graviton
Macro Runner: CPU simulation made
a single 512-bit case take tens of minutes. The benchmark step has a 15-minute
timeout and the complete job a 60-minute limit; a timeout is reported as failure.
The organization runner group must allow this public repository to use CodSpeed
Macro Runners. Simulation and walltime measurements have separate baselines.
Nested-write benchmarks reuse the same semantic assertions as the small tests.
Scaling cases use one iteration without per-case warmups or adaptive sampling;
a small counter warms process-global analyzer state before measurement.
Expand All @@ -130,8 +136,8 @@ CodSpeed reporting workflow.
Build and run them with the same CodSpeed harness as CI:

```sh
cargo codspeed build --locked -p celox --bench compilation
cargo codspeed run -p celox
cargo codspeed build --locked --measurement-mode walltime -p celox --bench compilation
cargo codspeed run --measurement-mode walltime -p celox --bench compilation
```

## Finish validation
Expand Down Expand Up @@ -294,32 +300,31 @@ Job selection:

Lydite has its own test cadence (`scripts/ci-lydite-changes.mjs`):

- Lydite sources and fixtures run its core and bridge lanes. The core lane owns
the proof-engine Rust tests, editor and standalone Veryl conformance. The
bridge lane (`bridge` job) runs replay and proof-backed Veryl/symbolic corpus
gates against the in-tree Celox exporter in one job sharing a release build.
- The bridge takes about an hour of runner time, so Celox changes do not run it
on PRs or queue drafts even when Cargo's dependency graph reaches
`lydite-celox`. The daily and manual runs on `master` (scheduled) and
`develop` (dispatched by `nightly.yml`) enable every lane and report failures
in the issue "Lydite validation is failing on <branch>", closed by the next
passing run. NAPI/JS changes, upstream private tests and Markdown do not
reach Lydite.
- Lydite core sources and fixtures select proof-engine Rust tests, editor and
standalone Veryl conformance. Celox bridge/replay/proof-corpus CI is disabled
for PRs, merge queues, scheduled runs and manual workflow dispatches.
`lydite-celox` remains available for explicit local development, but normal
CI does not build, lint, document or test it. The routine pre-push Cargo
check also excludes it.
- Daily and manual core runs on `master` and `develop` report failures in the
issue "Lydite validation is failing on <branch>". Celox and bridge-crate
changes do not select core gates.
- Version-only Release Please diffs, including their queue drafts, skip Lydite.
- PR workflows come from the PR's merge ref, so branches based on an older base
still carry the earlier `lydite.yml`, which selected every lane. That
workflow file stays disabled in repository settings; `lydite-checks.yml`
replaces it. Re-enable nothing under the old path.
- Shared dependency/toolchain configuration runs the core lane; an unreadable
diff or dependency graph runs both lanes. The graph includes optional, build
diff or dependency graph runs the core lane. The graph includes optional, build
and dev edges. A `Cargo.lock` diff selects a lane only when a changed lock
entry is in that lane's lockfile dependency closure, so adding a dependency
to a Celox crate does not run Lydite. The Nix flake and `ci.yml` do not
select Lydite; its jobs use neither. Celox's `conformance/sv-tests/` corpus
also skips Lydite; Lydite's fixtures live under `lydite/conformance/`.
- Ordinary `ci.yml` tests exclude `lydite*`, including daily and release runs;
formatting/lint/build checks remain there. The dedicated workflow tests the
selected Lydite packages, including doctests, and installs its solver.
lint and API documentation also exclude `lydite-celox`. The dedicated
workflow tests only core Lydite packages, including doctests, and installs
its solver. Cache warming excludes `lydite*`.
- `Lydite checks` accepts skipped lanes only when change detection explicitly
excludes them, and fails on selected-job failures or cancellations. Repository
branch protection must require this check to make it a merge gate.
Expand Down Expand Up @@ -373,7 +378,7 @@ Local validation uses the behavior-based matrix above.
| Daily at 02:37 UTC (11:37 JST) | `heliodor-bench.yml` runs the complete master Linux suite on x86-64 and AArch64. Explicit manual selections retain focused suite runs and ARM64 profiling. PRs do not run this workflow; its tooling tests run in `Lint & Format` with the other script tests. |
| Every daily/manual full CI run | Run the pinned upstream `common_cells` Gray code SV TB through `celox run --project`, plus an assertion negative control. Logs are retained for 14 days and failures feed the Full CI issue. See [the reproduction instructions](conformance/common-cells/README.md). |
| Every full CI run | Run every shared Veryl and SystemVerilog case against both Verilator and Icarus, with locked Nix tools. Run the live adapter tests normally marked ignored because they need external tools. Preserve reports and per-case diagnostics as artifacts for 14 days, including on failure; matrix failures do not cancel the other comparisons. |
| Affected pull requests and merge groups; daily at 03:41 UTC (12:41 JST); on demand | `lydite-checks.yml` owns Lydite Rust tests, proof, conformance, editor, and mutation gates. Unrelated changes skip these jobs, and Celox changes skip the bridge. Daily and manual runs enable all lanes and report failures in an issue. |
| Affected pull requests and merge groups; daily at 03:41 UTC (12:41 JST); on demand | `lydite-checks.yml` owns Lydite Rust tests, proof, conformance, editor, and mutation gates. Unrelated changes skip these jobs. Bridge gates are disabled; daily and manual runs enable only core lanes and report failures in an issue. |
| On demand | Dispatch `ci.yml` on the desired branch to run full CI and external comparisons, regardless of its diff. |
| Pull requests that cut a release | A `master` pull request or legacy merge group whose diff changes `.release-please-manifest.json` (only the release pull request does there; syncing it into `develop` is not a release) runs full CI and the external comparisons. `Rust Test & NAPI Build` then requires the comparisons to pass, so a release cannot merge after only change-based checks. Daily and manual full runs do not gate on the comparisons; their failures reach the full CI issue below. A `master` pull request or legacy merge group whose diff cannot be determined is treated the same way. |

Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading