|
89 | 89 | working-directory: apps/headless |
90 | 90 | run: swift build --product headless-protocol-tests 2>&1 | Tee-Object tests-build.log |
91 | 91 |
|
| 92 | + - name: Bypass SPM - swiftc direct typecheck of portable core |
| 93 | + if: success() || failure() |
| 94 | + shell: pwsh |
| 95 | + working-directory: apps/headless |
| 96 | + run: | |
| 97 | + New-Item -ItemType Directory -Force -Path spike-out | Out-Null |
| 98 | + # hello world sanity check through the whole toolchain |
| 99 | + Set-Content spike-out\hello.swift 'print("hello from windows")' |
| 100 | + swiftc spike-out\hello.swift -o spike-out\hello.exe 2>&1 | Tee-Object spike-out\hello-build.log |
| 101 | + & .\spike-out\hello.exe 2>&1 | Tee-Object spike-out\hello-run.log |
| 102 | +
|
| 103 | + # type-check every HeadlessProtocol source that does not depend on |
| 104 | + # SPM resource accessors (Bundle.module) or the C version header |
| 105 | + $portable = Get-ChildItem Sources/HeadlessProtocol -Filter '*.swift' | |
| 106 | + Where-Object { $_.Name -notin @('AgentRuntime.swift','HostCore.swift','ProductVersion.swift') } | |
| 107 | + ForEach-Object { $_.FullName } |
| 108 | + Write-Host "type-checking $($portable.Count) portable sources" |
| 109 | + swiftc -typecheck -DHEADLESS_WINDOWS_SPIKE $portable 2>&1 | Tee-Object spike-out\portable-typecheck.log |
| 110 | + Write-Host "portable typecheck exit=$LASTEXITCODE" |
| 111 | +
|
92 | 112 | - name: Upload build logs |
93 | 113 | if: always() |
94 | 114 | uses: actions/upload-artifact@v4 |
|
97 | 117 | path: | |
98 | 118 | apps/headless/core-build.log |
99 | 119 | apps/headless/tests-build.log |
| 120 | + apps/headless/spike-out/ |
100 | 121 | if-no-files-found: ignore |
0 commit comments