Archived
Public Access
Speed up kernel CI: ccache depend mode, drop pahole deps, no module compression
- ccache: enable depend mode (skip the preprocessor on ~75k compiler calls) and add BASEDIR/NOHASHDIR/SLOPPINESS as insurance against false misses from build-path or build-macro churn. ccache -s already shows 99.99% direct hits, so this trims per-call overhead, not a broken cache. MAXSIZE stays 8G (only ~1G used). - deps: drop dwarves + libdw-dev. pahole only runs with CONFIG_DEBUG_INFO_BTF, but the build forces DEBUG_INFO_NONE, so they were never used. - config: disable MODULE_COMPRESS/MODULE_DECOMPRESS for both arches. arm64 alone shipped zstd module compression, running a zstd pass over ~8000 .ko every build for no gain (the .deb is already compressed by KDEB_COMPRESS); x86_64 never did. Keeps the two arches in sync. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -129,12 +129,15 @@ jobs:
|
||||
if: env.BUILD_NEEDED == 'true'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
# dwarves/libdw-dev (pahole) are intentionally absent: the build sets
|
||||
# CONFIG_DEBUG_INFO_NONE=y and DEBUG_INFO_BTF=n (see prepare-kernel-config.sh),
|
||||
# so pahole never runs. Re-add them if BTF is ever enabled.
|
||||
sudo apt-get install -y \
|
||||
git build-essential \
|
||||
libncurses-dev libssl-dev libelf-dev \
|
||||
bison bc flex rsync debhelper \
|
||||
dpkg-dev fakeroot kmod cpio dwarves \
|
||||
libdw-dev lz4 zstd xz-utils curl jq
|
||||
dpkg-dev fakeroot kmod cpio \
|
||||
lz4 zstd xz-utils curl jq
|
||||
|
||||
- name: 安装 ARM64 交叉编译工具链
|
||||
if: env.BUILD_NEEDED == 'true' && matrix.arch == 'arm64'
|
||||
@@ -159,6 +162,19 @@ jobs:
|
||||
echo "CCACHE_DIR=$HOME/.ccache"
|
||||
echo "CCACHE_MAXSIZE=8G"
|
||||
echo "CCACHE_COMPRESS=1"
|
||||
# depend mode: hash the source + its -MD/-MMD header list instead of
|
||||
# running the preprocessor on every one of ~75k compiler calls. The
|
||||
# kernel always emits dependency files, so this is safe and trims the
|
||||
# per-call overhead on both hits and misses.
|
||||
echo "CCACHE_DEPEND=1"
|
||||
# Insurance against false misses if the build path or build-time macros
|
||||
# ever vary between runs (the source is re-cloned fresh each time).
|
||||
# BASEDIR must be an ancestor of the build CWD (./kernel/linux).
|
||||
# With the path already stable these are near no-ops, but they cost
|
||||
# nothing and guard against a path/macro change silently going cold.
|
||||
echo "CCACHE_BASEDIR=$GITHUB_WORKSPACE/kernel"
|
||||
echo "CCACHE_NOHASHDIR=1"
|
||||
echo "CCACHE_SLOPPINESS=time_macros,file_macros,locale,pch_defines"
|
||||
} >> "$GITHUB_ENV"
|
||||
|
||||
- name: 恢复 ccache 缓存
|
||||
|
||||
Reference in New Issue
Block a user