File size: 8,746 Bytes
931572e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | # Master build script for SNAPKITTYWEST sovereign compute stack (PowerShell)
# Builds all components: Haskell, C++, C#, OCaml
$ErrorActionPreference = "Continue"
Write-Host "============================================" -ForegroundColor Cyan
Write-Host "SNAPKITTYWEST Sovereign Compute Stack Build" -ForegroundColor Cyan
Write-Host "============================================" -ForegroundColor Cyan
Write-Host ""
# Track results
$HaskellOk = $false
$CppOk = $false
$CsharpOk = $false
$OcamlOk = $false
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# Phase 1: Haskell Datalog Engine
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Write-Host "Phase 1: Haskell Datalog Engine" -ForegroundColor Yellow
Write-Host "--------------------------------"
if (Get-Command ghc -ErrorAction SilentlyContinue) {
Write-Host " GHC found: $(ghc --version)"
if (Get-Command cabal -ErrorAction SilentlyContinue) {
Write-Host " Building Haskell Datalog Engine..."
Push-Location errant/datalog
if (cabal build 2>&1) {
Write-Host " β Haskell Datalog Engine built successfully" -ForegroundColor Green
$HaskellOk = $true
} else {
Write-Host " β Haskell Datalog Engine build failed" -ForegroundColor Red
}
Pop-Location
} else {
Write-Host " β cabal not found" -ForegroundColor Red
}
} else {
Write-Host " β GHC not found (Haskell build skipped)" -ForegroundColor Yellow
}
Write-Host ""
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# Phase 2: C++ Modules
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Write-Host "Phase 2: C++ Modules" -ForegroundColor Yellow
Write-Host "--------------------"
if (Get-Command cmake -ErrorAction SilentlyContinue) {
Write-Host " CMake found: $(cmake --version | Select-Object -First 1)"
Write-Host " Building C++ modules..."
Push-Location sovereign-utqc/cpp
if (cmake -S . -B build) {
if (cmake --build build) {
Write-Host " β C++ modules built successfully" -ForegroundColor Green
$CppOk = $true
} else {
Write-Host " β C++ modules build failed" -ForegroundColor Red
}
} else {
Write-Host " β CMake configuration failed" -ForegroundColor Red
}
Pop-Location
} else {
Write-Host " β CMake not found (C++ build skipped)" -ForegroundColor Yellow
}
Write-Host ""
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# Phase 3: C# AGT
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Write-Host "Phase 3: C# AGT" -ForegroundColor Yellow
Write-Host "----------------"
if (Get-Command dotnet -ErrorAction SilentlyContinue) {
Write-Host " .NET found: $(dotnet --version)"
Write-Host " Building C# AGT..."
Push-Location sovereign-utqc/csharp
if (dotnet build SnapKitty.AGT.slnx --configuration Release 2>&1) {
Write-Host " β C# AGT built successfully" -ForegroundColor Green
Write-Host " Running tests..."
if (dotnet test SnapKitty.AGT.slnx --configuration Release --no-build 2>&1) {
Write-Host " β C# AGT tests passed" -ForegroundColor Green
$CsharpOk = $true
} else {
Write-Host " β C# AGT tests failed" -ForegroundColor Red
}
} else {
Write-Host " β C# AGT build failed" -ForegroundColor Red
}
Pop-Location
} else {
Write-Host " β .NET not found (C# build skipped)" -ForegroundColor Yellow
}
Write-Host ""
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# Phase 4: OCaml snap-prism
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Write-Host "Phase 4: OCaml snap-prism" -ForegroundColor Yellow
Write-Host "-------------------------"
if (Get-Command dune -ErrorAction SilentlyContinue) {
Write-Host " dune found: $(dune --version)"
Write-Host " Building OCaml snap-prism..."
Push-Location sovereign-utqc/snap-prism-ocaml
if (dune build 2>&1) {
Write-Host " β OCaml snap-prism built successfully" -ForegroundColor Green
Write-Host " Running tests..."
if (dune runtest 2>&1) {
Write-Host " β OCaml snap-prism tests passed" -ForegroundColor Green
$OcamlOk = $true
} else {
Write-Host " β OCaml snap-prism tests failed" -ForegroundColor Red
}
} else {
Write-Host " β OCaml snap-prism build failed" -ForegroundColor Red
}
Pop-Location
} else {
Write-Host " β dune not found (OCaml build skipped)" -ForegroundColor Yellow
}
Write-Host ""
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# Phase 5: Rust Workspaces
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Write-Host "Phase 5: Rust Workspaces" -ForegroundColor Yellow
Write-Host "------------------------"
if (Get-Command cargo -ErrorAction SilentlyContinue) {
Write-Host " Cargo found: $(cargo --version)"
Write-Host " Building sovereign-utqc..."
if (cargo test --manifest-path sovereign-utqc/Cargo.toml --workspace 2>&1) {
Write-Host " β sovereign-utqc tests passed" -ForegroundColor Green
} else {
Write-Host " β sovereign-utqc tests failed" -ForegroundColor Red
}
Write-Host " Building sovereign-llm..."
if (cargo test --manifest-path sovereign-llm/Cargo.toml --workspace 2>&1) {
Write-Host " β sovereign-llm tests passed" -ForegroundColor Green
} else {
Write-Host " β sovereign-llm tests failed" -ForegroundColor Red
}
} else {
Write-Host " β Cargo not found (Rust build skipped)" -ForegroundColor Yellow
}
Write-Host ""
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# Summary
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Write-Host "============================================" -ForegroundColor Cyan
Write-Host "Build Summary" -ForegroundColor Cyan
Write-Host "============================================" -ForegroundColor Cyan
Write-Host ""
Write-Host " Haskell Datalog: $(if ($HaskellOk) { 'β PASS' } else { 'β FAIL' })"
Write-Host " C++ Modules: $(if ($CppOk) { 'β PASS' } else { 'β FAIL' })"
Write-Host " C# AGT: $(if ($CsharpOk) { 'β PASS' } else { 'β FAIL' })"
Write-Host " OCaml snap-prism: $(if ($OcamlOk) { 'β PASS' } else { 'β FAIL' })"
Write-Host ""
# Calculate total
$Total = @($HaskellOk, $CppOk, $CsharpOk, $OcamlOk) | Where-Object { $_ } | Measure-Object | Select-Object -ExpandProperty Count
Write-Host " Total: $Total/4 components built successfully"
Write-Host ""
if ($Total -eq 4) {
Write-Host "All components built successfully!" -ForegroundColor Green
exit 0
} else {
Write-Host "Some components failed to build." -ForegroundColor Yellow
exit 1
}
|