Skip to content

Commit 65a1fb8

Browse files
committed
ci: bypass SPM with direct swiftc typecheck in Windows spike
1 parent f7a3b3b commit 65a1fb8

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

‎.github/workflows/windows-spike.yml‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,26 @@ jobs:
8989
working-directory: apps/headless
9090
run: swift build --product headless-protocol-tests 2>&1 | Tee-Object tests-build.log
9191

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+
92112
- name: Upload build logs
93113
if: always()
94114
uses: actions/upload-artifact@v4
@@ -97,4 +117,5 @@ jobs:
97117
path: |
98118
apps/headless/core-build.log
99119
apps/headless/tests-build.log
120+
apps/headless/spike-out/
100121
if-no-files-found: ignore

0 commit comments

Comments
 (0)