-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve usage of ccache to speed up builds #396
Open
jimklimov
wants to merge
14
commits into
openSUSE:master
Choose a base branch
from
jimklimov:20171017-ccache
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Improvements: * allow to mount a directory from worker's host OS as the /.ccache/ in the build root, so cache can be shared (including over NFS; tested for an ARM+AMD64 farm) * use a /.ccache-bin/ rather than /var/lib/build/ccache/bin (easier to clean out) * more reliably test for presence of compilers where absolute symlinks are used in build root (e.g. debian alternatives) * allow fallback use of a ccache binary provided by the worker's host OS * in case of cleanup, hit not only compiler basenames but also possible suffixes (arch, version, etc.)
If ccache was used in this build, optionally display its log in the end of build, so packagers know better if their recipes need to be tuned to take advantage of ccache (tune relative paths to source, etc.) This should be enabled either via command-line arguments to "build", or caller can also enforce this via envvars (e.g. /etc/sysconfig/obs-worker file) with `export DO_CCACHE_STATISTICS=1`
…e ccache artefacts into produced images
…STATS that can be used to enable details while sourcing configs (e.g. via worker setup)
…lso pre-create the /.build.log.ccache and chown it to abuild user
ping? Anyone looking at this? Having ccache available in a project (or per project) would be a great benefit considering we have plenty of "rebuilds" where nothing changes. |
Sumit reworked the ccache a bit. It is merged meanwhile Could you check if this sufficient for you? |
adrianschroeter
force-pushed
the
master
branch
from
October 19, 2021 15:01
e6ebce5
to
2a6beef
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Port of our (older) OBS setup, which benefits greatly from use of the same persistent
ccache
directory on all workers, ARM and amd64 alike (and Jenkins workers running builds in similar OS images too, added for good measure).These changes allow to optionally enforce usage of
ccache
binary provided by the worker host (such approach should suffice for most Linux distros) even if the build-root does not pull ccache as a package, and to optionally bind-mount the cache directory from the worker's host so that a shared cache is easy to do.