Skip to content

Commit 7497bdf

Browse files
committed
.github/workflows/push.yml: enable ccache
This reduces the LINUX_X64_RELEASE_ZTS build time from 9-10 minutes to less than 3 minutes.
1 parent 4f36623 commit 7497bdf

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.github/workflows/push.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ on:
2020
- '**'
2121
permissions:
2222
contents: read
23+
env:
24+
CC: ccache gcc
25+
CXX: ccache g++
2326
jobs:
2427
LINUX_X64:
2528
strategy:
@@ -41,6 +44,10 @@ jobs:
4144
uses: ./.github/actions/setup-oracle
4245
- name: apt
4346
uses: ./.github/actions/apt-x64
47+
- name: ccache
48+
uses: hendrikmuhs/ccache-action@v1.2
49+
with:
50+
key: "${{ github.workflow }}-${{ github.job }}-${{ toJSON(matrix) }}-${{ hashFiles('main/php_version.h') }}"
4451
- name: ./configure
4552
uses: ./.github/actions/configure-x64
4653
with:
@@ -89,6 +96,10 @@ jobs:
8996
uses: actions/checkout@v3
9097
- name: apt
9198
uses: ./.github/actions/apt-x32
99+
- name: ccache
100+
uses: hendrikmuhs/ccache-action@v1.2
101+
with:
102+
key: "${{ github.workflow }}-${{ github.job }}-${{ hashFiles('main/php_version.h' )}}"
92103
- name: ./configure
93104
uses: ./.github/actions/configure-x32
94105
with:
@@ -115,6 +126,10 @@ jobs:
115126
uses: actions/checkout@v3
116127
- name: brew
117128
uses: ./.github/actions/brew
129+
- name: ccache
130+
uses: hendrikmuhs/ccache-action@v1.2
131+
with:
132+
key: "${{ github.workflow }}-${{ github.job }}-${{ hashFiles('main/php_version.h' )}}"
118133
- name: ./configure
119134
uses: ./.github/actions/configure-macos
120135
with:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ tmp-php.ini
285285
# ------------------------------------------------------------------------------
286286
/branch-commit-cache.json
287287
/junit.out.xml
288+
/.ccache/
288289

289290
# ------------------------------------------------------------------------------
290291
# Special cases to invert previous ignore patterns

0 commit comments

Comments
 (0)