|
@@ -188,7 +188,8 @@ jobs:
|
|
|
grep -n 'vm_flags_clear' ${{ github.workspace }}/kernel/common/mm/mmap.c || echo 'Not found'
|
|
grep -n 'vm_flags_clear' ${{ github.workspace }}/kernel/common/mm/mmap.c || echo 'Not found'
|
|
|
|
|
|
|
|
|
|
|
|
|
- - name: Restore build caches (ccache, Bazel)
|
|
|
|
|
|
|
+ - name: Restore build caches (ccache)
|
|
|
|
|
+ id: restore-ccache
|
|
|
uses: ./.github/actions/restore-cache
|
|
uses: ./.github/actions/restore-cache
|
|
|
with:
|
|
with:
|
|
|
cache_path: ${{ github.workspace }}/.ccache
|
|
cache_path: ${{ github.workspace }}/.ccache
|
|
@@ -198,7 +199,16 @@ jobs:
|
|
|
restore_keys: |
|
|
restore_keys: |
|
|
|
buildcache-
|
|
buildcache-
|
|
|
|
|
|
|
|
- - name: Restore build caches (ccache, Bazel)
|
|
|
|
|
|
|
+ - name: Check ccache hit
|
|
|
|
|
+ run: |
|
|
|
|
|
+ if [ "${{ steps.restore-ccache.outputs.cache-hit }}" = "true" ]; then
|
|
|
|
|
+ echo "✅ ccache HIT - Key: ${{ steps.restore-ccache.outputs.cache-key }} - Size: ${{ steps.restore-ccache.outputs.cache-size }}"
|
|
|
|
|
+ else
|
|
|
|
|
+ echo "❌ ccache MISS - Fresh build"
|
|
|
|
|
+ fi
|
|
|
|
|
+
|
|
|
|
|
+ - name: Restore build caches (LTO/ld_cache)
|
|
|
|
|
+ id: restore-ldcache
|
|
|
uses: ./.github/actions/restore-cache
|
|
uses: ./.github/actions/restore-cache
|
|
|
with:
|
|
with:
|
|
|
cache_path: ${{ github.workspace }}/.ld_cache
|
|
cache_path: ${{ github.workspace }}/.ld_cache
|
|
@@ -208,12 +218,57 @@ jobs:
|
|
|
restore_keys: |
|
|
restore_keys: |
|
|
|
buildcache-
|
|
buildcache-
|
|
|
|
|
|
|
|
|
|
+ - name: Check ld_cache hit
|
|
|
|
|
+ run: |
|
|
|
|
|
+ if [ "${{ steps.restore-ldcache.outputs.cache-hit }}" = "true" ]; then
|
|
|
|
|
+ echo "✅ ld_cache HIT - Key: ${{ steps.restore-ldcache.outputs.cache-key }} - Size: ${{ steps.restore-ldcache.outputs.cache-size }}"
|
|
|
|
|
+ else
|
|
|
|
|
+ echo "❌ ld_cache MISS - Fresh build"
|
|
|
|
|
+ fi
|
|
|
|
|
+
|
|
|
|
|
+ - name: Pre-build cache stats
|
|
|
|
|
+ id: pre-cache-stats
|
|
|
|
|
+ run: |
|
|
|
|
|
+ set -euo pipefail
|
|
|
|
|
+ stats=$(ccache -s || true)
|
|
|
|
|
+ pre_hits=$(echo "$stats" | awk '/cache hit/ {h+=$NF} END{print (h+0)}')
|
|
|
|
|
+ pre_misses=$(echo "$stats" | awk '/cache miss/ {m+=$NF} END{print (m+0)}')
|
|
|
|
|
+ echo "pre_hits=$pre_hits" >> $GITHUB_OUTPUT
|
|
|
|
|
+ echo "pre_misses=$pre_misses" >> $GITHUB_OUTPUT
|
|
|
|
|
+ pre_ld_size=$(du -sh "$GITHUB_WORKSPACE/.ld_cache" 2>/dev/null | awk '{print $1}' || echo "0B")
|
|
|
|
|
+ pre_ld_files=$(find "$GITHUB_WORKSPACE/.ld_cache" -type f 2>/dev/null | wc -l || true)
|
|
|
|
|
+ echo "pre_ld_size=$pre_ld_size" >> $GITHUB_OUTPUT
|
|
|
|
|
+ echo "pre_ld_files=$pre_ld_files" >> $GITHUB_OUTPUT
|
|
|
|
|
+
|
|
|
- name: Build Kernel
|
|
- name: Build Kernel
|
|
|
env:
|
|
env:
|
|
|
SOURCE_DATE_EPOCH: ${{ env.SOURCE_DATE_EPOCH }}
|
|
SOURCE_DATE_EPOCH: ${{ env.SOURCE_DATE_EPOCH }}
|
|
|
KBUILD_BUILD_TIMESTAMP: ${{ env.KBUILD_BUILD_TIMESTAMP }}
|
|
KBUILD_BUILD_TIMESTAMP: ${{ env.KBUILD_BUILD_TIMESTAMP }}
|
|
|
uses: ./.github/actions/build-kernel
|
|
uses: ./.github/actions/build-kernel
|
|
|
|
|
|
|
|
|
|
+ - name: Post-build cache stats
|
|
|
|
|
+ id: post-cache-stats
|
|
|
|
|
+ run: |
|
|
|
|
|
+ set -euo pipefail
|
|
|
|
|
+ stats=$(ccache -s || true)
|
|
|
|
|
+ post_hits=$(echo "$stats" | awk '/cache hit/ {h+=$NF} END{print (h+0)}')
|
|
|
|
|
+ post_misses=$(echo "$stats" | awk '/cache miss/ {m+=$NF} END{print (m+0)}')
|
|
|
|
|
+ pre_hits=${{ steps.pre-cache-stats.outputs.pre_hits }}
|
|
|
|
|
+ pre_misses=${{ steps.pre-cache-stats.outputs.pre_misses }}
|
|
|
|
|
+ delta_hits=$((post_hits - pre_hits)) || true
|
|
|
|
|
+ delta_misses=$((post_misses - pre_misses)) || true
|
|
|
|
|
+ delta_total=$((delta_hits + delta_misses))
|
|
|
|
|
+ if [ "$delta_total" -gt 0 ]; then
|
|
|
|
|
+ percent=$(( delta_hits * 100 / delta_total ))
|
|
|
|
|
+ echo "ccache hit during build: ${percent}% (${delta_hits} hits / ${delta_total} accesses)"
|
|
|
|
|
+ else
|
|
|
|
|
+ echo "No compiler activity detected (no ccache accesses)."
|
|
|
|
|
+ fi
|
|
|
|
|
+ post_ld_size=$(du -sh "$GITHUB_WORKSPACE/.ld_cache" 2>/dev/null | awk '{print $1}' || echo "0B")
|
|
|
|
|
+ post_ld_files=$(find "$GITHUB_WORKSPACE/.ld_cache" -type f 2>/dev/null | wc -l || true)
|
|
|
|
|
+ echo "ld_cache size before: ${{ steps.pre-cache-stats.outputs.pre_ld_size }}, after: $post_ld_size"
|
|
|
|
|
+ echo "ld_cache files before: ${{ steps.pre-cache-stats.outputs.pre_ld_files }}, after: $post_ld_files"
|
|
|
|
|
+
|
|
|
- name: List cache contents
|
|
- name: List cache contents
|
|
|
working-directory: ${{ github.workspace }}
|
|
working-directory: ${{ github.workspace }}
|
|
|
run: |
|
|
run: |
|