forked from Commitlabs-Org/Commitlabs-Contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_build.ps1
More file actions
27 lines (22 loc) · 998 Bytes
/
test_build.ps1
File metadata and controls
27 lines (22 loc) · 998 Bytes
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
Write-Host "Testing Rust compilation..." -ForegroundColor Cyan
# Test commitment_core compilation
Write-Host "`nChecking commitment_core..." -ForegroundColor Yellow
cargo check --package commitment_core 2>&1 | Out-Null
if ($LASTEXITCODE -eq 0) {
Write-Host "[OK] commitment_core compiles successfully!" -ForegroundColor Green
} else {
Write-Host "[FAIL] commitment_core has errors" -ForegroundColor Red
cargo check --package commitment_core
exit 1
}
# Test commitment_marketplace compilation
Write-Host "`nChecking commitment_marketplace..." -ForegroundColor Yellow
cargo check --package commitment-marketplace 2>&1 | Out-Null
if ($LASTEXITCODE -eq 0) {
Write-Host "[OK] commitment_marketplace compiles successfully!" -ForegroundColor Green
} else {
Write-Host "[FAIL] commitment_marketplace has errors" -ForegroundColor Red
cargo check --package commitment-marketplace
exit 1
}
Write-Host "`n[SUCCESS] All checks passed! Ready to push." -ForegroundColor Green