Jenkins: Use ccache to highly improve compilation times

Description

Download ccache data from remote storage (like Amazon S3) before a build is started then upload ccache data after the build is finished. It may reduce compilation time to 10-20% of original compilation time (when previous compilation was done on similar sources).

Please check our Azure Pipelines that use ccache e.g.:
https://dev.azure.com/it0639/percona-server/_build/results?buildId=6570&view=results

Our Linux env variables:
https://github.com/percona/percona-server/blob/8.0/azure-pipelines.yml#L68-L73

The package uploaded to S3 should depend on OS, BuildType and compiler version:
https://github.com/percona/percona-server/blob/8.0/azure-pipelines.yml#L420-L426

After ccache is installed and configured PS needs only 2 additional CMake params:
https://github.com/percona/percona-server/blob/8.0/azure-pipelines.yml#L475-L476

Activity

Aaditya Dubey September 18, 2023 at 8:24 AM

Hi ,

Thank you for the report and feedback.

Details

Assignee

Reporter

Priority

Components

Labels

Smart Checklist

Created September 14, 2023 at 8:51 AM
Updated February 12, 2025 at 11:31 AM