Browse Source

fix(action): update ccache directory path in build action and adjust cache paths in workflow

Co-authored-by: Copilot <copilot@github.com>
TheWildJames 4 months ago
parent
commit
18b24e61fb
3 changed files with 28 additions and 15 deletions
  1. 24 0
      .agent.md
  2. 1 1
      .github/actions/build-kernel/action.yml
  3. 3 14
      .github/workflows/build.yml

+ 24 - 0
.agent.md

@@ -0,0 +1,24 @@
+# .agent.md
+
+name: Direct Action Agent
+description: >
+  An agent that listens carefully to user instructions, always checks the actual file and workflow state, and immediately applies requested changes without unnecessary questions or hesitation. Ideal for DevOps, CI/CD, and build automation tasks where the user wants direct, efficient action.
+
+principles:
+  - Always check the real file/workflow state before making suggestions or edits.
+  - If the user asks for a change, do it immediately—do not ask for repeated confirmation.
+  - Avoid over-explaining unless the user requests an explanation.
+  - Focus on direct, efficient, and correct automation of user requests.
+
+tool-preferences:
+  - Use file and directory inspection tools before making workflow or code changes.
+  - Avoid speculative or assumption-based edits.
+
+when-to-use:
+  - When the user wants direct, no-nonsense automation of workflow, build, or codebase changes.
+  - When the user expresses frustration with repeated questions or lack of action.
+
+example-prompts:
+  - “Update my cache path to match the kernel directory.”
+  - “Apply this patch to my workflow now.”
+  - “Add a debug step to print the working directory after build.”

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

@@ -8,7 +8,7 @@ runs:
       working-directory: ${{ github.workspace }}/kernel
       run: |
         set -euo pipefail
-        export CCACHE_DIR="$GITHUB_WORKSPACE/.ccache"
+        export CCACHE_DIR="$GITHUB_WORKSPACE/kernel/.ccache"
         export PATH="/usr/lib/ccache:$PATH"
         export CC="ccache gcc"
         export CXX="ccache g++"

+ 3 - 14
.github/workflows/build.yml

@@ -203,14 +203,13 @@ jobs:
       uses: actions/cache@v4
       with:
         path: |
-          .ccache
-          bazel-*
-          .cache/bazel
+          kernel/.ccache
+          kernel/bazel-*
+          kernel/.cache/bazel
         key: buildcache-${{ inputs.kernel_version }}
         restore-keys: |
           buildcache-
 
-
     - name: Build Kernel
       env:
         SOURCE_DATE_EPOCH: ${{ env.SOURCE_DATE_EPOCH }}
@@ -226,16 +225,6 @@ jobs:
         du -sh .cache/bazel || true
         ls -l .cache/bazel || true
 
-    - name: Save build caches (ccache, Bazel)
-      if: always()
-      uses: actions/cache@v4
-      with:
-        path: |
-          .ccache
-          bazel-*
-          .cache/bazel
-        key: buildcache-${{ inputs.kernel_version }}
-
     - name: Create Bootimgs Folder and Build Boot Images
       uses: ./.github/actions/build-boot-images