@@ -191,6 +191,77 @@ jobs:
191
191
runTestsParameters : >-
192
192
-d zend_extension=opcache.so
193
193
-d opcache.enable_cli=1
194
+ ALPINE :
195
+ if : github.repository_owner == 'php' || github.event_name == 'pull_request'
196
+ strategy :
197
+ fail-fast : false
198
+ matrix :
199
+ include :
200
+ - debug : false
201
+ zts : false
202
+ asan : false
203
+ - debug : true
204
+ zts : true
205
+ asan : true
206
+ name : " ALPINE_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || '' }}"
207
+ runs-on : ubuntu-22.04
208
+ container :
209
+ image : ' alpine:3.19.1'
210
+ steps :
211
+ - name : git checkout
212
+ uses : actions/checkout@v4
213
+ - name : apk
214
+ uses : ./.github/actions/apk
215
+ - name : LLVM 17 (ASAN-only)
216
+ if : ${{ matrix.asan }}
217
+ # libclang_rt.asan-x86_64.a is provided by compiler-rt, and only for clang17
218
+ run : |
219
+ apk add clang17 compiler-rt
220
+ - name : System info
221
+ run : |
222
+ echo "::group::Show host CPU info"
223
+ lscpu
224
+ echo "::endgroup::"
225
+ echo "::group::Show installed package versions"
226
+ apk list
227
+ echo "::endgroup::"
228
+ - name : ccache
229
+ uses :
hendrikmuhs/[email protected]
230
+ with :
231
+ # This duplicates the "job.name" expression above because
232
+ # GitHub has no way to query the job name (github.job is the
233
+ # job id, not the job name)
234
+ key : " ALPINE_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || '' }}-${{hashFiles('main/php_version.h')}}"
235
+ append-timestamp : false
236
+ - name : ./configure
237
+ uses : ./.github/actions/configure-alpine
238
+ with :
239
+ # -Wno-error=address: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114609
240
+ # -Wno-error=stringop-overread: main/getopt.c: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114622
241
+ configurationParameters : >-
242
+ --${{ matrix.debug && 'enable' || 'disable' }}-debug
243
+ --${{ matrix.zts && 'enable' || 'disable' }}-zts
244
+ ${{ matrix.asan && 'CFLAGS="-fsanitize=undefined,address -fno-sanitize=function -DZEND_TRACK_ARENA_ALLOC" LDFLAGS="-fsanitize=undefined,address -fno-sanitize=function" CC=clang-17 CXX=clang++-17' || 'CFLAGS="-Wno-error=address -Wno-error=stringop-overread"' }}
245
+ skipSlow : ${{ matrix.asan }}
246
+ configureArtifacts : ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}
247
+ - name : make
248
+ run : make -j$(/usr/bin/nproc) >/dev/null
249
+ - name : make install
250
+ uses : ./.github/actions/install-alpine
251
+ - name : Test
252
+ if : matrix.asan == false
253
+ uses : ./.github/actions/test-alpine
254
+ with :
255
+ testArtifacts : ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}
256
+ - name : Test Tracing JIT
257
+ uses : ./.github/actions/test-alpine
258
+ with :
259
+ testArtifacts : ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || '' }}_Tracing JIT
260
+ jitType : tracing
261
+ runTestsParameters : >-
262
+ -d zend_extension=opcache.so
263
+ -d opcache.enable_cli=1
264
+ ${{ matrix.asan && '--asan -x' || '' }}
194
265
MACOS_DEBUG_NTS :
195
266
if : github.repository == 'php/php-src' || github.event_name == 'pull_request'
196
267
strategy :
0 commit comments