Skip to content

Commit dc76130

Browse files
committed
WIP: debug
1 parent 1892dbf commit dc76130

File tree

1 file changed

+20
-235
lines changed

1 file changed

+20
-235
lines changed

.github/workflows/push.yml

Lines changed: 20 additions & 235 deletions
Original file line numberDiff line numberDiff line change
@@ -74,239 +74,24 @@ jobs:
7474
uses: ./.github/actions/install-linux
7575
- name: Setup
7676
uses: ./.github/actions/setup-x64
77-
- name: Test
78-
uses: ./.github/actions/test-linux
79-
with:
80-
testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}
81-
- name: Test Tracing JIT
82-
uses: ./.github/actions/test-linux
83-
with:
84-
testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Tracing JIT
85-
runTestsParameters: >-
86-
-d zend_extension=opcache.so
87-
-d opcache.enable_cli=1
88-
-d opcache.jit_buffer_size=16M
89-
- name: Verify generated files are up to date
90-
uses: ./.github/actions/verify-generated-files
91-
LINUX_X32:
92-
name: LINUX_X32_DEBUG_ZTS
93-
runs-on: ubuntu-latest
94-
container:
95-
image: ubuntu:22.04
96-
env:
97-
MYSQL_TEST_HOST: mysql
98-
PDO_MYSQL_TEST_DSN: mysql:host=mysql;dbname=test
99-
PDO_MYSQL_TEST_HOST: mysql
100-
services:
101-
mysql:
102-
image: mysql:8
103-
ports:
104-
- 3306:3306
105-
env:
106-
MYSQL_DATABASE: test
107-
MYSQL_ROOT_PASSWORD: root
108-
steps:
109-
- name: git checkout
110-
uses: actions/checkout@v3
111-
- name: apt
112-
uses: ./.github/actions/apt-x32
113-
- name: ccache
114-
uses: hendrikmuhs/[email protected]
115-
with:
116-
key: "${{github.job}}-${{hashFiles('main/php_version.h')}}"
117-
append-timestamp: false
118-
- name: ./configure
119-
uses: ./.github/actions/configure-x32
120-
with:
121-
configurationParameters: >-
122-
--enable-debug
123-
--enable-zts
124-
- name: make
125-
run: make -j$(/usr/bin/nproc) >/dev/null
126-
- name: make install
127-
uses: ./.github/actions/install-linux-x32
128-
- name: Test
129-
uses: ./.github/actions/test-linux
130-
- name: Test Tracing JIT
131-
uses: ./.github/actions/test-linux
132-
with:
133-
runTestsParameters: >-
134-
-d zend_extension=opcache.so
135-
-d opcache.enable_cli=1
136-
-d opcache.jit_buffer_size=16M
137-
MACOS_DEBUG_NTS:
138-
runs-on: macos-11
139-
steps:
140-
- name: git checkout
141-
uses: actions/checkout@v3
142-
- name: brew
143-
uses: ./.github/actions/brew
144-
- name: ccache
145-
uses: hendrikmuhs/[email protected]
146-
with:
147-
key: "${{github.job}}-${{hashFiles('main/php_version.h')}}"
148-
append-timestamp: false
149-
- name: ./configure
150-
uses: ./.github/actions/configure-macos
151-
with:
152-
configurationParameters: --enable-debug --disable-zts
153-
- name: make
154-
run: |-
155-
export PATH="/usr/local/opt/bison/bin:$PATH"
156-
make -j$(sysctl -n hw.logicalcpu) >/dev/null
157-
- name: make install
158-
run: sudo make install
159-
- name: Test
160-
uses: ./.github/actions/test-macos
161-
with:
162-
testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}
163-
- name: Test Tracing JIT
164-
uses: ./.github/actions/test-macos
165-
with:
166-
testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Tracing JIT
167-
runTestsParameters: >-
168-
-d zend_extension=opcache.so
169-
-d opcache.enable_cli=1
170-
-d opcache.protect_memory=1
171-
-d opcache.jit_buffer_size=16M
172-
- name: Verify generated files are up to date
173-
uses: ./.github/actions/verify-generated-files
174-
WINDOWS:
175-
strategy:
176-
fail-fast: false
177-
matrix:
178-
include:
179-
- x64: true
180-
zts: false
181-
opcache: true
182-
- x64: false
183-
zts: true
184-
opcache: false
185-
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
186-
runs-on: windows-2019
187-
env:
188-
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
189-
PHP_BUILD_OBJ_DIR: C:\obj
190-
PHP_BUILD_CACHE_SDK_DIR: C:\build-cache\sdk
191-
PHP_BUILD_SDK_BRANCH: php-sdk-2.2.0
192-
PHP_BUILD_CRT: vs16
193-
PLATFORM: ${{ matrix.x64 && 'x64' || 'x86' }}
194-
THREAD_SAFE: "${{ matrix.zts && '1' || '0' }}"
195-
INTRINSICS: "${{ matrix.zts && 'AVX2' || '' }}"
196-
PARALLEL: -j2
197-
OPCACHE: "${{ matrix.opcache && '1' || '0' }}"
198-
steps:
199-
- name: git config
200-
run: git config --global core.autocrlf false && git config --global core.eol lf
201-
- name: git checkout
202-
uses: actions/checkout@v3
203-
- name: Setup MySQL
204-
run: |
205-
choco install mysql -y --no-progress --params="/port:3306"
206-
mysql.exe --port=3306 --user=root --password="" -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'Password12!'; FLUSH PRIVILEGES;"
207-
- name: Setup MSSQL
208-
run: |
209-
choco install sql-server-express -y --no-progress --install-arguments="/SECURITYMODE=SQL /SAPWD=Password12!"
210-
- name: Setup PostgreSQL
211-
run: |
212-
Set-Service -Name "postgresql-x64-14" -StartupType manual -Status Running
213-
pwsh -Command { $env:PGPASSWORD="root"; & "$env:PGBIN\psql" -U postgres -c "ALTER USER postgres WITH PASSWORD 'Password12!';" }
214-
- name: Build
215-
run: .github/scripts/windows/build.bat
216-
- name: Test
217-
run: .github/scripts/windows/test.bat
218-
BENCHMARKING:
219-
name: BENCHMARKING
220-
if: github.repository_owner == 'php' || github.event_name == 'pull_request'
221-
runs-on: ubuntu-22.04
222-
steps:
223-
- name: git checkout
224-
uses: actions/checkout@v3
225-
with:
226-
fetch-depth: 0
227-
- name: apt
228-
run: |
229-
set -x
230-
sudo apt-get update
231-
sudo apt-get install \
232-
bison \
233-
libgmp-dev \
234-
libonig-dev \
235-
libsqlite3-dev \
236-
openssl \
237-
re2c \
238-
valgrind
239-
- name: ccache
240-
uses: hendrikmuhs/[email protected]
241-
with:
242-
key: "${{github.job}}-${{hashFiles('main/php_version.h')}}"
243-
append-timestamp: false
244-
- name: ./configure
245-
run: |
246-
set -x
247-
./buildconf --force
248-
./configure \
249-
--disable-debug \
250-
--enable-mbstring \
251-
--enable-opcache \
252-
--enable-option-checking=fatal \
253-
--enable-sockets \
254-
--enable-werror \
255-
--prefix=/usr \
256-
--with-config-file-scan-dir=/etc/php.d \
257-
--with-gmp \
258-
--with-mysqli=mysqlnd \
259-
--with-openssl \
260-
--with-pdo-sqlite \
261-
--with-valgrind
262-
- name: make
263-
run: make -j$(/usr/bin/nproc) >/dev/null
264-
- name: make install
265-
run: |
266-
set -x
267-
sudo make install
268-
sudo mkdir -p /etc/php.d
269-
sudo chmod 777 /etc/php.d
270-
echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini
271-
echo zend_extension=opcache.so >> /etc/php.d/opcache.ini
272-
echo opcache.enable=1 >> /etc/php.d/opcache.ini
273-
echo opcache.enable_cli=1 >> /etc/php.d/opcache.ini
274-
- name: Setup
275-
run: |
276-
git config --global user.name "Benchmark"
277-
git config --global user.email "[email protected]"
278-
sudo service mysql start
279-
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS wordpress"
280-
mysql -uroot -proot -e "CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'wordpress'; FLUSH PRIVILEGES;"
281-
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON *.* TO 'wordpress'@'localhost' WITH GRANT OPTION;"
282-
- name: git checkout benchmarking-data
283-
uses: actions/checkout@v3
284-
with:
285-
repository: php/benchmarking-data
286-
ssh-key: ${{ secrets.BENCHMARKING_DATA_DEPLOY_KEY }}
287-
path: benchmark/repos/data
288-
- name: Benchmark
289-
run: php benchmark/benchmark.php true
290-
- name: Store result
291-
if: github.event_name == 'push'
77+
- name: Test Drupal
29278
run: |
293-
set -x
294-
cd benchmark/repos/data
295-
git pull --autostash
296-
if [ -e ".git/MERGE_HEAD" ]; then
297-
echo "Merging, can't proceed"
298-
exit 1
299-
fi
300-
git add .
301-
if git diff --cached --quiet; then
302-
exit 0
303-
fi
304-
git commit -m "Add result for ${{ github.repository }}@${{ github.sha }}"
305-
git push
306-
- name: Show diff
307-
if: github.event_name == 'pull_request'
308-
run: |-
309-
php benchmark/generate_diff.php \
310-
${{ github.sha }} \
311-
$(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.sha }}) \
312-
> $GITHUB_STEP_SUMMARY
79+
php -i|grep memory_limit
80+
echo memory_limit=256M > /etc/php.d/drupal.ini
81+
git clone https://git.drupalcode.org/project/drupal.git drupal --branch=11.x --depth=1
82+
cd drupal
83+
git rev-parse HEAD
84+
php /usr/bin/composer install --no-progress --ignore-platform-reqs
85+
export ASAN_OPTIONS=exitcode=139
86+
export SIMPLETEST_BASE_URL=http://localhost:8888/
87+
export SIMPLETEST_DB=sqlite://localhost/db/sqlite1
88+
mkdir db
89+
rm -f core/tests/Drupal/FunctionalTests/ExistingDrupal8StyleDatabaseConnectionInSettingsPhpTest.php
90+
export DRUPAL_TYPES=Annotation,Assertion,ClassFinder,Drupal,Extension,File,Plugin,Render,tar,zip
91+
php -dzend.assertions=1 vendor/bin/phpunit -c core/phpunit.xml.dist --testsuite unit,kernel --group $DRUPAL_TYPES || EXIT_CODE=$?
92+
[ ${EXIT_CODE:-0} -gt 128 ] && exit 1
93+
php -dzend.assertions=1 vendor/bin/phpunit -c core/phpunit.xml.dist --testsuite unit,kernel --group Database || EXIT_CODE=$?
94+
[ ${EXIT_CODE:-0} -gt 128 ] && exit 1
95+
export SIMPLETEST_DB=mysql://root:root@localhost/test
96+
php -dzend.assertions=1 vendor/bin/phpunit -c core/phpunit.xml.dist --testsuite unit,kernel --group Database || EXIT_CODE=$?
97+
[ ${EXIT_CODE:-0} -gt 128 ] && exit 1 || exit 0

0 commit comments

Comments
 (0)