From d817e5e740597d9f9f90ee6b1c7afeb8eeefc028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Fri, 28 Nov 2025 22:08:21 +0100 Subject: [PATCH 01/13] Add Windows build workflow --- .github/workflows/test.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 54cee8db4d..4efbf6fa4d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -58,3 +58,28 @@ jobs: path: .build - name: Run tests run: make spm_test + + spm_windows: + name: SPM, Windows, Swift ${{ matrix.swift-version }} + runs-on: windows-${{ matrix.windows-version }} + strategy: + matrix: + include: + - windows-version: 2025 + swift-version: 6.2.1 + steps: + - uses: compnerd/gha-setup-swift@main + with: + swift-version: swift-${{ matrix.swift-version }}-release + swift-build: ${{ matrix.swift-version }}-RELEASE + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + with: + persist-credentials: false + - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + with: + key: ${{ runner.os }}-spm-${{ matrix.swift-version }}-${{ hashFiles('Package.resolved', 'Package.swift') }} + restore-keys: ${{ runner.os }}-spm-${{ matrix.swift-version }}- + path: .build + - name: Build + run: swift build --build-tests + # To be extended with test execution and linting ... From ba7c56a2841185564dcc6b39ed5bcacd64323526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Fri, 28 Nov 2025 22:27:33 +0100 Subject: [PATCH 02/13] Add build for ARM version:wq --- .github/workflows/test.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4efbf6fa4d..b68af42dd1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,25 +60,33 @@ jobs: run: make spm_test spm_windows: - name: SPM, Windows, Swift ${{ matrix.swift-version }} + name: SPM, Windows ${{ matrix.windows-display-name }}, Swift ${{ matrix.swift-version }} runs-on: windows-${{ matrix.windows-version }} strategy: + fail-fast: false matrix: include: - windows-version: 2025 + arch: amd64 + windows-display-name: 'Server 2025' + swift-version: 6.2.1 + - windows-version: 11-arm + arch: arm64 + windows-display-name: '11 ARM' swift-version: 6.2.1 steps: - uses: compnerd/gha-setup-swift@main with: swift-version: swift-${{ matrix.swift-version }}-release swift-build: ${{ matrix.swift-version }}-RELEASE + build_arch: ${{ matrix.arch }} - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 with: persist-credentials: false - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: - key: ${{ runner.os }}-spm-${{ matrix.swift-version }}-${{ hashFiles('Package.resolved', 'Package.swift') }} - restore-keys: ${{ runner.os }}-spm-${{ matrix.swift-version }}- + key: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}-${{ hashFiles('Package.resolved', 'Package.swift') }} + restore-keys: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}- path: .build - name: Build run: swift build --build-tests From 19181d88c6c844b0287b2e847a7ed54cea381da6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Sat, 29 Nov 2025 00:37:08 +0100 Subject: [PATCH 03/13] Run selected tests --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b68af42dd1..2449c45d14 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -88,6 +88,8 @@ jobs: key: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}-${{ hashFiles('Package.resolved', 'Package.swift') }} restore-keys: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}- path: .build - - name: Build + - name: Build all targets run: swift build --build-tests + - name: Run selected tests + run: swift test --skip IntegrationTests --skip FileSystemAccessTests # To be extended with test execution and linting ... From acc2a8e1ef09f5644fdcaff9f4a1b6d010de71da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Sat, 29 Nov 2025 12:00:32 +0100 Subject: [PATCH 04/13] Run Swift commands verbosely --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2449c45d14..16e5a38ea2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -89,7 +89,7 @@ jobs: restore-keys: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}- path: .build - name: Build all targets - run: swift build --build-tests + run: swift build --build-tests --vv - name: Run selected tests - run: swift test --skip IntegrationTests --skip FileSystemAccessTests + run: swift test --vv --skip IntegrationTests --skip FileSystemAccessTests # To be extended with test execution and linting ... From 3a268448a6ecaf0a5624902736e839f209c94d61 Mon Sep 17 00:00:00 2001 From: Roman Lavrov Date: Mon, 1 Dec 2025 09:05:20 -0500 Subject: [PATCH 05/13] just win 2025 and --jobs 1 --- .github/workflows/test.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 16e5a38ea2..faa8daa619 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,6 +13,7 @@ env: jobs: spm_linux: + if: false name: SPM, Linux, Swift 6.2 runs-on: ubuntu-24.04 container: swift:6.2-noble @@ -34,6 +35,7 @@ jobs: rule: spm_test spm_macos: + if: false name: SPM, macOS ${{ matrix.macOS }}, Xcode ${{ matrix.xcode }} runs-on: macos-${{ matrix.macOS }} strategy: @@ -70,10 +72,6 @@ jobs: arch: amd64 windows-display-name: 'Server 2025' swift-version: 6.2.1 - - windows-version: 11-arm - arch: arm64 - windows-display-name: '11 ARM' - swift-version: 6.2.1 steps: - uses: compnerd/gha-setup-swift@main with: @@ -89,7 +87,7 @@ jobs: restore-keys: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}- path: .build - name: Build all targets - run: swift build --build-tests --vv + run: swift build --build-tests --vv --jobs 1 - name: Run selected tests run: swift test --vv --skip IntegrationTests --skip FileSystemAccessTests # To be extended with test execution and linting ... From eff4828195ecc134bf772ad797cc19db21772f45 Mon Sep 17 00:00:00 2001 From: Roman Lavrov Date: Mon, 1 Dec 2025 09:19:46 -0500 Subject: [PATCH 06/13] less jobs, process monitoring --- .github/workflows/build.yml | 2 ++ .github/workflows/docs.yml | 1 + .github/workflows/lint.yml | 3 +++ .github/workflows/test.yml | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 41 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e2d72a7a1f..c76e1589d6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,6 +10,7 @@ permissions: jobs: bazel_linux: + if: false name: Bazel, Linux, Swift 6.2 # pre-installed runs-on: ubuntu-24.04 steps: @@ -22,6 +23,7 @@ jobs: CI_BAZELRC_FILE_CONTENT: ${{ secrets.CI_BAZELRC_FILE_CONTENT }} plugins_linux: + if: false name: SPM plugins, Linux, Swift ${{ matrix.version }} runs-on: ubuntu-24.04 strategy: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index fa5752c205..d7f3920497 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -7,6 +7,7 @@ on: jobs: create-docs: + if: false name: Create runs-on: ubuntu-24.04 permissions: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b017daef7a..1d4fdcee4d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,6 +9,7 @@ permissions: jobs: lint-swift: + if: false name: Swift runs-on: ubuntu-24.04 # "Noble Numbat" steps: @@ -22,6 +23,7 @@ jobs: - name: Lint run: ./bazel-bin/swiftlint lint --reporter github-actions-logging --strict 2> /dev/null lint-markdown: + if: false name: Markdown runs-on: ubuntu-slim steps: @@ -36,6 +38,7 @@ jobs: CONTRIBUTING.md README.md lint-actions: + if: false name: Actions runs-on: ubuntu-24.04 steps: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index faa8daa619..2ffb404ee4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -86,8 +86,43 @@ jobs: key: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}-${{ hashFiles('Package.resolved', 'Package.swift') }} restore-keys: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}- path: .build + - name: Start monitoring + shell: powershell + run: | + $monitorScript = @' + while ($true) { + $timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss" + Write-Host "`n=== $timestamp ===" + + # Swift processes count grouped by name + $swiftProcs = Get-Process | Where-Object { $_.ProcessName -like "*swift*" } | Group-Object ProcessName + if ($swiftProcs) { + Write-Host "`nSwift Processes:" + $swiftProcs | ForEach-Object { Write-Host " $($_.Name): $($_.Count)" } + } else { + Write-Host "`nSwift Processes: None" + } + + # CPU and Memory + $cpu = (Get-Counter '\Processor(_Total)\% Processor Time').CounterSamples.CookedValue + $mem = Get-CimInstance Win32_OperatingSystem + $usedGB = [math]::Round(($mem.TotalVisibleMemorySize - $mem.FreePhysicalMemory) / 1MB, 2) + $totalGB = [math]::Round($mem.TotalVisibleMemorySize / 1MB, 2) + + Write-Host "`nCPU Usage: $([math]::Round($cpu, 2))%" + Write-Host "Memory: $usedGB GB / $totalGB GB" + + Start-Sleep -Seconds 30 + } + '@ + $monitorScript | Out-File -FilePath monitor.ps1 + Start-Process powershell -ArgumentList "-File monitor.ps1" -WindowStyle Hidden - name: Build all targets run: swift build --build-tests --vv --jobs 1 - name: Run selected tests run: swift test --vv --skip IntegrationTests --skip FileSystemAccessTests + - name: Stop monitoring + if: always() + shell: powershell + run: Get-Process powershell | Where-Object { $_.CommandLine -like "*monitor.ps1*" } | Stop-Process -Force # To be extended with test execution and linting ... From 7f706641382eed2ccd895b861304da5565042306 Mon Sep 17 00:00:00 2001 From: Roman Lavrov Date: Mon, 1 Dec 2025 09:29:52 -0500 Subject: [PATCH 07/13] monitoring with logs --- .github/workflows/test.yml | 94 +++++++++++++++++++++++++------------- 1 file changed, 63 insertions(+), 31 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2ffb404ee4..7d3bf449ff 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -86,43 +86,75 @@ jobs: key: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}-${{ hashFiles('Package.resolved', 'Package.swift') }} restore-keys: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}- path: .build - - name: Start monitoring + - name: Create monitoring wrapper script shell: powershell run: | - $monitorScript = @' - while ($true) { - $timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss" - Write-Host "`n=== $timestamp ===" - - # Swift processes count grouped by name - $swiftProcs = Get-Process | Where-Object { $_.ProcessName -like "*swift*" } | Group-Object ProcessName - if ($swiftProcs) { - Write-Host "`nSwift Processes:" - $swiftProcs | ForEach-Object { Write-Host " $($_.Name): $($_.Count)" } - } else { - Write-Host "`nSwift Processes: None" + $wrapperScript = @' + param([string]$Command) + + # Start monitoring in background + $monitorJob = Start-Job -ScriptBlock { + while ($true) { + $timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss" + Write-Output "`n=== MONITOR $timestamp ===" + + # Swift processes count grouped by name + $swiftProcs = Get-Process -ErrorAction SilentlyContinue | Where-Object { $_.ProcessName -like "*swift*" } | Group-Object ProcessName + if ($swiftProcs) { + Write-Output "Swift Processes:" + $swiftProcs | ForEach-Object { Write-Output " $($_.Name): $($_.Count)" } + } else { + Write-Output "Swift Processes: None" + } + + # CPU and Memory + $cpu = (Get-Counter '\Processor(_Total)\% Processor Time').CounterSamples.CookedValue + $mem = Get-CimInstance Win32_OperatingSystem + $usedGB = [math]::Round(($mem.TotalVisibleMemorySize - $mem.FreePhysicalMemory) / 1MB, 2) + $totalGB = [math]::Round($mem.TotalVisibleMemorySize / 1MB, 2) + + Write-Output "CPU Usage: $([math]::Round($cpu, 2))%" + Write-Output "Memory: $usedGB GB / $totalGB GB" + + Start-Sleep -Seconds 10 } - - # CPU and Memory - $cpu = (Get-Counter '\Processor(_Total)\% Processor Time').CounterSamples.CookedValue - $mem = Get-CimInstance Win32_OperatingSystem - $usedGB = [math]::Round(($mem.TotalVisibleMemorySize - $mem.FreePhysicalMemory) / 1MB, 2) - $totalGB = [math]::Round($mem.TotalVisibleMemorySize / 1MB, 2) - - Write-Host "`nCPU Usage: $([math]::Round($cpu, 2))%" - Write-Host "Memory: $usedGB GB / $totalGB GB" - - Start-Sleep -Seconds 30 } + + # Start command in background job + $commandJob = Start-Job -ScriptBlock { + param([string]$Cmd) + Invoke-Expression "$Cmd 2>&1" | ForEach-Object { Write-Output $_ } + return $LASTEXITCODE + } -ArgumentList $Command + + # Poll both jobs and show output as it comes + while ($commandJob.State -eq 'Running') { + Receive-Job $monitorJob + Receive-Job $commandJob + Start-Sleep -Milliseconds 500 + } + + # Get remaining output + Receive-Job $monitorJob + Receive-Job $commandJob + + # Clean up + Stop-Job $monitorJob + Remove-Job $monitorJob + + # Get command exit code + $exitCode = Receive-Job $commandJob -Keep + Remove-Job $commandJob + + exit $exitCode '@ - $monitorScript | Out-File -FilePath monitor.ps1 - Start-Process powershell -ArgumentList "-File monitor.ps1" -WindowStyle Hidden + $wrapperScript | Out-File -FilePath monitor-wrapper.ps1 -Encoding UTF8 - name: Build all targets - run: swift build --build-tests --vv --jobs 1 + shell: powershell + run: | + .\monitor-wrapper.ps1 -Command "swift build --build-tests" - name: Run selected tests - run: swift test --vv --skip IntegrationTests --skip FileSystemAccessTests - - name: Stop monitoring - if: always() shell: powershell - run: Get-Process powershell | Where-Object { $_.CommandLine -like "*monitor.ps1*" } | Stop-Process -Force + run: | + .\monitor-wrapper.ps1 -Command "swift test --skip IntegrationTests --skip FileSystemAccessTests" # To be extended with test execution and linting ... From 2821b422a1ed5acb4545c528fe0c387e79e65b65 Mon Sep 17 00:00:00 2001 From: Roman Lavrov Date: Mon, 1 Dec 2025 09:33:36 -0500 Subject: [PATCH 08/13] workdir --- .github/workflows/test.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7d3bf449ff..cf559a878a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -92,6 +92,9 @@ jobs: $wrapperScript = @' param([string]$Command) + # Capture current directory + $workDir = Get-Location + # Start monitoring in background $monitorJob = Start-Job -ScriptBlock { while ($true) { @@ -120,12 +123,13 @@ jobs: } } - # Start command in background job + # Start command in background job with working directory $commandJob = Start-Job -ScriptBlock { - param([string]$Cmd) + param([string]$Cmd, [string]$WorkDir) + Set-Location $WorkDir Invoke-Expression "$Cmd 2>&1" | ForEach-Object { Write-Output $_ } return $LASTEXITCODE - } -ArgumentList $Command + } -ArgumentList $Command, $workDir.Path # Poll both jobs and show output as it comes while ($commandJob.State -eq 'Running') { From 1843f02b0b5bc3f05481373886ba7d9432bdc375 Mon Sep 17 00:00:00 2001 From: Roman Lavrov Date: Mon, 1 Dec 2025 10:08:02 -0500 Subject: [PATCH 09/13] return code and enable long paths --- .github/workflows/test.yml | 66 ++++++++++++++++++++++++++++++-------- 1 file changed, 53 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cf559a878a..16f2dca0ec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -78,6 +78,9 @@ jobs: swift-version: swift-${{ matrix.swift-version }}-release swift-build: ${{ matrix.swift-version }}-RELEASE build_arch: ${{ matrix.arch }} + - name: Enable long path support + run: | + reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 with: persist-credentials: false @@ -127,30 +130,67 @@ jobs: $commandJob = Start-Job -ScriptBlock { param([string]$Cmd, [string]$WorkDir) Set-Location $WorkDir - Invoke-Expression "$Cmd 2>&1" | ForEach-Object { Write-Output $_ } - return $LASTEXITCODE + + # Execute command and capture all output + $ErrorActionPreference = 'Continue' + Invoke-Expression $Cmd 2>&1 | ForEach-Object { + Write-Output $_ + } + + # Capture and return the exit code + $exitCode = $LASTEXITCODE + if ($null -eq $exitCode) { $exitCode = 0 } + + Write-Output "EXIT_CODE:$exitCode" } -ArgumentList $Command, $workDir.Path # Poll both jobs and show output as it comes while ($commandJob.State -eq 'Running') { - Receive-Job $monitorJob - Receive-Job $commandJob + $monitorOutput = Receive-Job $monitorJob + if ($monitorOutput) { + $monitorOutput | ForEach-Object { Write-Output $_ } + } + + $commandOutput = Receive-Job $commandJob + if ($commandOutput) { + $commandOutput | ForEach-Object { Write-Output $_ } + } + Start-Sleep -Milliseconds 500 } - # Get remaining output - Receive-Job $monitorJob - Receive-Job $commandJob + # Get all remaining output - critical for not truncating logs + Write-Output "`n=== Retrieving remaining monitor output ===" + $finalMonitorOutput = Receive-Job $monitorJob + if ($finalMonitorOutput) { + $finalMonitorOutput | ForEach-Object { Write-Output $_ } + } + + Write-Output "`n=== Retrieving remaining command output ===" + $finalCommandOutput = Receive-Job $commandJob -Wait + + # Extract exit code and output + $exitCode = 0 + if ($finalCommandOutput) { + foreach ($line in $finalCommandOutput) { + if ($line -match '^EXIT_CODE:(\d+)$') { + $exitCode = [int]$matches[1] + } else { + Write-Output $line + } + } + } # Clean up - Stop-Job $monitorJob - Remove-Job $monitorJob + Stop-Job $monitorJob -ErrorAction SilentlyContinue + Remove-Job $monitorJob -ErrorAction SilentlyContinue + Remove-Job $commandJob -ErrorAction SilentlyContinue - # Get command exit code - $exitCode = Receive-Job $commandJob -Keep - Remove-Job $commandJob + Write-Output "`n=== Command exited with code: $exitCode ===" - exit $exitCode + if ($exitCode -ne 0) { + exit $exitCode + } '@ $wrapperScript | Out-File -FilePath monitor-wrapper.ps1 -Encoding UTF8 - name: Build all targets From 48757508c18e16edeef4446e8c1111c9f5fcb4c4 Mon Sep 17 00:00:00 2001 From: Roman Lavrov Date: Mon, 1 Dec 2025 10:26:53 -0500 Subject: [PATCH 10/13] list tests and all tests --- .github/workflows/test.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 16f2dca0ec..b8ca609734 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -197,8 +197,14 @@ jobs: shell: powershell run: | .\monitor-wrapper.ps1 -Command "swift build --build-tests" + - name: List available tests + run: swift test list - name: Run selected tests shell: powershell run: | .\monitor-wrapper.ps1 -Command "swift test --skip IntegrationTests --skip FileSystemAccessTests" + - name: Run all tests + shell: powershell + run: | + .\monitor-wrapper.ps1 -Command "swift test" # To be extended with test execution and linting ... From fb17df3c1ba26417a4c37bde59930e6e60f5de19 Mon Sep 17 00:00:00 2001 From: Roman Lavrov Date: Mon, 1 Dec 2025 10:43:25 -0500 Subject: [PATCH 11/13] all and subset tests --- .github/workflows/test.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b8ca609734..e8ca49c307 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -203,7 +203,13 @@ jobs: shell: powershell run: | .\monitor-wrapper.ps1 -Command "swift test --skip IntegrationTests --skip FileSystemAccessTests" + - name: Run BuiltInRulesTests + if: always() + shell: powershell + run: | + .\monitor-wrapper.ps1 -Command "swift test --filter BuiltInRulesTests" - name: Run all tests + if: always() shell: powershell run: | .\monitor-wrapper.ps1 -Command "swift test" From da591b01b1e9242201af0f304bc522827bcfa023 Mon Sep 17 00:00:00 2001 From: Roman Lavrov Date: Mon, 1 Dec 2025 10:57:44 -0500 Subject: [PATCH 12/13] fix exit code, log disk --- .github/workflows/test.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e8ca49c307..679c395771 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -122,6 +122,17 @@ jobs: Write-Output "CPU Usage: $([math]::Round($cpu, 2))%" Write-Output "Memory: $usedGB GB / $totalGB GB" + # Disk Space + $disks = Get-CimInstance Win32_LogicalDisk -Filter "DriveType=3" | Where-Object { $_.Size -gt 0 } + if ($disks) { + Write-Output "Disk Space:" + $disks | ForEach-Object { + $freeGB = [math]::Round($_.FreeSpace / 1GB, 2) + $totalGB = [math]::Round($_.Size / 1GB, 2) + Write-Output " $($_.DeviceID) $freeGB GB / $totalGB GB" + } + } + Start-Sleep -Seconds 10 } } @@ -171,10 +182,14 @@ jobs: # Extract exit code and output $exitCode = 0 + $foundExitCode = $false if ($finalCommandOutput) { foreach ($line in $finalCommandOutput) { - if ($line -match '^EXIT_CODE:(\d+)$') { + $lineStr = $line.ToString().Trim() + if ($lineStr -match 'EXIT_CODE:(\d+)') { $exitCode = [int]$matches[1] + $foundExitCode = $true + Write-Output "=== Captured exit code: $exitCode ===" } else { Write-Output $line } @@ -186,6 +201,11 @@ jobs: Remove-Job $monitorJob -ErrorAction SilentlyContinue Remove-Job $commandJob -ErrorAction SilentlyContinue + if (-not $foundExitCode) { + Write-Output "=== WARNING: Could not find exit code in output, assuming failure ===" + $exitCode = 1 + } + Write-Output "`n=== Command exited with code: $exitCode ===" if ($exitCode -ne 0) { From b60e6883570a8eff63749dd6e7a3945b51edc3fa Mon Sep 17 00:00:00 2001 From: Roman Lavrov Date: Tue, 2 Dec 2025 09:38:10 -0500 Subject: [PATCH 13/13] dev toolchain --- .github/workflows/test.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 679c395771..1898873e8a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -62,7 +62,7 @@ jobs: run: make spm_test spm_windows: - name: SPM, Windows ${{ matrix.windows-display-name }}, Swift ${{ matrix.swift-version }} + name: SPM, Windows ${{ matrix.windows-display-name }}, Swift ${{ matrix.swift-build }} runs-on: windows-${{ matrix.windows-version }} strategy: fail-fast: false @@ -71,12 +71,13 @@ jobs: - windows-version: 2025 arch: amd64 windows-display-name: 'Server 2025' - swift-version: 6.2.1 + swift-version: development + swift-build: DEVELOPMENT-SNAPSHOT-2025-08-27-a steps: - uses: compnerd/gha-setup-swift@main with: - swift-version: swift-${{ matrix.swift-version }}-release - swift-build: ${{ matrix.swift-version }}-RELEASE + swift-version: ${{ matrix.swift-version }} + swift-build: ${{ matrix.swift-build }} build_arch: ${{ matrix.arch }} - name: Enable long path support run: | @@ -86,8 +87,8 @@ jobs: persist-credentials: false - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: - key: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}-${{ hashFiles('Package.resolved', 'Package.swift') }} - restore-keys: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}- + key: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}-${{ matrix.swift-build }}-${{ hashFiles('Package.resolved', 'Package.swift') }} + restore-keys: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}-${{ matrix.swift-build }}- path: .build - name: Create monitoring wrapper script shell: powershell