[action] Diable cache actions except for the gbs build
authorYongjoo Ahn <yongjoo1.ahn@samsung.com>
Fri, 26 Apr 2024 08:23:30 +0000 (17:23 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Tue, 30 Apr 2024 02:26:53 +0000 (11:26 +0900)
- Saving cache in each PR consumes too much space.
- To utilize the cache, we need to update each cache in main branch periodically.
  Before introducing such action, disable cache for a while.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
.github/workflows/android.yml
.github/workflows/pdebuild.yml
.github/workflows/yocto.yml

index c9170ee..973fe61 100644 (file)
@@ -25,18 +25,7 @@ jobs:
         rebuild=`bash .github/workflows/check_if_rebuild_requires.sh ${tmpfile} android | grep "REBUILD=YES" | wc -l`
         echo "Rebuild required: ${rebuild}"
         echo "rebuild=${rebuild}" >> "$GITHUB_ENV"
-    - name: make cache key
-      if: env.rebuild == '1'
-      id: make-key
-      run: echo "cache_key=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
-      shell: bash
-    - name: cache GST root
-      id: cache-gbs-root
-      if: env.rebuild == '1'
-      uses: actions/cache@v3
-      with:
-        path: ~/android
-        key: ${{ steps.make-key.outputs.cache_key }}
+    ## @todo Make cache works (daily update cache on main branch / restore the cache on each PR (w/o saving))
     - name: Prepare Build
       if: env.rebuild == '1'
       run: |
index a7ec4f7..b6ed732 100644 (file)
@@ -55,23 +55,7 @@ jobs:
         echo "Rebuild required: ${rebuild}"
         echo "rebuild=${rebuild}" >> "$GITHUB_ENV"
     - uses: actions/setup-python@v1
-    - name: make cache dir for pbuilder
-      ## prevent permission error
-      run: sudo mkdir --mode a=rwx --parents /var/cache/pbuilder
-    - name: make cache key
-      if: env.rebuild == '1'
-      id: make-key
-      run: echo "cache_key=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
-      shell: bash
-    - name: cache pbuilder cache
-      id: cache-pbuilder
-      if: env.rebuild == '1'
-      uses: actions/cache@v3
-      with:
-        path: |
-          /var/cache/pbuilder/aptcache
-          /var/cache/pbuilder/base.tgz
-        key: ${{ steps.make-key.outputs.cache_key }}
+    ## @todo Make cache works (daily update cache on main branch / restore the cache on each PR (w/o saving))
     - name: prepare pdebuild
       if: env.rebuild == '1'
       run: |
@@ -86,7 +70,6 @@ jobs:
         sudo mkdir -p /root/
         sudo ln -s ~/.pbuilderrc /root/
     - name: make pbuilder base.tgz
-      if: steps.cache-pbuilder.outputs.cache-hit != 'true'
       run: |
         echo "=== pbuilder create"
         echo "::group::pbuilder create --allow-untrusted"
index 6732fca..ae5f817 100644 (file)
@@ -22,18 +22,7 @@ jobs:
         rebuild=`bash .github/workflows/check_if_rebuild_requires.sh ${tmpfile} build | grep "REBUILD=YES" | wc -l`
         echo "Rebuild required: ${rebuild}"
         echo "rebuild=${rebuild}" >> "$GITHUB_ENV"
-    - name: make cache key
-      if: env.rebuild == '1'
-      id: make-key
-      run: echo "cache_key=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
-      shell: bash
-    - name: cache Yocto SDK
-      id: cache-gbs-root
-      if: env.rebuild == '1'
-      uses: actions/cache@v3
-      with:
-        path: ~/poky_sdk/
-        key: ${{ steps.make-key.outputs.cache_key }}
+    ## @todo Make cache works (daily update cache on main branch / restore the cache on each PR (not saving))
     - name: Prepare build
       if: env.rebuild == '1'
       run: |