File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -182,14 +182,13 @@ jobs:
182182 output-dir : dist
183183 config-file : cibuildwheel.toml
184184
185- # Running in a minimal Docker image makes sure that we bundled correctly
186- # the shared libraries for MSVC C++ runtime and OpenMP in the Windows
187- # wheel
188185 - name : Test Windows wheel in a minimal Docker image
189186 # Currently Windows ARM64 runners do not have Docker support and there
190187 # is no Docker image with free-threaded
191188 if : ${{ matrix.platform_id == 'win_amd64' && !contains(matrix.python, 't') }}
192- run : bash tools/test_windows_wheels_in_docker.sh ${{ matrix.python }}
189+ run : |
190+ pwsh tools/wait-for-docker-windows.ps1
191+ bash tools/test_windows_wheels_in_docker.sh ${{ matrix.python }}
193192
194193 - name : Store artifacts
195194 uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
Original file line number Diff line number Diff line change 1+ # !/usr/bin/env pwsh
2+
3+ # Script to wait for Docker to be ready taken from https://github.com/spiffe/spire project
4+
5+ Write-Host " Waiting for Docker to be ready..."
6+
7+ for ($i = 1 ; $i -le 60 ; $i ++ ) {
8+ # Check if Docker is ready
9+ $output = docker info 2>&1
10+ if ($LASTEXITCODE -eq 0 ) {
11+ Write-Host " Docker is ready!"
12+ exit 0
13+ }
14+
15+ # On first attempt, list and start Docker services
16+ if ($i -eq 1 ) {
17+ Write-Host " Docker not ready. Checking for Docker services..."
18+ $dockerServices = Get-Service | Where-Object { $_.Name -like ' *docker*' -or $_.DisplayName -like ' *docker*' }
19+
20+ if ($dockerServices ) {
21+ Write-Host " Available Docker services:"
22+ $dockerServices | Format-Table Name, Status, DisplayName - AutoSize
23+
24+ # Start any stopped Docker services
25+ $dockerServices | Where-Object { $_.Status -ne ' Running' } | ForEach-Object {
26+ Write-Host " Starting service: $ ( $_.Name ) "
27+ Start-Service $_.Name - ErrorAction SilentlyContinue
28+ }
29+ } else {
30+ Write-Error " No Docker services found. Please ensure Docker is installed and configured correctly."
31+ exit 1
32+ }
33+ }
34+
35+ # Show progress (detailed every 10 attempts)
36+ if ($i % 10 -eq 0 ) {
37+ Write-Host " Attempt $i /60 - Still waiting... Error: $output "
38+ } else {
39+ Write-Host " Attempt $i /60"
40+ }
41+ Start-Sleep - Seconds 2
42+ }
43+
44+ Write-Error " Docker failed to start after 60 attempts"
45+ exit 1
You can’t perform that action at this time.
0 commit comments