1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.2' into PHP-8.3

* PHP-8.2:
  Fix benchmarking head sha
  Fix ccache for alpine and msan
  Fix coverage label job selection
  Fix ccache for coverage and pecl builds
This commit is contained in:
Ilija Tovilo
2026-02-24 12:58:44 +01:00
3 changed files with 22 additions and 16 deletions

View File

@@ -2,6 +2,15 @@ name: ccache
inputs:
name:
required: true
php_directory:
required: false
default: '.'
cc:
required: false
default: 'gcc'
cxx:
required: false
default: 'g++'
runs:
using: composite
steps:
@@ -9,9 +18,9 @@ runs:
shell: bash
id: cache_key
run: |
major=$(cat main/php_version.h | sed -En 's/^#define PHP_MAJOR_VERSION ([0-9]+)/\1/p')
minor=$(cat main/php_version.h | sed -En 's/^#define PHP_MINOR_VERSION ([0-9]+)/\1/p')
release=$(cat main/php_version.h | sed -En 's/^#define PHP_RELEASE_VERSION ([0-9]+)/\1/p')
major=$(cat ${{ inputs.php_directory }}/main/php_version.h | sed -En 's/^#define PHP_MAJOR_VERSION ([0-9]+)/\1/p')
minor=$(cat ${{ inputs.php_directory }}/main/php_version.h | sed -En 's/^#define PHP_MINOR_VERSION ([0-9]+)/\1/p')
release=$(cat ${{ inputs.php_directory }}/main/php_version.h | sed -En 's/^#define PHP_RELEASE_VERSION ([0-9]+)/\1/p')
week=$(date +"%Y-%W")
prefix="${{ inputs.name }}-$major.$minor.$release"
echo "key=$prefix-$week" >> $GITHUB_OUTPUT
@@ -26,5 +35,5 @@ runs:
- name: Export CC/CXX
shell: bash
run: |
echo "CC=ccache gcc" >> $GITHUB_ENV
echo "CXX=ccache g++" >> $GITHUB_ENV
echo "CC=ccache ${{ inputs.cc }}" >> $GITHUB_ENV
echo "CXX=ccache ${{ inputs.cxx }}" >> $GITHUB_ENV

2
.github/matrix.php vendored
View File

@@ -52,7 +52,7 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re
$test_alpine = in_array('CI: Alpine', $labels, true);
$test_benchmarking = in_array('CI: Benchmarking', $labels, true);
$test_community = in_array('CI: Community', $labels, true);
$test_coverage = in_array('CI: COVERAGE', $labels, true);
$test_coverage = in_array('CI: Coverage', $labels, true);
$test_freebsd = in_array('CI: FreeBSD', $labels, true);
$test_libmysqlclient = in_array('CI: libmysqlclient', $labels, true);
$test_linux_ppc64 = in_array('CI: Linux PPC64', $labels, true);

View File

@@ -76,14 +76,14 @@ jobs:
uses: ./.github/actions/ccache
with:
name: "${{ github.job }}"
cc: clang-20
cxx: clang++-20
- name: ./configure
uses: ./.github/actions/configure-alpine
with:
configurationParameters: >-
CFLAGS="-fsanitize=undefined,address -fno-sanitize=function -DZEND_TRACK_ARENA_ALLOC"
LDFLAGS="-fsanitize=undefined,address -fno-sanitize=function"
CC=clang-20
CXX=clang++-20
--enable-debug
--enable-zts
skipSlow: true # FIXME: This should likely include slow extensions
@@ -396,10 +396,6 @@ jobs:
uses: ./.github/actions/apt-x64
- name: Install gcovr
run: sudo -H pip install gcovr
- name: ccache
uses: ./.github/actions/ccache
with:
name: "${{ github.job }}"
- name: ./configure
uses: ./.github/actions/configure-x64
with:
@@ -712,10 +708,10 @@ jobs:
uses: ./.github/actions/ccache
with:
name: "${{ github.job }}"
cc: clang
cxx: clang++
- name: ./configure
run: |
export CC=clang
export CXX=clang++
export CFLAGS="-DZEND_TRACK_ARENA_ALLOC"
./buildconf --force
# msan requires all used libraries to be instrumented,
@@ -880,6 +876,7 @@ jobs:
uses: ./.github/actions/ccache
with:
name: "${{ github.job }}"
php_directory: php
- name: build PHP
run: |
cd php
@@ -1077,8 +1074,8 @@ jobs:
run: |-
set -x
php benchmark/generate_diff.php \
${{ github.sha }} \
$(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.sha }}) \
${{ github.event.pull_request.head.sha }} \
$(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}) \
> $GITHUB_STEP_SUMMARY
- uses: actions/upload-artifact@v6
with: