mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: [CI] Fix ineffective ccache
This commit is contained in:
19
.github/actions/ccache/action.yml
vendored
19
.github/actions/ccache/action.yml
vendored
@@ -5,9 +5,26 @@ inputs:
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Get cache key
|
||||
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')
|
||||
week=$(date +"%Y-%W")
|
||||
prefix="${{ inputs.name }}-$major.$minor.$release"
|
||||
echo "key=$prefix-$week" >> $GITHUB_OUTPUT
|
||||
echo "prefix=$prefix-" >> $GITHUB_OUTPUT
|
||||
- name: ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: "${{ inputs.name }}-${{ hashFiles('main/php_version.h') }}"
|
||||
key: "${{ steps.cache_key.outputs.key }}"
|
||||
append-timestamp: false
|
||||
restore-keys: "${{ steps.cache_key.outputs.prefix }}"
|
||||
save: ${{ github.event_name != 'pull_request' }}
|
||||
- name: Export CC/CXX
|
||||
shell: bash
|
||||
run: |
|
||||
echo "CC=ccache gcc" >> $GITHUB_ENV
|
||||
echo "CXX=ccache g++" >> $GITHUB_ENV
|
||||
|
||||
Reference in New Issue
Block a user