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