@@ -106,17 +106,20 @@ jobs:
106106 cd ..
107107 shell : bash
108108
109- - name : Verify submodule files
109+ - name : Copy lib files to root for Windows build
110110 run : |
111- echo "Checking if lib directory and files exist:"
112- dir lib\
113- echo "Checking specific source files:"
114- if (Test-Path "lib\arena.c") { echo "arena.c exists" } else { echo "arena.c missing" }
115- if (Test-Path "lib\csv_config.c") { echo "csv_config.c exists" } else { echo "csv_config.c missing" }
116- if (Test-Path "lib\csv_reader.c") { echo "csv_reader.c exists" } else { echo "csv_reader.c missing" }
117- if (Test-Path "lib\csv_writer.c") { echo "csv_writer.c exists" } else { echo "csv_writer.c missing" }
118- if (Test-Path "lib\csv_parser.c") { echo "csv_parser.c exists" } else { echo "csv_parser.c missing" }
119- if (Test-Path "lib\csv_utils.c") { echo "csv_utils.c exists" } else { echo "csv_utils.c missing" }
111+ echo "=== Copying lib files to root directory ==="
112+ if (Test-Path "lib") {
113+ echo "lib directory found, copying files..."
114+ Copy-Item -Path "lib\*.c" -Destination "." -Force
115+ Copy-Item -Path "lib\*.h" -Destination "." -Force
116+ echo "Files copied. Root directory now contains:"
117+ dir *.c
118+ dir *.h
119+ } else {
120+ echo "ERROR: lib directory not found!"
121+ exit 1
122+ }
120123
121124 - name : Build and test extension (PHP 8.4 NTS x64)
122125 uses : php/php-windows-builder/extension@v1
@@ -169,17 +172,20 @@ jobs:
169172 cd ..
170173 shell : bash
171174
172- - name : Verify submodule files
175+ - name : Copy lib files to root for Windows build
173176 run : |
174- echo "Checking if lib directory and files exist:"
175- dir lib\
176- echo "Checking specific source files:"
177- if (Test-Path "lib\arena.c") { echo "arena.c exists" } else { echo "arena.c missing" }
178- if (Test-Path "lib\csv_config.c") { echo "csv_config.c exists" } else { echo "csv_config.c missing" }
179- if (Test-Path "lib\csv_reader.c") { echo "csv_reader.c exists" } else { echo "csv_reader.c missing" }
180- if (Test-Path "lib\csv_writer.c") { echo "csv_writer.c exists" } else { echo "csv_writer.c missing" }
181- if (Test-Path "lib\csv_parser.c") { echo "csv_parser.c exists" } else { echo "csv_parser.c missing" }
182- if (Test-Path "lib\csv_utils.c") { echo "csv_utils.c exists" } else { echo "csv_utils.c missing" }
177+ echo "=== Copying lib files to root directory ==="
178+ if (Test-Path "lib") {
179+ echo "lib directory found, copying files..."
180+ Copy-Item -Path "lib\*.c" -Destination "." -Force
181+ Copy-Item -Path "lib\*.h" -Destination "." -Force
182+ echo "Files copied. Root directory now contains:"
183+ dir *.c
184+ dir *.h
185+ } else {
186+ echo "ERROR: lib directory not found!"
187+ exit 1
188+ }
183189
184190 - name : Build and test extension
185191 uses : php/php-windows-builder/extension@v1
0 commit comments