Repository navigation
Add sccache support - #12526
Merged
Merged
Add sccache support#12526
Conversation
This commit adds support for sccache to the build. Set the environment variable SCCACHE_ENABLED=1 to use sccache, otherwise sccache will not be used.
Per code review feedback, this file removes FindSccache.cmake, which is uneccessary and updates the copyright for install-sccache to be the current year.
cm421
requested changes
Jan 5, 2023
cm421
left a comment
Contributor
There was a problem hiding this comment.
Sorry for not getting these in before we merged, but I think the dependency script needs some attention
| SCCACHE_PACKAGE_HASH="1bf58385dc27b66324bb9ee82084e65c4d2e60baa19e3d16d2ab4da6c1ae66b2" | ||
| fi | ||
|
|
||
| URL=https://github.com/mozilla/sccache/releases/download/v${VERSION}/sccache-v${VERSION}-${ARCH}-unknown-linux-musl.tar.gz |
Contributor
There was a problem hiding this comment.
Since this is in dependencies/common it needs to work across all OSes, and this wouldn't work for MacOS.
This script should either
- Be updated to work on MacOS and Linux, or
- Move into
dependencies/linuxand get called there until this script is updated to work for MacOS
Contributor
Author
| if [ -n "$SCCACHE_ENABLED" ]; then | ||
| echo "Using sccache" | ||
|
|
||
| if [ -n "$AWS_ACCESS_KEY_ID" ] || [ $(aws sts get-caller-identity --query "Account" --profile ${AWS_PROFILE:-sso}) -eq 14 ]; then |
Contributor
There was a problem hiding this comment.
Do any of these need to be pre-defined before this script runs? If so we'll want to add that info into the wiki
This file contains hidden or 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
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.
Intent
Addresses #12520. Adds support for sccache to the build. Set the environment variable SCCACHE_ENABLED=1 to use sccache, otherwise sccache will not be used. The pull-request Jenkinsfile has also been updated to use sccache.
Approach
An S3 bucket has been created to act as a build cache for Jenkins (and developers, if they so choose). Note that this does not add sccache for Windows or OSX at this time. We should create new issues to address this if needed.
Automated Tests
N/A
QA Notes
N/A
Documentation
N/A
Checklist
NEWS.md