Browse Source

fix: remove all LTO ld cache code from actions

- Remove Setup ld cache step from cache-setup/action.yml (removes ld-wrapper creation)
- Remove ld_cache atime update and folder stats from cache-stats/action.yml
- Remove LD=ld-wrapper and HOSTLD=ld-wrapper from build-kernel/action.yml
TheWildJames 2 months ago
parent
commit
0e8c07bb36

+ 1 - 3
.github/actions/build-kernel/action.yml

@@ -58,9 +58,7 @@ runs:
         CC="/usr/bin/ccache clang" \
         CXX="/usr/bin/ccache clang+" \
         HOSTCC="/usr/bin/ccache clang" \
-        HOSTCXX="/usr/bin/ccache clang+" \
-        LD="${{ github.workspace }}/kernel/common/ld-wrapper" \
-        HOSTLD="${{ github.workspace }}/kernel/common/ld-wrapper"
+        HOSTCXX="/usr/bin/ccache clang+"
       else
         if [[ ${{ inputs.version }} == "android16-6.12" ]]; then
           if [ "${{ inputs.bypass }}" = "false" ]; then

+ 0 - 39
.github/actions/cache-setup/action.yml

@@ -164,42 +164,3 @@ runs:
         echo "BAZEL_CACHE_DIR: $BAZEL_CACHE_DIR"
         echo "🔍 DEBUG: Setup Bazel Cache complete"
 
-    - name: Setup ld cache
-      shell: bash
-      working-directory: ${{ github.workspace }}
-      run: |
-        set -euo pipefail
-        echo "🔍 DEBUG: Setup ld cache started"
-        export LDCACHE_DIR="/home/runner/.ld_cache"
-        echo "🔍 DEBUG: LDCACHE_DIR=$LDCACHE_DIR"
-        echo "LDCACHE_DIR=$LDCACHE_DIR" >> $GITHUB_ENV
-        mkdir -p "$LDCACHE_DIR"
-        echo "🔍 DEBUG: Created ld cache directory"
-        echo "🔍 DEBUG: LDCACHE_DIR contents: $(ls -la $LDCACHE_DIR 2>/dev/null | head -5 || echo 'empty')"
-      
-        # Create LD wrapper for thin-LTO caching
-        echo "🔍 DEBUG: Creating LD wrapper script at ${{ github.workspace }}/kernel/common/ld-wrapper"
-        cat > "${{ github.workspace }}/kernel/common/ld-wrapper" << 'EOF'
-        #!/bin/bash
-        ld.lld "$@" --thinlto-cache-dir="$LDCACHE_DIR" --thinlto-jobs="$(nproc --all)"
-        EOF
-        chmod +x "${{ github.workspace }}/kernel/common/ld-wrapper"
-        echo "🔍 DEBUG: LD wrapper created and made executable"
-
-        # Verify LD wrapper exists
-        if [ -f "${{ github.workspace }}/kernel/common/ld-wrapper" ]; then
-          echo "🔍 DEBUG: LD wrapper verified at ${{ github.workspace }}/kernel/common/ld-wrapper"
-          echo "🔍 DEBUG: LD wrapper contents:"
-          cat "${{ github.workspace }}/kernel/common/ld-wrapper"
-        else
-          echo "🔍 DEBUG: WARNING - LD wrapper not found after creation!"
-        fi
-
-        # Set size limit via environment (4GB)
-        echo "LDCACHE_MAX_SIZE=4294967296" >> "$GITHUB_ENV"
-        echo "🔍 DEBUG: LDCACHE_MAX_SIZE=4294967296 set"
-
-        echo "✅ LD Cache ready (max 4GB)"
-        echo "🔍 DEBUG: LDCACHE_DIR=$LDCACHE_DIR"
-        echo "LDCACHE_DIR: $LDCACHE_DIR"
-        echo "🔍 DEBUG: Setup ld cache complete"

+ 0 - 27
.github/actions/cache-stats/action.yml

@@ -154,17 +154,6 @@ runs:
             echo "🔍 DEBUG: Skipping ccache atime update (directory empty or missing)"
           fi
           
-          echo "🔍 DEBUG: Checking if ld_cache directory needs atime update"
-          if [ -d /home/runner/.ld_cache ] && find /home/runner/.ld_cache -type f -print -quit 2>/dev/null | grep -q .; then
-            echo "🔍 DEBUG: ld_cache directory has files, updating atime"
-            echo "Updating LTO cache atime to prevent cache eviction..."
-            echo "🔍 DEBUG: Executing find touch command for ld_cache files"
-            find /home/runner/.ld_cache -type f -exec touch -t $(date -d "1 day ago" +%Y%m%d%H%M) {} +
-            echo "✅ LTO cache atime updated"
-            echo "🔍 DEBUG: LTO cache atime update completed"
-          else
-            echo "🔍 DEBUG: Skipping ld_cache atime update (directory empty or missing)"
-          fi
         else
           echo "🔍 DEBUG: clear_stats is false, keeping ccache stats for next run"
           echo "Keeping ccache stats for next run"
@@ -205,20 +194,4 @@ runs:
         summarize_dir /home/runner/.cache/bazel 10 5 || true
         echo "🔍 DEBUG: Bazel cache folder stats section complete"
         
-    - name: Show ld cache folder Stats
-      shell: bash
-      working-directory: ${{ github.workspace }}
-      run: |
-        set -euo pipefail
-        echo "🔍 DEBUG: ld cache folder stats section started"
-        # shellcheck disable=SC1091
-        source /tmp/cache_summary.sh
-        echo "🔍 DEBUG: cache_summary.sh loaded successfully"
-
-        echo "🔍 DEBUG: Calling summarize_dir for /home/runner/.ld_cache with top_n=10, sub_n=5"
-        echo "================="
-        echo "=== .ld_cache ==="
-        echo "================="
-        summarize_dir /home/runner/.ld_cache 10 5 || true
-        echo "🔍 DEBUG: ld cache folder stats section complete"
         echo "🔍 DEBUG: cache-stats action finished successfully"