Essential workflow fixes: - ci.yml: add SQLX_OFFLINE=true, replace fictitious cargo subcommands (test-unit, ci-lint, audit-deps, etc.) with real cargo commands, remove broken 9-way test matrix, remove instrument-coverage RUSTFLAGS - test.yml: add SQLX_OFFLINE=true to build-check job, fix conflicting clippy flags (-D and -W on clippy::all), update JWT secret to 32+ chars - compilation-guard.yml: add SQLX_OFFLINE=true, remove references to non-existent paths (services/trading-engine, crates/common/types), remove dangerous auto-commit-to-main, remove MIRI on missing packages Deleted duplicates (justification): - comprehensive_testing.yml: duplicate of comprehensive-testing.yml (same purpose, underscore vs hyphen naming) - production-deploy.yml: duplicate of production-deployment.yml (both named "Production Deployment Pipeline", this one has stale paths) - coverage-fixed.yml: duplicate of coverage.yml (uses deprecated actions-rs/toolchain@v1 and actions/cache@v3) - performance.yml: duplicate of benchmark_regression.yml (both "Performance Regression Detection", this one less mature) - quality-baseline.json: not a workflow, stale fake data (999 warnings) - quality-metrics.json: not a workflow, stale fake data Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
64 lines
1.6 KiB
YAML
64 lines
1.6 KiB
YAML
name: Compilation Guard
|
|
# Protect compilation state from regression on every push/PR
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, develop ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUST_BACKTRACE: 1
|
|
SQLX_OFFLINE: "true"
|
|
|
|
jobs:
|
|
compilation-guard:
|
|
name: Compilation Guard
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy, rustfmt
|
|
|
|
- name: Setup Rust cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
cache-on-failure: true
|
|
|
|
- name: Install system dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y cmake build-essential pkg-config libssl-dev protobuf-compiler
|
|
|
|
- name: Workspace compilation check
|
|
run: |
|
|
echo "Checking workspace compilation..."
|
|
cargo check --workspace --all-targets
|
|
echo "Workspace compiles successfully"
|
|
|
|
- name: Clippy check
|
|
run: cargo clippy --workspace --all-targets
|
|
|
|
- name: Formatting check
|
|
run: cargo fmt --all -- --check
|
|
|
|
- name: Generate dependency tree snapshot
|
|
run: |
|
|
cargo tree --format "{p} {f}" | sort > dependency-tree.txt
|
|
echo "Dependency tree captured ($(wc -l < dependency-tree.txt) entries)"
|
|
|
|
- name: Upload compilation artifacts
|
|
uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: compilation-guard-artifacts
|
|
path: |
|
|
dependency-tree.txt
|
|
retention-days: 30
|