Skip to content

Commit 5896511

Browse files
author
Bryan Howard
committed
Fix Windows build artifact structure issue
**Root Cause:** Python runtime copy was potentially replacing the dist directory contents instead of creating a subdirectory. **Changes:** - Fix python_runtime copy to explicitly create subdirectory path - Add comprehensive debug output to track build directory structure - Verify dist directory exists before operations - Add error handling and directory listing for troubleshooting **Debug Info Added:** - Show build directory contents before and after operations - Display dist directory contents before renaming - Show final artifact contents before upload - Better error messages with directory listings This should resolve the issue where extracted artifacts only contained python_runtime folder instead of the complete application structure. 🤖 Generated with [Claude Code](https://claude.ai/code)
1 parent 3f5a250 commit 5896511

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

.github/workflows/windows-build.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,17 @@ jobs:
8787
shell: pwsh
8888
run: |
8989
$distDir = "NodeEditor_Build\PyFlowGraph.dist"
90-
Write-Host "Copying python_runtime to $distDir..."
91-
Copy-Item -Path "python_runtime" -Destination $distDir -Recurse -Force
90+
Write-Host "Copying python_runtime to $distDir as subdirectory..."
91+
92+
# Ensure we copy python_runtime as a subdirectory, not replace the contents
93+
if (Test-Path $distDir) {
94+
Copy-Item -Path "python_runtime" -Destination "$distDir\python_runtime" -Recurse -Force
95+
Write-Host "Python runtime copied successfully to $distDir\python_runtime"
96+
} else {
97+
Write-Error "Build directory not found: $distDir"
98+
Get-ChildItem "NodeEditor_Build" -ErrorAction SilentlyContinue
99+
exit 1
100+
}
92101
93102
- name: Prepare build artifact
94103
id: package
@@ -104,13 +113,21 @@ jobs:
104113
$build_dir = "NodeEditor_Build"
105114
$dist_dir = Join-Path $build_dir "PyFlowGraph.dist"
106115
107-
# Verify the directory exists
116+
# Debug: Show current build directory structure
117+
Write-Host "=== BUILD DIRECTORY STRUCTURE DEBUG ==="
118+
Write-Host "Build directory contents:"
119+
Get-ChildItem $build_dir -ErrorAction SilentlyContinue | Format-Table Name, Length, LastWriteTime
120+
121+
# Verify the directory exists and show its contents
108122
if (-not (Test-Path $dist_dir)) {
109123
Write-Error "Build directory not found: $dist_dir"
110-
Get-ChildItem $build_dir -ErrorAction SilentlyContinue
111124
exit 1
112125
}
113126
127+
Write-Host "Contents of $dist_dir (before renaming):"
128+
Get-ChildItem $dist_dir -ErrorAction SilentlyContinue | Format-Table Name, Length, LastWriteTime
129+
Write-Host "========================================"
130+
114131
$artifact_dir_name = "PyFlowGraph-Windows-$version"
115132
116133
Write-Host "Renaming $dist_dir to $artifact_dir_name for artifact upload"
@@ -119,6 +136,10 @@ jobs:
119136
$artifact_path = Join-Path $build_dir $artifact_dir_name
120137
Write-Host "Artifact prepared at: $artifact_path"
121138
139+
# Debug: Show final artifact contents
140+
Write-Host "Final artifact contents:"
141+
Get-ChildItem $artifact_path -ErrorAction SilentlyContinue | Format-Table Name, Length, LastWriteTime
142+
122143
echo "artifact_path=$artifact_path" >> $env:GITHUB_OUTPUT
123144
echo "artifact_name=$artifact_dir_name" >> $env:GITHUB_OUTPUT
124145
echo "version=$version" >> $env:GITHUB_OUTPUT

0 commit comments

Comments
 (0)