fix: resolve CSE and simplify_locals Z3 verification failures #50
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Validate Shared Architecture | |
| on: | |
| push: | |
| branches: [ main, develop, claude/** ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| test-shared: | |
| name: Test loom-shared | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/registry | |
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache cargo index | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache cargo build | |
| uses: actions/cache@v4 | |
| with: | |
| path: target | |
| key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Build loom-shared | |
| run: cargo build -p loom-shared --verbose | |
| - name: Test loom-shared | |
| run: cargo test -p loom-shared --release --verbose | |
| - name: Check ISLE generation | |
| run: | | |
| # Verify ISLE files compile | |
| cargo build -p loom-shared | |
| echo "✅ ISLE compilation successful" | |
| test-workspace: | |
| name: Test Full Workspace | |
| runs-on: ubuntu-latest | |
| needs: test-shared | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/registry | |
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache cargo index | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache cargo build | |
| uses: actions/cache@v4 | |
| with: | |
| path: target | |
| key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Build all crates | |
| run: cargo build --workspace --verbose | |
| - name: Test all crates | |
| run: cargo test --workspace --release --verbose | |
| - name: Verify loom-isle re-exports | |
| run: | | |
| # Ensure loom-isle correctly re-exports from loom-shared | |
| cargo build -p loom-isle | |
| echo "✅ loom-isle re-export verification successful" | |
| integration-test: | |
| name: Integration Testing | |
| runs-on: ubuntu-latest | |
| needs: test-workspace | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Build CLI | |
| run: cargo build --release -p loom-cli | |
| - name: Test CLI optimization | |
| run: | | |
| # Create a simple test WASM module | |
| cat > test.wat << 'EOF' | |
| (module | |
| (func $test (result i32) | |
| i32.const 10 | |
| i32.const 20 | |
| i32.add | |
| ) | |
| ) | |
| EOF | |
| # Convert to WASM | |
| echo "Testing CLI with sample module..." | |
| ./target/release/loom optimize test.wat -o test_optimized.wasm || true | |
| if [ -f test_optimized.wasm ]; then | |
| echo "✅ CLI optimization successful" | |
| else | |
| echo "⚠️ CLI test skipped (wat tool not available)" | |
| fi | |
| check-api-stability: | |
| name: Check API Stability | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install cargo-semver-checks | |
| run: cargo install cargo-semver-checks --locked || echo "cargo-semver-checks installation skipped" | |
| - name: Check for breaking changes | |
| run: | | |
| # Check if cargo-semver-checks is available | |
| if command -v cargo-semver-checks &> /dev/null; then | |
| cargo semver-checks check-release -p loom-shared || echo "⚠️ Potential breaking changes detected in loom-shared" | |
| else | |
| echo "⚠️ cargo-semver-checks not available, skipping API stability check" | |
| fi | |
| format-and-lint: | |
| name: Format and Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Install Z3 | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y z3 | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| - name: Run clippy | |
| run: cargo clippy --workspace --all-targets --all-features -- -D warnings | |
| verify-architecture: | |
| name: Verify Architecture | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Verify documentation exists | |
| run: | | |
| if [ ! -f docs/analysis/LOOM_SYNTH_ARCHITECTURE.md ]; then | |
| echo "❌ Architecture documentation missing!" | |
| exit 1 | |
| fi | |
| echo "✅ Architecture documentation present" | |
| - name: Verify loom-shared structure | |
| run: | | |
| # Check that loom-shared has the expected structure | |
| if [ ! -d loom-shared/isle ]; then | |
| echo "❌ loom-shared/isle directory missing!" | |
| exit 1 | |
| fi | |
| if [ ! -f loom-shared/isle/wasm_terms.isle ]; then | |
| echo "❌ ISLE definitions missing!" | |
| exit 1 | |
| fi | |
| if [ ! -f loom-shared/src/lib.rs ]; then | |
| echo "❌ loom-shared lib.rs missing!" | |
| exit 1 | |
| fi | |
| echo "✅ loom-shared structure verified" | |
| - name: Verify dependency graph | |
| run: | | |
| # Ensure loom-isle depends on loom-shared | |
| if ! grep -q "loom-shared" loom-isle/Cargo.toml; then | |
| echo "❌ loom-isle should depend on loom-shared!" | |
| exit 1 | |
| fi | |
| # Ensure loom-core depends on loom-shared | |
| if ! grep -q "loom-shared" loom-core/Cargo.toml; then | |
| echo "❌ loom-core should depend on loom-shared!" | |
| exit 1 | |
| fi | |
| echo "✅ Dependency graph verified" |