Skip to content

Commit 2a03517

Browse files
committed
ci: add cache to nightly job
1 parent 96be28c commit 2a03517

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

.github/workflows/nightly.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ on:
4949
type: boolean
5050
permissions:
5151
contents: read
52+
env:
53+
CC: ccache gcc
54+
CXX: ccache g++
5255
jobs:
5356
LINUX_PPC64:
5457
if: inputs.run_linux_ppc64
@@ -216,6 +219,11 @@ jobs:
216219
echo "::group::Show installed package versions"
217220
dpkg -l
218221
echo "::endgroup::"
222+
- name: ccache
223+
uses: hendrikmuhs/ccache-action@v1.2
224+
with:
225+
key: "LINUX_X64${{ matrix.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}-${{hashFiles('main/php_version.h')}}"
226+
append-timestamp: false
219227
- name: ./configure
220228
uses: ./.github/actions/configure-x64
221229
with:
@@ -307,6 +315,11 @@ jobs:
307315
echo "::group::Show installed package versions"
308316
dpkg -l
309317
echo "::endgroup::"
318+
- name: ccache
319+
uses: hendrikmuhs/ccache-action@v1.2
320+
with:
321+
key: "LINUX_X32_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}-${{hashFiles('main/php_version.h')}}"
322+
append-timestamp: false
310323
- name: ./configure
311324
uses: ./.github/actions/configure-x32
312325
with:
@@ -365,6 +378,11 @@ jobs:
365378
- name: brew
366379
timeout-minutes: 10
367380
uses: ./.github/actions/brew
381+
- name: ccache
382+
uses: hendrikmuhs/ccache-action@v1.2
383+
with:
384+
key: "MACOS_${{ matrix.arch }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}-${{hashFiles('main/php_version.h')}}"
385+
append-timestamp: false
368386
- name: ./configure
369387
uses: ./.github/actions/configure-macos
370388
with:
@@ -439,6 +457,11 @@ jobs:
439457
uses: ./.github/actions/apt-x64
440458
- name: Install gcovr
441459
run: sudo -H pip install gcovr
460+
- name: ccache
461+
uses: hendrikmuhs/ccache-action@v1.2
462+
with:
463+
key: "${{github.job}}-${{hashFiles('main/php_version.h')}}"
464+
append-timestamp: false
442465
- name: ./configure
443466
uses: ./.github/actions/configure-x64
444467
with:
@@ -483,6 +506,11 @@ jobs:
483506
ref: ${{ inputs.branch }}
484507
- name: apt
485508
uses: ./.github/actions/apt-x64
509+
- name: ccache
510+
uses: hendrikmuhs/ccache-action@v1.2
511+
with:
512+
key: "${{github.job}}_${{ matrix.type }}-${{hashFiles('main/php_version.h')}}"
513+
append-timestamp: false
486514
- name: ./configure
487515
uses: ./.github/actions/configure-x64
488516
with:
@@ -684,6 +712,11 @@ jobs:
684712
uses: ./.github/actions/setup-mssql
685713
- name: apt
686714
uses: ./.github/actions/apt-x64
715+
- name: ccache
716+
uses: hendrikmuhs/ccache-action@v1.2
717+
with:
718+
key: "${{github.job}}-${{hashFiles('main/php_version.h')}}"
719+
append-timestamp: false
687720
- name: ./configure
688721
uses: ./.github/actions/configure-x64
689722
with:
@@ -740,6 +773,11 @@ jobs:
740773
ref: ${{ inputs.branch }}
741774
- name: apt
742775
uses: ./.github/actions/apt-x64
776+
- name: ccache
777+
uses: hendrikmuhs/ccache-action@v1.2
778+
with:
779+
key: "${{github.job}}-${{hashFiles('main/php_version.h')}}"
780+
append-timestamp: false
743781
- name: ./configure
744782
run: |
745783
export CC=clang
@@ -828,6 +866,11 @@ jobs:
828866
run: |
829867
sudo apt-get update -y | true
830868
sudo apt install bison re2c
869+
- name: ccache
870+
uses: hendrikmuhs/ccache-action@v1.2
871+
with:
872+
key: "${{github.job}}-${{hashFiles('main/php_version.h')}}"
873+
append-timestamp: false
831874
- name: Setup
832875
run: |
833876
sudo service mysql start

.github/workflows/root.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ name: Nightly
22
on:
33
schedule:
44
- cron: "0 1 * * *"
5+
pull_request: ~
56
workflow_dispatch: ~
67
permissions:
78
contents: read
89
jobs:
910
GENERATE_MATRIX:
1011
name: Generate Matrix
11-
if: github.repository == 'php/php-src' || github.event_name == 'workflow_dispatch'
12+
if: true
1213
runs-on: ubuntu-latest
1314
outputs:
1415
branches: ${{ steps.set-matrix.outputs.branches }}

0 commit comments

Comments
 (0)