Skip to content

Commit 7a09004

Browse files
committed
Move ASAN built to GitHub actions
Cirrus will no longer offer unlimited free builds starting next month. We don't have an alternative for FreeBSD and ARM, so move what we can for now.
1 parent 7397607 commit 7a09004

File tree

4 files changed

+28
-188
lines changed

4 files changed

+28
-188
lines changed

.cirrus.yml

Lines changed: 0 additions & 180 deletions
Original file line numberDiff line numberDiff line change
@@ -1,186 +1,6 @@
11
env:
22
CIRRUS_CLONE_DEPTH: 1
33

4-
asan_task:
5-
name: ASAN_DEBUG_NTS
6-
container:
7-
image: gcc:latest
8-
additional_containers:
9-
- name: mysql
10-
image: mysql:8
11-
port: 3306
12-
cpu: 1.0
13-
memory: 1G
14-
env:
15-
MYSQL_ROOT_PASSWORD: "root"
16-
MYSQL_DATABASE: "test"
17-
install_script:
18-
- apt-get update -y
19-
- >-
20-
apt-get install -y
21-
bison
22-
re2c
23-
locales
24-
locales-all
25-
`#ldap-utils`
26-
openssl
27-
`slapd`
28-
libgmp-dev
29-
libicu-dev
30-
`#libtidy-dev`
31-
`#libenchant-dev`
32-
libaspell-dev
33-
libpspell-dev
34-
libsasl2-dev
35-
libxpm-dev
36-
libzip-dev
37-
`#libsqlite3-dev`
38-
libwebp-dev
39-
libonig-dev
40-
libkrb5-dev
41-
libgssapi-krb5-2
42-
libcurl4-openssl-dev
43-
libxml2-dev
44-
libxslt1-dev
45-
libpq-dev
46-
libreadline-dev
47-
`#libldap2-dev`
48-
libsodium-dev
49-
libargon2-0-dev
50-
libmm-dev
51-
`#libsnmp-dev`
52-
`#postgresql`
53-
`#postgresql-contrib`
54-
`#snmpd`
55-
`#snmp-mibs-downloader`
56-
`#freetds-dev`
57-
`#unixodbc-dev`
58-
llvm
59-
clang
60-
libc-client-dev
61-
dovecot-core
62-
dovecot-pop3d
63-
dovecot-imapd
64-
`#sendmail`
65-
`#firebird-dev`
66-
liblmdb-dev
67-
libtokyocabinet-dev
68-
libdb-dev
69-
libqdbm-dev
70-
libjpeg-dev
71-
libpng-dev
72-
libfreetype6-dev
73-
build_script:
74-
- ./buildconf -f
75-
- >-
76-
./configure
77-
--enable-debug
78-
--enable-zts
79-
--enable-option-checking=fatal
80-
--prefix=/usr
81-
--enable-phpdbg
82-
--enable-fpm
83-
--enable-opcache
84-
--disable-opcache-jit
85-
--with-pdo-mysql=mysqlnd
86-
--with-mysqli=mysqlnd
87-
`#--with-pgsql`
88-
`#--with-pdo-pgsql`
89-
`#--with-pdo-sqlite`
90-
--enable-intl
91-
--without-pear
92-
--enable-gd
93-
--with-jpeg
94-
--with-webp
95-
--with-freetype
96-
--with-xpm
97-
--enable-exif
98-
--with-zip
99-
--with-zlib
100-
--with-zlib-dir=/usr
101-
--enable-soap
102-
--enable-xmlreader
103-
--with-xsl
104-
`#--with-tidy`
105-
--enable-sysvsem
106-
--enable-sysvshm
107-
--enable-shmop
108-
--enable-pcntl
109-
--with-readline
110-
--enable-mbstring
111-
--with-curl
112-
--with-gettext
113-
--enable-sockets
114-
--with-bz2
115-
--with-openssl
116-
--with-gmp
117-
--enable-bcmath
118-
--enable-calendar
119-
--enable-ftp
120-
--with-pspell=/usr
121-
`#--with-enchant=/usr`
122-
--with-kerberos
123-
--enable-sysvmsg
124-
--with-ffi
125-
--enable-zend-test
126-
`#--enable-dl-test=shared`
127-
`#--with-ldap`
128-
`#--with-ldap-sasl`
129-
--with-password-argon2
130-
--with-mhash
131-
--with-sodium
132-
--enable-dba
133-
--with-cdb
134-
--enable-flatfile
135-
--enable-inifile
136-
--with-tcadb
137-
--with-lmdb
138-
--with-qdbm
139-
`#--with-snmp`
140-
`#--with-unixODBC`
141-
`#--with-imap`
142-
--with-kerberos
143-
--with-imap-ssl
144-
`#--with-pdo-odbc=unixODBC,/usr`
145-
`#--with-pdo-oci=shared,instantclient,/opt/oracle/instantclient`
146-
`#--with-oci8=shared,instantclient,/opt/oracle/instantclient`
147-
--with-config-file-path=/etc
148-
--with-config-file-scan-dir=/etc/php.d
149-
`#--with-pdo-firebird`
150-
`#--with-pdo-dblib`
151-
--enable-werror
152-
CFLAGS='-fsanitize=undefined,address -DZEND_TRACK_ARENA_ALLOC' LDFLAGS='-fsanitize=undefined,address'
153-
CC=clang
154-
CXX=clang++
155-
- make -j2
156-
- make install
157-
- mkdir -p /etc/php.d
158-
- echo opcache.enable_cli=1 > /etc/php.d/opcache.ini
159-
- echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini
160-
# Specify opcache.preload_user as we're running as root.
161-
- echo opcache.preload_user=root >> /etc/php.d/opcache.ini
162-
tests_script:
163-
- export SKIP_IO_CAPTURE_TESTS=1
164-
- export CI_NO_IPV6=1
165-
- export MYSQL_TEST_HOST=127.0.0.1
166-
- export MYSQL_TEST_USER=root
167-
- export MYSQL_TEST_PASSWD=root
168-
- export PDO_MYSQL_TEST_DSN="mysql:host=127.0.0.1;dbname=test"
169-
- export PDO_MYSQL_TEST_USER=root
170-
- export PDO_MYSQL_TEST_PASS=root
171-
- >-
172-
sapi/cli/php run-tests.php
173-
-P -q -x -j2
174-
-g FAIL,BORK,LEAK,XLEAK
175-
--no-progress
176-
--offline
177-
--show-diff
178-
--show-slow 1000
179-
--set-timeout 120
180-
-d zend_extension=opcache.so
181-
-d opcache.enable_cli=1
182-
--asan
183-
1844
freebsd_task:
1855
name: FREEBSD_DEBUG_NTS
1866
freebsd_instance:

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ inputs:
33
configurationParameters:
44
default: ''
55
required: false
6+
skipSlow:
7+
default: false
8+
required: false
69
runs:
710
using: composite
811
steps:
@@ -69,7 +72,7 @@ runs:
6972
--with-tcadb \
7073
--with-lmdb \
7174
--with-qdbm \
72-
--with-snmp \
75+
${{ !inputs.skipSlow && '--with-snmp' }} \
7376
--with-unixODBC \
7477
--with-imap \
7578
--with-imap-ssl \

.github/actions/test-linux/action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ inputs:
66
runTestsParameters:
77
default: ''
88
required: false
9+
skipSlow:
10+
default: false
11+
required: false
912
runs:
1013
using: composite
1114
steps:
@@ -40,7 +43,8 @@ runs:
4043
--offline \
4144
--show-diff \
4245
--show-slow 1000 \
43-
--set-timeout 120
46+
--set-timeout 120 \
47+
${{ inputs.skipSlow && '-x' }}
4448
- uses: actions/upload-artifact@v3
4549
if: always() && inputs.testArtifacts != null
4650
with:

.github/workflows/push.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,16 @@ jobs:
4747
fail-fast: false
4848
matrix:
4949
include:
50+
# - debug: true
51+
# zts: false
52+
# asan: false
53+
# - debug: false
54+
# zts: true
55+
# asan: false
5056
- debug: true
51-
zts: false
52-
- debug: false
5357
zts: true
54-
name: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
58+
asan: true
59+
name: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' }}"
5560
runs-on: ubuntu-22.04
5661
steps:
5762
- name: git checkout
@@ -70,35 +75,41 @@ jobs:
7075
# This duplicates the "job.name" expression above because
7176
# GitHub has no way to query the job name (github.job is the
7277
# job id, not the job name)
73-
key: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}-${{hashFiles('main/php_version.h')}}"
78+
key: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' }}-${{hashFiles('main/php_version.h')}}"
7479
append-timestamp: false
7580
- name: ./configure
7681
uses: ./.github/actions/configure-x64
7782
with:
7883
configurationParameters: >-
7984
--${{ matrix.debug && 'enable' || 'disable' }}-debug
8085
--${{ matrix.zts && 'enable' || 'disable' }}-zts
86+
${{ matrix.asan && '--enable-address-sanitizer --enable-undefined-sanitizer CFLAGS="-DZEND_TRACK_ARENA_ALLOC"' }}
87+
skipSlow: ${{ !matrix.asan }}
8188
- name: make
8289
run: make -j$(/usr/bin/nproc) >/dev/null
8390
- name: make install
8491
uses: ./.github/actions/install-linux
8592
- name: Setup
8693
uses: ./.github/actions/setup-x64
8794
- name: Test
95+
if: matrix.asan == false
8896
uses: ./.github/actions/test-linux
8997
with:
9098
testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}
9199
- name: Test Tracing JIT
92100
uses: ./.github/actions/test-linux
93101
with:
94-
testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Tracing JIT
102+
testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' }} Tracing JIT
95103
runTestsParameters: >-
96104
-d zend_extension=opcache.so
97105
-d opcache.enable_cli=1
98106
-d opcache.jit_buffer_size=16M
107+
${{ matrix.asan && '--asan' }}
108+
skipSlow: ${{ !matrix.asan }}
99109
- name: Verify generated files are up to date
100110
uses: ./.github/actions/verify-generated-files
101111
LINUX_X32:
112+
if: false
102113
name: LINUX_X32_DEBUG_ZTS
103114
runs-on: ubuntu-latest
104115
container:
@@ -143,6 +154,7 @@ jobs:
143154
-d opcache.enable_cli=1
144155
-d opcache.jit_buffer_size=16M
145156
MACOS_DEBUG_NTS:
157+
if: false
146158
runs-on: macos-11
147159
steps:
148160
- name: git checkout
@@ -176,6 +188,7 @@ jobs:
176188
- name: Verify generated files are up to date
177189
uses: ./.github/actions/verify-generated-files
178190
WINDOWS:
191+
if: false
179192
strategy:
180193
fail-fast: false
181194
matrix:
@@ -221,7 +234,7 @@ jobs:
221234
run: .github/scripts/windows/test.bat
222235
BENCHMARKING:
223236
name: BENCHMARKING
224-
if: github.repository_owner == 'php' || github.event_name == 'pull_request'
237+
if: false
225238
runs-on: ubuntu-22.04
226239
steps:
227240
- name: git checkout

0 commit comments

Comments
 (0)