Fix kernel build ccache not being used in CI (#518)

This commit is contained in:
Adeeb Shihadeh
2026-01-31 20:21:30 -08:00
committed by GitHub
parent 46d60babfb
commit 1f23b206bd
2 changed files with 15 additions and 4 deletions
+10 -4
View File
@@ -41,13 +41,19 @@ jobs:
id: kernel-submodule
run: echo "ref=$(git ls-tree HEAD | awk '$4 == "agnos-kernel-sdm845"' | awk '{print $3}')" | tee -a $GITHUB_OUTPUT
- name: ccache
uses: hendrikmuhs/ccache-action@c92f40bee50034e84c763e33b317c77adaa81c92
- name: Restore ccache
uses: actions/cache@v4
with:
key: kernel-${{ steps.kernel-submodule.outputs.ref }}
restore-keys: kernel-
path: .ccache
key: ccache-kernel-${{ steps.kernel-submodule.outputs.ref }}-${{ github.run_id }}
restore-keys: |
ccache-kernel-${{ steps.kernel-submodule.outputs.ref }}-
ccache-kernel-
- name: Build kernel
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_MAXSIZE: 5G
run: ./build_kernel.sh
- name: Update VERSION
+5
View File
@@ -61,6 +61,11 @@ build_kernel() {
# Set ccache dir
export CCACHE_DIR=$DIR/.ccache
# Force ccache usage for kernel build (both target and host compilers)
export PATH="/usr/lib/ccache:$PATH"
export HOSTCC="ccache gcc"
export HOSTCXX="ccache g++"
# Avoid LINUX_COMPILE_HOST to change on every run thus invalidating cache
# https://patchwork.kernel.org/project/linux-kbuild/patch/1302015561-21047-8-git-send-email-mmarek@suse.cz/
export KBUILD_BUILD_HOST="docker"