Skip to content

Commit e1fc098

Browse files
committed
* fixes FreeBSD
1 parent 4439bad commit e1fc098

File tree

2 files changed

+76
-34
lines changed

2 files changed

+76
-34
lines changed

.github/workflows/build-freebsd.yml

Lines changed: 74 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
usesh: true
4040
copyback: false
4141
prepare: |
42-
cd $GITHUB_WORKSPACE/php-src
42+
cd $GITHUB_WORKSPACE
4343
4444
# Load kernel modules
4545
kldload accf_http
@@ -70,12 +70,7 @@ jobs:
7070
curl \
7171
cmake
7272
73-
# Check LibUV version and build from source if needed
74-
echo "=== Checking LibUV version ==="
75-
LIBUV_VERSION=$(pkg search -q libuv | head -1 | cut -d- -f2)
76-
echo "Available LibUV package version: $LIBUV_VERSION"
77-
78-
# FreeBSD usually has newer LibUV, but let's build from source to be sure
73+
# Build LibUV from source (need >= 1.44.0)
7974
echo "=== Building LibUV from source ==="
8075
fetch https://github.com/libuv/libuv/archive/v1.48.0.tar.gz
8176
tar -xzf v1.48.0.tar.gz
@@ -95,7 +90,11 @@ jobs:
9590
sysctl hw.model hw.ncpu hw.physmem
9691
echo "LibUV version (built from source): 1.48.0"
9792
93+
run: |
94+
cd $GITHUB_WORKSPACE
95+
9896
# Configure PHP with async extension
97+
cd php-src
9998
./buildconf -f
10099
./configure \
101100
--prefix=/usr/local \
@@ -147,13 +146,8 @@ jobs:
147146
# Install PHP
148147
echo "=== Installing PHP ==="
149148
mkdir -p /etc/php.d
150-
gmake install > /dev/null
149+
gmake install
151150
echo "opcache.enable_cli=1" > /etc/php.d/opcache.ini
152-
echo "opcache.protect_memory=1" >> /etc/php.d/opcache.ini
153-
echo "opcache.preload_user=root" >> /etc/php.d/opcache.ini
154-
155-
run: |
156-
cd $GITHUB_WORKSPACE/php-src
157151
158152
# Test environment setup
159153
export SKIP_IO_CAPTURE_TESTS=1
@@ -163,56 +157,104 @@ jobs:
163157
echo "=== PHP Version ==="
164158
/usr/local/bin/php -v
165159
166-
echo "=== Running Basic Async Tests ==="
167-
/usr/local/bin/php run-tests.php \
160+
- name: Run basic tests
161+
uses: vmactions/freebsd-vm@v1
162+
with:
163+
release: '13.3'
164+
usesh: true
165+
copyback: false
166+
run: |
167+
cd $GITHUB_WORKSPACE/php-src/ext/async
168+
169+
export SKIP_IO_CAPTURE_TESTS=1
170+
export CI_NO_IPV6=1
171+
export STACK_LIMIT_DEFAULTS_CHECK=1
172+
173+
/usr/local/bin/php ../../run-tests.php \
168174
-P -q -j2 \
169175
-g FAIL,BORK,LEAK,XLEAK \
170176
--no-progress \
171177
--offline \
172178
--show-diff \
173179
--show-slow 4000 \
174180
--set-timeout 120 \
175-
ext/async/tests
181+
.
176182
177-
echo "=== Running Async Tests with OpCache ==="
178-
/usr/local/bin/php run-tests.php \
183+
- name: Test OpCache
184+
uses: vmactions/freebsd-vm@v1
185+
with:
186+
release: '13.3'
187+
usesh: true
188+
copyback: false
189+
run: |
190+
cd $GITHUB_WORKSPACE/php-src/ext/async
191+
192+
export SKIP_IO_CAPTURE_TESTS=1
193+
export CI_NO_IPV6=1
194+
export STACK_LIMIT_DEFAULTS_CHECK=1
195+
196+
/usr/local/bin/php ../../run-tests.php \
197+
-d zend_extension=opcache.so \
198+
-d opcache.enable_cli=1 \
179199
-P -q -j2 \
180200
-g FAIL,BORK,LEAK,XLEAK \
181201
--no-progress \
182202
--offline \
183203
--show-diff \
184204
--show-slow 4000 \
185205
--set-timeout 120 \
206+
.
207+
208+
- name: Test Tracing JIT
209+
uses: vmactions/freebsd-vm@v1
210+
with:
211+
release: '13.3'
212+
usesh: true
213+
copyback: false
214+
run: |
215+
cd $GITHUB_WORKSPACE/php-src/ext/async
216+
217+
export SKIP_IO_CAPTURE_TESTS=1
218+
export CI_NO_IPV6=1
219+
export STACK_LIMIT_DEFAULTS_CHECK=1
220+
221+
/usr/local/bin/php ../../run-tests.php \
186222
-d zend_extension=opcache.so \
187223
-d opcache.enable_cli=1 \
188-
ext/async/tests
189-
190-
echo "=== Running Async Tests with JIT Tracing ==="
191-
/usr/local/bin/php run-tests.php \
224+
-d opcache.jit_buffer_size=64M \
225+
-d opcache.jit=tracing \
192226
-P -q -j2 \
193227
-g FAIL,BORK,LEAK,XLEAK \
194228
--no-progress \
195229
--offline \
196230
--show-diff \
197231
--show-slow 4000 \
198232
--set-timeout 120 \
233+
.
234+
235+
- name: Test Function JIT
236+
uses: vmactions/freebsd-vm@v1
237+
with:
238+
release: '13.3'
239+
usesh: true
240+
copyback: false
241+
run: |
242+
cd $GITHUB_WORKSPACE/php-src/ext/async
243+
244+
export SKIP_IO_CAPTURE_TESTS=1
245+
export CI_NO_IPV6=1
246+
export STACK_LIMIT_DEFAULTS_CHECK=1
247+
248+
/usr/local/bin/php ../../run-tests.php \
199249
-d zend_extension=opcache.so \
200250
-d opcache.enable_cli=1 \
201251
-d opcache.jit_buffer_size=64M \
202-
-d opcache.jit=tracing \
203-
ext/async/tests
204-
205-
echo "=== Running Async Tests with JIT Function ==="
206-
/usr/local/bin/php run-tests.php \
252+
-d opcache.jit=function \
207253
-P -q -j2 \
208254
-g FAIL,BORK,LEAK,XLEAK \
209255
--no-progress \
210256
--offline \
211257
--show-diff \
212258
--show-slow 4000 \
213259
--set-timeout 120 \
214-
-d zend_extension=opcache.so \
215-
-d opcache.enable_cli=1 \
216-
-d opcache.jit_buffer_size=64M \
217-
-d opcache.jit=function \
218-
ext/async/tests
260+
.

.github/workflows/build-linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: True Async Linux x64 Build
22

33
on:
44
push:
5-
branches: [build]
5+
branches: [xbuild]
66
pull_request:
7-
branches: [build]
7+
branches: [xbuild]
88

99
jobs:
1010
build-linux-x64:

0 commit comments

Comments
 (0)