Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-yocto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ env:
CACHE_DIR: /efsx/qli/meta-qcom
KAS_CLONE_DEPTH: 1
KAS_CONTAINER: ${{ github.workspace }}/kas-container
KAS_CONTAINER_IMAGE: ghcr.io/siemens/kas/kas:5.5
KAS_CONTAINER_IMAGE: ghcr.io/siemens/kas/kas@sha256:3f3d3257e8d4ca3adfcb2e0025e6da24339fb8d68a6999ca36c37381351582d5 # 5.5-9-g0555188

jobs:
kas-setup:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ on:
env:
KAS_CLONE_DEPTH: 1
KAS_CONTAINER: ${{ github.workspace }}/kas-container
KAS_CONTAINER_IMAGE: ghcr.io/siemens/kas/kas:5.5
KAS_CONTAINER_IMAGE: ghcr.io/siemens/kas/kas@sha256:3f3d3257e8d4ca3adfcb2e0025e6da24339fb8d68a6999ca36c37381351582d5 # 5.5-9-g0555188

jobs:
reusable_compile_job:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sstate-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ jobs:
run: |
# bitbake refreshes the mtime of every sstate file a build uses, so
# a file older than 15 days was not used by any build in 15 days
find "${CACHE_DIR}/sstate-cache" -type f -mtime +15 -delete
find "${CACHE_DIR}/sstate-cache" -mindepth 1 -type d -empty -delete
find "${CACHE_DIR}/sstate-cache" -not -path "*/ccache/*" -type f -mtime +15 -delete
find "${CACHE_DIR}/sstate-cache" -not -path "*/ccache/*" -mindepth 1 -type d -empty -delete
31 changes: 31 additions & 0 deletions ci/ccache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/siemens/kas/master/kas/schema-kas.json

header:
version: 14

local_conf_header:
ccache: |
INHERIT += "ccache"
CCACHE_MAXSIZE = "200G"
CCACHE_TOP_DIR = "${SSTATE_DIR}/ccache"
# required to build '-native' target
HOSTTOOLS += "ccache"
ASSUME_PROVIDED += "ccache-native"

ccache-recipe-contol: |
# disable all recipes
CCACHE_DISABLE = "1"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just enable ccache for all the recipes? What are the drawbacks?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

# table with enabled recipes
CCACHE_DISABLE:pn-clang = "0"
CCACHE_DISABLE:pn-clang-native = "0"
CCACHE_DISABLE:pn-gcc = "0"
CCACHE_DISABLE:pn-gcc-cross-aarch64 = "0"
CCACHE_DISABLE:pn-gcc-cross-arm = "0"
CCACHE_DISABLE:pn-glibc = "0"
CCACHE_DISABLE:pn-llvm = "0"
CCACHE_DISABLE:pn-llvm-native = "0"
CCACHE_DISABLE:pn-linux-qcom = "0"
CCACHE_DISABLE:pn-linux-qcom-next = "0"
CCACHE_DISABLE:pn-linux-yocto = "0"
CCACHE_DISABLE:pn-rust = "0"
Comment thread
lumag marked this conversation as resolved.
CCACHE_DISABLE:pn-rust-native = "0"
1 change: 1 addition & 0 deletions ci/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ header:
version: 14
includes:
- ci/mirror.yml
- ci/ccache.yml
Comment thread
ricardosalveti marked this conversation as resolved.

local_conf_header:
ci: |
Expand Down
Loading