mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
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. Closes GH-21285
This commit is contained in:
9
.github/actions/ccache/action.yml
vendored
9
.github/actions/ccache/action.yml
vendored
@@ -2,6 +2,9 @@ name: ccache
|
||||
inputs:
|
||||
name:
|
||||
required: true
|
||||
php_directory:
|
||||
required: false
|
||||
default: '.'
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
@@ -9,9 +12,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
|
||||
|
||||
Reference in New Issue
Block a user