ci/ci: enable ccache - #2936
ci/ci: enable ccache#2936
Conversation
8b220d0 to
7a9da88
Compare
| INHERIT += "ccache" | ||
| CCACHE_MAXSIZE = "200G" | ||
| CCACHE_TOP_DIR = "${SSTATE_DIR}/ccache" | ||
| CCACHE_DISABLE = "1" |
There was a problem hiding this comment.
Can we just enable ccache for all the recipes? What are the drawbacks?
There was a problem hiding this comment.
In internal discussions, we concluded that there wasn't much value in enabling it for everyone. However, the heavier packages in the compilation would always have some benefit. In reality, it's a trade-off between space occupied and benefit utilized.
There was a problem hiding this comment.
there wasn't much value in enabling it for everyone
Why? What was the main argument for deciding it this way? Just to document it here. Do we have any stats?
There was a problem hiding this comment.
We don't have stats and that conclusion came from a internal slack discussion.
Basically, we'll have to divide the available space among all existing components. Focusing a large portion of the allocated space on components that are fast enough even without ccache. We then conclude that it would be more efficient if we allocated space only to the components that take the most advantage of using ccache.
I'll add it to the commit.
| CCACHE_DISABLE:pn-glibc = "0" | ||
| CCACHE_DISABLE:pn-llvm = "0" | ||
| CCACHE_DISABLE:pn-linux-yocto = "0" | ||
| #CCACHE_DISABLE:pn-linux-yocto = "0" |
There was a problem hiding this comment.
So, what is in 2026-08-14 09:59:21 - INFO - | ERROR: Details can be found at: /work/build/tmp/work-shared/qcom-armv8a/kernel-source/.kernel-meta/cfg/merge_config_build.log ? Why does it fail?
There was a problem hiding this comment.
I am in the evaluation process and I don't yet know the reasons.
There was a problem hiding this comment.
It fails becuas it also requires the ccache-native for the native tools. After install ccache on the container and add the required configs it works
There was a problem hiding this comment.
Isn't it a missing dependency somewhere?
There was a problem hiding this comment.
The missing dependencie is HOSTTOOLS += "ccache"
There was a problem hiding this comment.
That makes linux-yocto depend on the host's ccache, doesn't it? My point is that the recipe should be buildable even withou it, by using ccache-native.
227959f to
28464f9
Compare
Test Results 30 files - 51 30 suites - 396 4h 12m 28s ⏱️ - 4h 3m 49s For more details on these failures, see this check. Results for commit 39cf185. ± Comparison against base commit faf4f4c. This pull request removes 160 tests.♻️ This comment has been updated with latest results. |
d504013 to
2ca5572
Compare
|
Proposed ccache to be installed on kas-container and it is accepted and available in |
2ca5572 to
702291f
Compare
702291f to
5989d85
Compare
5989d85 to
d8fe1b8
Compare
Ricardo Salveti (ricardosalveti)
left a comment
There was a problem hiding this comment.
LGTM, but I believe we want to wait for kas 5.6, no?
Store the CCACHE_TOP_DIR inside the state-cache so we can access it from within the kas-container. Signed-off-by: Jose Quaresma <jose.quaresma@oss.qualcomm.com>
The ccache can improve significantly our builds speeds when we can't take advantage of the bitbake sstate cache, in such scenario we need to compile the code. The cache storage needs to be available from the previous builds so we need to store these ccache artifacts temporay on our permanent storage. Fixes qualcomm-linux#1051 Signed-off-by: Jose Quaresma <jose.quaresma@oss.qualcomm.com>
We'll have to divide the available space among all existing components. Focusing a large portion of the allocated space on components that are fast enough even without ccache. We then conclude that it would be more efficient if we allocated space only to the components that take the most advantage of using ccache. Let's start with a short list of the heavier recipes; we'll adjust them as needed. A quick analysis of the buildstats of shows that the compilation time is high for this list of recipes. Signed-off-by: Jose Quaresma <jose.quaresma@oss.qualcomm.com>
The ccache it's saved within sstate-cache because it needs to be in a persistent storage location in order to be reused. Its management is private and therefore it should be excluded from the sstate-cache cleanup policy. Signed-off-by: Jose Quaresma <jose.quaresma@oss.qualcomm.com>
f16a384 to
39cf185
Compare
I don't have the exact numbers, but the more components that share the total space, the less space each one will have. Since less space results in less cache, then the more components, the less efficient it is. |
|
Should we wait for kas 5.6? |
|
We don't need to wait. There is a cosmetic update in kas-container and the essential package list in Dockerfile was updated to mach Yocto 6. The rest has no impact on us. $ git diff --stat 5.5 origin/master
.github/actions/docker-init/action.yml | 2 +-
.github/actions/perform-tests/action.yml | 24 +++++++++++++-----------
.github/workflows/next.yml | 3 +--
Dockerfile | 54 +++++++++++++++++++++++++++++++-----------------------
docs/format-changelog.rst | 2 +-
kas-container | 4 ++--
scripts/build-container.sh | 4 ++-- |
|
Known failures. |
87cec8c
into
qualcomm-linux:master
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin wrynose
git worktree add -d .worktree/backport/2936-to-wrynose origin/wrynose
cd .worktree/backport/2936-to-wrynose
git switch --create backport/2936-to-wrynose
git cherry-pick -x 37fa5f8c3976bee2f15ca96a399d03a1dbf470fb 588e03d3976c8c3462613d724680bed3b8009e2d 5451b3dbea78682edc0b1d7c1e747fbb663c899c 35458a258f3015ddb9c5f4a8ee1d9776316fec9e 365630484461b5927ee7bd4d308efce239bcc88a 39cf1856083fe252efdaa789f9c696c032e10897 |
|
Jose Quaresma (@quaresmajose) mind having a look at backporting to wrynose? |
Proposed in #3144 |
Description Backport of #2936 to wrynose.
It avoids reproducibility problems and is recommended by good security practices. Backport from qualcomm-linux/meta-qcom#2936 Signed-off-by: Jose Quaresma <jose.quaresma@oss.qualcomm.com>
Proposed ccache to be installed on kas-container and it is accepted and available in the image. The change landed in master 5.5-9-g0555188 Backport from qualcomm-linux/meta-qcom#2936 Signed-off-by: Jose Quaresma <jose.quaresma@oss.qualcomm.com>
It avoids reproducibility problems and is recommended by good security practices. Backport from qualcomm-linux/meta-qcom#2936 Signed-off-by: Jose Quaresma <jose.quaresma@oss.qualcomm.com>
Proposed ccache to be installed on kas-container and it is accepted and available in the image. The change landed in master 5.5-9-g0555188 Backport from qualcomm-linux/meta-qcom#2936 Signed-off-by: Jose Quaresma <jose.quaresma@oss.qualcomm.com>
It avoids reproducibility problems and is recommended by good security practices. Backport from qualcomm-linux/meta-qcom#2936 Signed-off-by: Jose Quaresma <jose.quaresma@oss.qualcomm.com>
Proposed ccache to be installed on kas-container and it is accepted and available in the image. The change landed in master 5.5-9-g0555188 Backport from qualcomm-linux/meta-qcom#2936 Signed-off-by: Jose Quaresma <jose.quaresma@oss.qualcomm.com>
It avoids reproducibility problems and is recommended by good security practices. Backport from qualcomm-linux/meta-qcom#2936 Signed-off-by: Jose Quaresma <jose.quaresma@oss.qualcomm.com>
Proposed ccache to be installed on kas-container and it is accepted and available in the image. The change landed in master 5.5-9-g0555188 Backport from qualcomm-linux/meta-qcom#2936 Signed-off-by: Jose Quaresma <jose.quaresma@oss.qualcomm.com>
Partial port of meta-qcom: github/workflows: extract kas-container from the image Backport from qualcomm-linux/meta-qcom#2934 ci/ci: enable ccache Backport from qualcomm-linux/meta-qcom#2936
It avoids reproducibility problems and is recommended by good security practices. Backport from qualcomm-linux/meta-qcom#2936 Signed-off-by: Jose Quaresma <jose.quaresma@oss.qualcomm.com> (cherry picked from commit e6bb390)
Proposed ccache to be installed on kas-container and it is accepted and available in the image. The change landed in master 5.5-9-g0555188 Backport from qualcomm-linux/meta-qcom#2936 Signed-off-by: Jose Quaresma <jose.quaresma@oss.qualcomm.com> (cherry picked from commit fac2470)
The ccache can improve significantly our builds speeds when we can't take
advantage of the bitbake sstate cache, in sutch scenario we need to compile
the code. The cache storage needs to be available from the previous builds
so we need to store these ccache artifacts temporay on our permanent storage.
Fixes #1051