@@ -105,6 +105,16 @@ jobs:
105105 $results = @()
106106 foreach ($proj in $projects) {
107107 $rel = (Resolve-Path -Relative $proj.FullName) -replace '\\', '/'
108+
109+ # Skip legacy non-SDK projects: they need msbuild + nuget restore
110+ # and/or an installed Rhino, so they are not built in CI for now.
111+ $isSdkStyle = (Get-Content $proj.FullName -Raw) -match '<Project\s+Sdk='
112+ if (-not $isSdkStyle) {
113+ Write-Host "::notice title=Skipped (legacy non-SDK)::$rel"
114+ $results += [pscustomobject]@{ Project = $rel; Status = 'skipped' }
115+ continue
116+ }
117+
108118 Write-Host "::group::Building $rel"
109119 dotnet build $proj.FullName -c Release --nologo
110120 $code = $LASTEXITCODE
@@ -118,13 +128,14 @@ jobs:
118128 }
119129 }
120130
121- $passed = ($results | Where-Object Status -eq 'pass').Count
122- $failed = ($results | Where-Object Status -eq 'FAILED').Count
131+ $passed = ($results | Where-Object Status -eq 'pass').Count
132+ $failed = ($results | Where-Object Status -eq 'FAILED').Count
133+ $skipped = ($results | Where-Object Status -eq 'skipped').Count
123134
124135 $lines = @()
125136 $lines += $summaryHeader
126137 $lines += ""
127- $lines += "**$passed passed, $failed failed** of $($results.Count) project(s)."
138+ $lines += "**$passed passed, $failed failed, $skipped skipped ** of $($results.Count) project(s)."
128139 $lines += ""
129140 $lines += "| Project | Result |"
130141 $lines += "| --- | --- |"
@@ -133,8 +144,8 @@ jobs:
133144 }
134145 ($lines -join "`n") | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append
135146
136- Write-Host "$env:CATEGORY: $passed passed, $failed failed."
137- # Hard gate: any failed project fails the job.
147+ Write-Host "$env:CATEGORY: $passed passed, $failed failed, $skipped skipped ."
148+ # Hard gate: any failed project fails the job (skipped does not) .
138149 if ($failed -gt 0) { exit 1 }
139150 exit 0
140151
0 commit comments