Skip to content

Commit a107266

Browse files
committed
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1: Migrate MSAN build to GitHub actions
2 parents b1e112f + 5c72029 commit a107266

File tree

3 files changed

+93
-7
lines changed

3 files changed

+93
-7
lines changed

.github/actions/apt-x64/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ runs:
1818
libgmp-dev \
1919
libicu-dev \
2020
libtidy-dev \
21-
libenchant-dev \
21+
libenchant-2-dev \
2222
libaspell-dev \
2323
libpspell-dev \
2424
libsasl2-dev \

.github/workflows/nightly.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,3 +369,95 @@ jobs:
369369
-d opcache.file_cache_only=1
370370
- name: Verify generated files are up to date
371371
uses: ./.github/actions/verify-generated-files
372+
MSAN:
373+
needs: GENERATE_MATRIX
374+
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
375+
strategy:
376+
fail-fast: false
377+
matrix:
378+
branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
379+
name: "${{ matrix.branch.name }}_MSAN"
380+
runs-on: ubuntu-22.04
381+
steps:
382+
- name: git checkout
383+
uses: actions/checkout@v2
384+
with:
385+
ref: ${{ matrix.branch.ref }}
386+
- name: apt
387+
uses: ./.github/actions/apt-x64
388+
- name: ./configure
389+
run: |
390+
export CC=clang
391+
export CXX=clang++
392+
export CFLAGS="-DZEND_TRACK_ARENA_ALLOC"
393+
./buildconf --force
394+
# msan requires all used libraries to be instrumented,
395+
# so we should avoiding linking against anything but libc here
396+
./configure \
397+
--enable-debug \
398+
--enable-zts \
399+
--enable-option-checking=fatal \
400+
--prefix=/usr \
401+
--without-sqlite3 \
402+
--without-pdo-sqlite \
403+
--without-libxml \
404+
--disable-dom \
405+
--disable-simplexml \
406+
--disable-xml \
407+
--disable-xmlreader \
408+
--disable-xmlwriter \
409+
--without-pcre-jit \
410+
--disable-opcache-jit \
411+
--enable-phpdbg \
412+
--enable-fpm \
413+
--with-pdo-mysql=mysqlnd \
414+
--with-mysqli=mysqlnd \
415+
--disable-mysqlnd-compression-support \
416+
--without-pear \
417+
--enable-exif \
418+
--enable-sysvsem \
419+
--enable-sysvshm \
420+
--enable-shmop \
421+
--enable-pcntl \
422+
--enable-mbstring \
423+
--disable-mbregex \
424+
--enable-sockets \
425+
--enable-bcmath \
426+
--enable-calendar \
427+
--enable-ftp \
428+
--enable-zend-test \
429+
--enable-werror \
430+
--enable-memory-sanitizer \
431+
--with-config-file-path=/etc \
432+
--with-config-file-scan-dir=/etc/php.d
433+
- name: make
434+
run: make -j$(/usr/bin/nproc) >/dev/null
435+
- name: make install
436+
run: |
437+
sudo make install
438+
sudo mkdir /etc/php.d
439+
sudo chmod 777 /etc/php.d
440+
echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini
441+
echo pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/pdo_mysql.ini
442+
- name: Setup
443+
run: |
444+
set -x
445+
sudo service mysql start
446+
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
447+
# Ensure local_infile tests can run.
448+
mysql -uroot -proot -e "SET GLOBAL local_infile = true"
449+
sudo locale-gen de_DE
450+
- name: Test
451+
uses: ./.github/actions/test-linux
452+
with:
453+
runTestsParameters: >-
454+
--msan
455+
- name: Test Opcache
456+
uses: ./.github/actions/test-linux
457+
with:
458+
runTestsParameters: >-
459+
--msan
460+
-d zend_extension=opcache.so
461+
-d opcache.enable_cli=1
462+
- name: Verify generated files are up to date
463+
uses: ./.github/actions/verify-generated-files

azure-pipelines.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@ jobs:
4646
parameters:
4747
configurationName: I386_RELEASE_ZTS
4848
configurationParameters: '--disable-debug --enable-zts'
49-
- template: azure/msan_job.yml
50-
parameters:
51-
configurationName: DEBUG_ZTS_MSAN
52-
configurationParameters: '--enable-debug --enable-zts'
53-
runTestsParameters: --msan
54-
timeoutInMinutes: 90
5549
- template: azure/job.yml
5650
parameters:
5751
configurationName: DEBUG_NTS_REPEAT

0 commit comments

Comments
 (0)