Skip to content

Commit 86f2cd4

Browse files
committed
ci: fix runner labels and windows installer smoke stability
Use intel macOS runner label, make Windows smoke server startup robust, and improve cross-platform reliability for CI and release workflows.
1 parent ec191d2 commit 86f2cd4

3 files changed

Lines changed: 38 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- label: linux-arm64
2020
runner: ubuntu-24.04-arm
2121
- label: macos-x64
22-
runner: macos-13
22+
runner: macos-15-intel
2323
- label: macos-arm64
2424
runner: macos-latest
2525
- label: windows-x64

.github/workflows/installer-smoke.yml

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- label: linux-arm64
2121
runner: ubuntu-24.04-arm
2222
- label: macos-x64
23-
runner: macos-13
23+
runner: macos-15-intel
2424
- label: macos-arm64
2525
runner: macos-latest
2626
- label: windows-x64
@@ -114,12 +114,44 @@ jobs:
114114
if: runner.os == 'Windows'
115115
shell: pwsh
116116
run: |
117-
$port = 18080
117+
$port = Get-Random -Minimum 18080 -Maximum 19000
118118
$serveRoot = Join-Path $env:RUNNER_TEMP "serve"
119119
$stdoutLog = Join-Path $env:RUNNER_TEMP "http-out.log"
120120
$stderrLog = Join-Path $env:RUNNER_TEMP "http-err.log"
121-
$server = Start-Process -FilePath python -ArgumentList "-m","http.server",$port,"--directory",$serveRoot -RedirectStandardOutput $stdoutLog -RedirectStandardError $stderrLog -PassThru
122-
Start-Sleep -Seconds 2
121+
122+
$pythonCmd = if (Get-Command python -ErrorAction SilentlyContinue) {
123+
"python"
124+
} elseif (Get-Command py -ErrorAction SilentlyContinue) {
125+
"py"
126+
} else {
127+
throw "Python is required to run installer smoke tests on Windows runners."
128+
}
129+
130+
$pythonArgs = if ($pythonCmd -eq "py") {
131+
@("-3", "-m", "http.server", $port, "--directory", $serveRoot)
132+
} else {
133+
@("-m", "http.server", $port, "--directory", $serveRoot)
134+
}
135+
136+
$server = Start-Process -FilePath $pythonCmd -ArgumentList $pythonArgs -RedirectStandardOutput $stdoutLog -RedirectStandardError $stderrLog -PassThru
137+
138+
$ready = $false
139+
for ($i = 0; $i -lt 30; $i++) {
140+
try {
141+
Invoke-WebRequest -Uri "http://127.0.0.1:$port/tool/install.ps1" -UseBasicParsing -TimeoutSec 2 | Out-Null
142+
$ready = $true
143+
break
144+
}
145+
catch {
146+
Start-Sleep -Seconds 1
147+
}
148+
}
149+
if (-not $ready) {
150+
if (Test-Path $stderrLog) {
151+
Get-Content $stderrLog
152+
}
153+
throw "Local HTTP server did not become ready on port $port."
154+
}
123155
124156
try {
125157
$env:DRX_REPO = "example/drx"

.github/workflows/release-binaries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- label: linux-arm64
2828
runner: ubuntu-24.04-arm
2929
- label: macos-x64
30-
runner: macos-13
30+
runner: macos-15-intel
3131
- label: macos-arm64
3232
runner: macos-latest
3333
- label: windows-x64

0 commit comments

Comments
 (0)