Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,13 @@ jobs:
output-dir: dist
config-file: cibuildwheel.toml

# Running in a minimal Docker image makes sure that we bundled correctly
# the shared libraries for MSVC C++ runtime and OpenMP in the Windows
# wheel
- name: Test Windows wheel in a minimal Docker image
# Currently Windows ARM64 runners do not have Docker support and there
# is no Docker image with free-threaded
if: ${{ matrix.platform_id == 'win_amd64' && !contains(matrix.python, 't') }}
run: bash tools/test_windows_wheels_in_docker.sh ${{ matrix.python }}
run: |
pwsh tools/wait-for-docker-windows.ps1
bash tools/test_windows_wheels_in_docker.sh ${{ matrix.python }}

- name: Store artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
Expand Down
45 changes: 45 additions & 0 deletions tools/wait-for-docker-windows.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/usr/bin/env pwsh

# Script to wait for Docker to be ready taken from https://github.com/spiffe/spire project

Write-Host "Waiting for Docker to be ready..."

for ($i = 1; $i -le 60; $i++) {
# Check if Docker is ready
$output = docker info 2>&1
if ($LASTEXITCODE -eq 0) {
Write-Host "Docker is ready!"
exit 0
}

# On first attempt, list and start Docker services
if ($i -eq 1) {
Write-Host "Docker not ready. Checking for Docker services..."
$dockerServices = Get-Service | Where-Object { $_.Name -like '*docker*' -or $_.DisplayName -like '*docker*' }

if ($dockerServices) {
Write-Host "Available Docker services:"
$dockerServices | Format-Table Name, Status, DisplayName -AutoSize

# Start any stopped Docker services
$dockerServices | Where-Object { $_.Status -ne 'Running' } | ForEach-Object {
Write-Host "Starting service: $($_.Name)"
Start-Service $_.Name -ErrorAction SilentlyContinue
}
} else {
Write-Error "No Docker services found. Please ensure Docker is installed and configured correctly."
exit 1
}
}

# Show progress (detailed every 10 attempts)
if ($i % 10 -eq 0) {
Write-Host "Attempt $i/60 - Still waiting... Error: $output"
} else {
Write-Host "Attempt $i/60"
}
Start-Sleep -Seconds 2
}

Write-Error "Docker failed to start after 60 attempts"
exit 1
Loading