Skip to content

Commit e7e1b36

Browse files
committed
add windows tests and build
1 parent 0c68dc9 commit e7e1b36

File tree

3 files changed

+78
-11
lines changed

3 files changed

+78
-11
lines changed

.github/workflows/main.yml

Lines changed: 63 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,53 @@ jobs:
7979
export SKIP_SLOW_TESTS=1
8080
make test
8181
82+
test_windows_basic:
83+
name: Windows basic PHP 8.4
84+
runs-on: windows-latest
85+
steps:
86+
- name: Checkout code
87+
uses: actions/checkout@v4
88+
with:
89+
submodules: recursive
90+
fetch-depth: 0
91+
92+
- name: Force submodule update to latest main
93+
run: |
94+
echo "=== Current submodule status ==="
95+
git submodule status
96+
97+
echo "=== Forcing submodule update to latest main ==="
98+
git submodule update --init --recursive --remote
99+
100+
echo "=== Final submodule status ==="
101+
git submodule status
102+
103+
echo "=== Submodule commit info ==="
104+
cd lib
105+
git log --oneline -5
106+
cd ..
107+
shell: bash
108+
109+
- name: Verify submodule files
110+
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" }
120+
121+
- name: Build and test extension (PHP 8.4 NTS x86_64)
122+
uses: php/php-windows-builder/extension@v1
123+
with:
124+
php-version: '8.4'
125+
arch: 'x86_64'
126+
ts: 'nts'
127+
run-tests: true
128+
82129
get-windows-matrix:
83130
runs-on: ubuntu-latest
84131
outputs:
@@ -92,9 +139,9 @@ jobs:
92139
id: extension-matrix
93140
uses: php/php-windows-builder/extension-matrix@v1
94141

95-
test_windows:
142+
test_windows_all:
96143
name: Windows PHP ${{ matrix.php-version }} ${{ matrix.arch }} ${{ matrix.ts }}
97-
needs: get-windows-matrix
144+
needs: [test_windows_basic, get-windows-matrix]
98145
runs-on: ${{ matrix.os }}
99146
strategy:
100147
matrix: ${{fromJson(needs.get-windows-matrix.outputs.matrix)}}
@@ -103,13 +150,23 @@ jobs:
103150
uses: actions/checkout@v4
104151
with:
105152
submodules: recursive
153+
fetch-depth: 0
106154

107-
- name: Initialize submodules explicitly
155+
- name: Force submodule update to latest main
108156
run: |
109-
echo "=== Initializing submodules ==="
110-
git submodule update --init --recursive
111-
echo "=== Submodule status after init ==="
157+
echo "=== Current submodule status ==="
158+
git submodule status
159+
160+
echo "=== Forcing submodule update to latest main ==="
161+
git submodule update --init --recursive --remote
162+
163+
echo "=== Final submodule status ==="
112164
git submodule status
165+
166+
echo "=== Submodule commit info ==="
167+
cd lib
168+
git log --oneline -5
169+
cd ..
113170
shell: bash
114171

115172
- name: Verify submodule files

.github/workflows/release.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,23 @@ jobs:
180180
uses: actions/checkout@v4
181181
with:
182182
submodules: recursive
183+
fetch-depth: 0
183184

184-
- name: Initialize submodules explicitly
185+
- name: Force submodule update to latest main
185186
run: |
186-
echo "=== Initializing submodules ==="
187-
git submodule update --init --recursive
188-
echo "=== Submodule status after init ==="
187+
echo "=== Current submodule status ==="
189188
git submodule status
189+
190+
echo "=== Forcing submodule update to latest main ==="
191+
git submodule update --init --recursive --remote
192+
193+
echo "=== Final submodule status ==="
194+
git submodule status
195+
196+
echo "=== Submodule commit info ==="
197+
cd lib
198+
git log --oneline -5
199+
cd ..
190200
shell: bash
191201

192202
- name: Debug - Check repository structure

config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG_ENABLE("fastcsv", "enable FastCSV support", "no");
22

33
if (PHP_FASTCSV != "no") {
4-
EXTENSION("fastcsv", "fastcsv.c lib/arena.c lib/csv_config.c lib/csv_reader.c lib/csv_writer.c lib/csv_parser.c lib/csv_utils.c");
4+
EXTENSION("fastcsv", "fastcsv.c lib\\arena.c lib\\csv_config.c lib\\csv_reader.c lib\\csv_writer.c lib\\csv_parser.c lib\\csv_utils.c");
55
AC_DEFINE('HAVE_FASTCSV', 1, 'Have FastCSV support');
66
}

0 commit comments

Comments
 (0)