Skip to content

Commit 5c72029

Browse files
committed
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0: Migrate MSAN build to GitHub actions
2 parents 9820098 + 9377c30 commit 5c72029

File tree

3 files changed

+93
-7
lines changed

3 files changed

+93
-7
lines changed

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

+1-1
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

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

azure-pipelines.yml

-6
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ jobs:
4444
parameters:
4545
configurationName: I386_RELEASE_ZTS
4646
configurationParameters: '--disable-debug --enable-zts'
47-
- template: azure/msan_job.yml
48-
parameters:
49-
configurationName: DEBUG_ZTS_MSAN
50-
configurationParameters: '--enable-debug --enable-zts'
51-
runTestsParameters: --msan
52-
timeoutInMinutes: 90
5347
- template: azure/job.yml
5448
parameters:
5549
configurationName: DEBUG_NTS_REPEAT

0 commit comments

Comments
 (0)