Skip to content

Commit 90d604e

Browse files
committed
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
2 parents 3692a5f + 46073db commit 90d604e

File tree

3 files changed

+22
-16
lines changed

3 files changed

+22
-16
lines changed

.github/actions/ccache/action.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,25 @@ name: ccache
22
inputs:
33
name:
44
required: true
5+
php_directory:
6+
required: false
7+
default: '.'
8+
cc:
9+
required: false
10+
default: 'gcc'
11+
cxx:
12+
required: false
13+
default: 'g++'
514
runs:
615
using: composite
716
steps:
817
- name: Get cache key
918
shell: bash
1019
id: cache_key
1120
run: |
12-
major=$(cat main/php_version.h | sed -En 's/^#define PHP_MAJOR_VERSION ([0-9]+)/\1/p')
13-
minor=$(cat main/php_version.h | sed -En 's/^#define PHP_MINOR_VERSION ([0-9]+)/\1/p')
14-
release=$(cat main/php_version.h | sed -En 's/^#define PHP_RELEASE_VERSION ([0-9]+)/\1/p')
21+
major=$(cat ${{ inputs.php_directory }}/main/php_version.h | sed -En 's/^#define PHP_MAJOR_VERSION ([0-9]+)/\1/p')
22+
minor=$(cat ${{ inputs.php_directory }}/main/php_version.h | sed -En 's/^#define PHP_MINOR_VERSION ([0-9]+)/\1/p')
23+
release=$(cat ${{ inputs.php_directory }}/main/php_version.h | sed -En 's/^#define PHP_RELEASE_VERSION ([0-9]+)/\1/p')
1524
week=$(date +"%Y-%W")
1625
prefix="${{ inputs.name }}-$major.$minor.$release"
1726
echo "key=$prefix-$week" >> $GITHUB_OUTPUT
@@ -26,5 +35,5 @@ runs:
2635
- name: Export CC/CXX
2736
shell: bash
2837
run: |
29-
echo "CC=ccache gcc" >> $GITHUB_ENV
30-
echo "CXX=ccache g++" >> $GITHUB_ENV
38+
echo "CC=ccache ${{ inputs.cc }}" >> $GITHUB_ENV
39+
echo "CXX=ccache ${{ inputs.cxx }}" >> $GITHUB_ENV

.github/matrix.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re
5252
$test_alpine = in_array('CI: Alpine', $labels, true);
5353
$test_benchmarking = in_array('CI: Benchmarking', $labels, true);
5454
$test_community = in_array('CI: Community', $labels, true);
55-
$test_coverage = in_array('CI: COVERAGE', $labels, true);
55+
$test_coverage = in_array('CI: Coverage', $labels, true);
5656
$test_freebsd = in_array('CI: FreeBSD', $labels, true);
5757
$test_libmysqlclient = in_array('CI: libmysqlclient', $labels, true);
5858
$test_linux_ppc64 = in_array('CI: Linux PPC64', $labels, true);

.github/workflows/test-suite.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ jobs:
7676
uses: ./.github/actions/ccache
7777
with:
7878
name: "${{ github.job }}"
79+
cc: clang-20
80+
cxx: clang++-20
7981
- name: ./configure
8082
uses: ./.github/actions/configure-alpine
8183
with:
8284
configurationParameters: >-
8385
CFLAGS="-fsanitize=undefined,address -fno-sanitize=function -DZEND_TRACK_ARENA_ALLOC"
8486
LDFLAGS="-fsanitize=undefined,address -fno-sanitize=function"
85-
CC=clang-20
86-
CXX=clang++-20
8787
--enable-debug
8888
--enable-zts
8989
skipSlow: true # FIXME: This should likely include slow extensions
@@ -396,10 +396,6 @@ jobs:
396396
uses: ./.github/actions/apt-x64
397397
- name: Install gcovr
398398
run: sudo -H pip install gcovr
399-
- name: ccache
400-
uses: ./.github/actions/ccache
401-
with:
402-
name: "${{ github.job }}"
403399
- name: ./configure
404400
uses: ./.github/actions/configure-x64
405401
with:
@@ -712,10 +708,10 @@ jobs:
712708
uses: ./.github/actions/ccache
713709
with:
714710
name: "${{ github.job }}"
711+
cc: clang
712+
cxx: clang++
715713
- name: ./configure
716714
run: |
717-
export CC=clang
718-
export CXX=clang++
719715
export CFLAGS="-DZEND_TRACK_ARENA_ALLOC"
720716
./buildconf --force
721717
# msan requires all used libraries to be instrumented,
@@ -880,6 +876,7 @@ jobs:
880876
uses: ./.github/actions/ccache
881877
with:
882878
name: "${{ github.job }}"
879+
php_directory: php
883880
- name: build PHP
884881
run: |
885882
cd php
@@ -1077,8 +1074,8 @@ jobs:
10771074
run: |-
10781075
set -x
10791076
php benchmark/generate_diff.php \
1080-
${{ github.sha }} \
1081-
$(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.sha }}) \
1077+
${{ github.event.pull_request.head.sha }} \
1078+
$(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}) \
10821079
> $GITHUB_STEP_SUMMARY
10831080
- uses: actions/upload-artifact@v6
10841081
with:

0 commit comments

Comments
 (0)