From 6c716a832f5d7f0598ce58886e549a380eca2267 Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Tue, 1 Sep 2026 10:57:46 +0100 Subject: [PATCH 1/5] github/workflows: pin KAS_CONTAINER_IMAGE to v5.5 It avoids reproducibility problems and is recommended by good security practices. Signed-off-by: Jose Quaresma (cherry picked from commit 37fa5f8c3976bee2f15ca96a399d03a1dbf470fb) Signed-off-by: Jose Quaresma --- .github/workflows/build-yocto.yml | 2 +- .github/workflows/compile.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-yocto.yml b/.github/workflows/build-yocto.yml index b710c8229..0b3c7a7af 100644 --- a/.github/workflows/build-yocto.yml +++ b/.github/workflows/build-yocto.yml @@ -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:4b210b0be3c887875973c4f4c35470b4ecf3edd2346c9de1bdd33feae5b86e94 # 5.5 jobs: kas-setup: diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 1b15562b8..ecc25a844 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -42,7 +42,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:4b210b0be3c887875973c4f4c35470b4ecf3edd2346c9de1bdd33feae5b86e94 # 5.5 jobs: reusable_compile_job: From 3d0df02f36556c5b3d8dd326f8a61f9bb1bbafe3 Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Fri, 28 Aug 2026 21:36:19 +0100 Subject: [PATCH 2/5] github/workflows: bump KAS_CONTAINER_IMAGE to 5.5-9 for ccache 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 Signed-off-by: Jose Quaresma (cherry picked from commit 588e03d3976c8c3462613d724680bed3b8009e2d) Signed-off-by: Jose Quaresma --- .github/workflows/build-yocto.yml | 2 +- .github/workflows/compile.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-yocto.yml b/.github/workflows/build-yocto.yml index 0b3c7a7af..bd2d73eaf 100644 --- a/.github/workflows/build-yocto.yml +++ b/.github/workflows/build-yocto.yml @@ -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@sha256:4b210b0be3c887875973c4f4c35470b4ecf3edd2346c9de1bdd33feae5b86e94 # 5.5 + KAS_CONTAINER_IMAGE: ghcr.io/siemens/kas/kas@sha256:3f3d3257e8d4ca3adfcb2e0025e6da24339fb8d68a6999ca36c37381351582d5 # 5.5-9-g0555188 jobs: kas-setup: diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index ecc25a844..9d2355738 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -42,7 +42,7 @@ on: env: KAS_CLONE_DEPTH: 1 KAS_CONTAINER: ${{ github.workspace }}/kas-container - KAS_CONTAINER_IMAGE: ghcr.io/siemens/kas/kas@sha256:4b210b0be3c887875973c4f4c35470b4ecf3edd2346c9de1bdd33feae5b86e94 # 5.5 + KAS_CONTAINER_IMAGE: ghcr.io/siemens/kas/kas@sha256:3f3d3257e8d4ca3adfcb2e0025e6da24339fb8d68a6999ca36c37381351582d5 # 5.5-9-g0555188 jobs: reusable_compile_job: From 6d0e084890a2ae7b9a702d948dfe546bb27cc4d9 Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Thu, 13 Aug 2026 19:17:39 +0100 Subject: [PATCH 3/5] ci: add KAS configuration for ccache Store the CCACHE_TOP_DIR inside the state-cache so we can access it from within the kas-container. Signed-off-by: Jose Quaresma (cherry picked from commit 5451b3dbea78682edc0b1d7c1e747fbb663c899c) Signed-off-by: Jose Quaresma --- ci/ccache.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 ci/ccache.yml diff --git a/ci/ccache.yml b/ci/ccache.yml new file mode 100644 index 000000000..a079650c9 --- /dev/null +++ b/ci/ccache.yml @@ -0,0 +1,13 @@ +# 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" From 605a7aeb64279159234bce7758e8852920ff92c3 Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Thu, 13 Aug 2026 19:18:07 +0100 Subject: [PATCH 4/5] ci/ci: enable ccache 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 https://github.com/qualcomm-linux/meta-qcom/issues/1051 Signed-off-by: Jose Quaresma (cherry picked from commit 35458a258f3015ddb9c5f4a8ee1d9776316fec9e) Signed-off-by: Jose Quaresma --- ci/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/ci.yml b/ci/ci.yml index 5dffb4786..c0298213d 100644 --- a/ci/ci.yml +++ b/ci/ci.yml @@ -4,6 +4,7 @@ header: version: 14 includes: - ci/mirror.yml + - ci/ccache.yml local_conf_header: ci: | From 97389cbbb344ba7bdf6419b5b7dc0cf49de27dca Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Fri, 14 Aug 2026 10:19:44 +0100 Subject: [PATCH 5/5] ci/ccache: add table with enabled recipes 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 (cherry picked from commit 365630484461b5927ee7bd4d308efce239bcc88a) Signed-off-by: Jose Quaresma --- ci/ccache.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ci/ccache.yml b/ci/ccache.yml index a079650c9..fb5b732e6 100644 --- a/ci/ccache.yml +++ b/ci/ccache.yml @@ -11,3 +11,21 @@ local_conf_header: # required to build '-native' target HOSTTOOLS += "ccache" ASSUME_PROVIDED += "ccache-native" + + ccache-recipe-contol: | + # disable all recipes + CCACHE_DISABLE = "1" + # 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" + CCACHE_DISABLE:pn-rust-native = "0"