Skip to content

Commit bc6eb97

Browse files
committed
Fix ccache for coverage and pecl builds
Coverage cannot use ccache as it is incompatible with gcov. Pecl clones PHP to the ./php directory, rather than the cwd.
1 parent db0e365 commit bc6eb97

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.github/actions/ccache/action.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@ name: ccache
22
inputs:
33
name:
44
required: true
5+
php_directory:
6+
required: false
7+
default: '.'
58
runs:
69
using: composite
710
steps:
811
- name: Get cache key
912
shell: bash
1013
id: cache_key
1114
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')
15+
major=$(cat ${{ inputs.php_directory }}/main/php_version.h | sed -En 's/^#define PHP_MAJOR_VERSION ([0-9]+)/\1/p')
16+
minor=$(cat ${{ inputs.php_directory }}/main/php_version.h | sed -En 's/^#define PHP_MINOR_VERSION ([0-9]+)/\1/p')
17+
release=$(cat ${{ inputs.php_directory }}/main/php_version.h | sed -En 's/^#define PHP_RELEASE_VERSION ([0-9]+)/\1/p')
1518
week=$(date +"%Y-%W")
1619
prefix="${{ inputs.name }}-$major.$minor.$release"
1720
echo "key=$prefix-$week" >> $GITHUB_OUTPUT

.github/workflows/test-suite.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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:
@@ -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

0 commit comments

Comments
 (0)