Kaynağa Gözat

Refactor bazel and ccache setup in build workflow

Comment out bazel cache setup and stats, adjust ccache conditions.
jimsterino98 4 ay önce
ebeveyn
işleme
b63b226009
1 değiştirilmiş dosya ile 22 ekleme ve 22 silme
  1. 22 22
      .github/workflows/build.yml

+ 22 - 22
.github/workflows/build.yml

@@ -85,22 +85,22 @@ jobs:
         with:
          branch: ${{ inputs.branch }}
 
-      - name: set up bazel cache dir
-        if: inputs.build_type == 'Bazel' && inputs.cache == 'true'
-        run: |
-          BCACHE_DIR="${{ github.workspace }}/.cache/bazel-disk-kernel"
-          mkdir -p "$BCACHE_DIR"
-          echo "BCACHE_DIR=$BCACHE_DIR" >> $GITHUB_ENV
-
-      - name: set up bazel cache
-        if: inputs.build_type == 'Bazel' && inputs.cache == 'true'
-        uses: actions/cache@v4
-        with:
-         path: ${{ env.BCACHE_DIR }}
-         key: bcache-${{ runner.os }}-${{ inputs.build_type }}-${{ env.BASE_BRANCH }}
-         restore-keys: |
-            bcache-${{ runner.os }}-${{ inputs.build_type }}-${{ env.BASE_BRANCH }}
-            bcache-${{ runner.os }}-${{ inputs.build_type }}-
+#      - name: set up bazel cache dir
+#        if: inputs.build_type == 'Bazel' && inputs.cache == 'true'
+#        run: |
+#          BCACHE_DIR="${{ github.workspace }}/.cache/bazel-disk-kernel"
+#          mkdir -p "$BCACHE_DIR"
+#          echo "BCACHE_DIR=$BCACHE_DIR" >> $GITHUB_ENV
+
+#      - name: set up bazel cache
+#        if: inputs.build_type == 'Bazel' && inputs.cache == 'true'
+#        uses: actions/cache@v4
+#        with:
+#         path: ${{ env.BCACHE_DIR }}
+#         key: bcache-${{ runner.os }}-${{ inputs.build_type }}-${{ env.BASE_BRANCH }}
+#         restore-keys: |
+#            bcache-${{ runner.os }}-${{ inputs.build_type }}-${{ env.BASE_BRANCH }}
+#            bcache-${{ runner.os }}-${{ inputs.build_type }}-
 
       - name: Install ccache
         if: inputs.build_type == 'make' && inputs.cache == 'true'
@@ -140,10 +140,10 @@ jobs:
         uses: actions/cache@v4
         with:
           path: ${{ env.CCACHE_DIR }}
-          key: ccache-${{ runner.os }}-${{ inputs.build_type }}-${{ env.BASE_BRANCH }}
+          key: ccache-${{ runner.os }}-${{ env.BASE_BRANCH }}
           restore-keys: |
-            ccache-${{ runner.os }}-${{ inputs.build_type }}-${{ env.BASE_BRANCH }}
-            ccache-${{ runner.os }}-${{ inputs.build_type }}-
+            ccache-${{ runner.os }}-${{ env.BASE_BRANCH }}
+            ccache-${{ runner.os }}-
             
       - name: Ensure ccache is used
         if: inputs.build_type == 'make' && inputs.cache == 'true'
@@ -266,12 +266,12 @@ jobs:
          android_version: ${{ inputs.android_version }}
          kernel_version: ${{ inputs.kernel_version }}
 
-      - name: ensure bazel cache is used
+      - name: ensure ccache is used on bazel
         if: inputs.build_type == 'Bazel' && inputs.cache == 'true'
         uses: ./.github/actions/use-bazcache
 
       - name: change variables to ccache
-        if: inputs.build_type == 'make' && inputs.cache == 'true'
+        if: inputs.cache == 'true'
         uses: ./.github/actions/use-ccache
 
       - name: Build
@@ -281,7 +281,7 @@ jobs:
          build_type: ${{ inputs.build_type }}
 
       - name: ccache stats
-        if: inputs.cache == 'true' && inputs.build_type == 'make'
+        if: inputs.cache == 'true'
         run: ccache -s -v || ccache -s
 
 #      - name: bazel cache stats