Просмотр исходного кода

feat(workflows): add download-dependencies job and update kernel build jobs to depend on it

TheWildJames 7 месяцев назад
Родитель
Сommit
2567193734
2 измененных файлов с 16 добавлено и 7 удалено
  1. 0 7
      .github/workflows/build.yml
  2. 16 0
      .github/workflows/main.yml

+ 0 - 7
.github/workflows/build.yml

@@ -32,15 +32,8 @@ on:
         type: boolean
 
 jobs:
-  download-dependencies:
-    uses: ./.github/workflows/cache-dependencies.yml
-    permissions:
-      contents: read
-      actions: write
-
   build-gki:
     name: "${{ inputs.kernel_version }}.${{ inputs.sub_level }}-${{ inputs.android_version }}-${{ inputs.os_patch_level }}-${{ matrix.build_type }}"
-    needs: download-dependencies
     runs-on: ubuntu-latest
     timeout-minutes: 60
     strategy:

+ 16 - 0
.github/workflows/main.yml

@@ -50,8 +50,15 @@ on:
   push:
 
 jobs:
+  download-dependencies:
+    uses: ./.github/workflows/cache-dependencies.yml
+    permissions:
+      contents: read
+      actions: write
+
   build-a12-5-10:
     if: ${{ inputs.kernel_build_version == 'all' || inputs.kernel_build_version == 'a12-5-10' }}
+    needs: [download-dependencies]
     uses: ./.github/workflows/kernel-a12-5-10.yml
     secrets: inherit
     with:
@@ -61,6 +68,7 @@ jobs:
 
   build-a13-5-10:
     if: ${{ inputs.kernel_build_version == 'all' || inputs.kernel_build_version == 'a13-5-10' }}
+    needs: [download-dependencies]
     uses: ./.github/workflows/kernel-a13-5-10.yml
     secrets: inherit
     with:
@@ -70,6 +78,7 @@ jobs:
 
   build-a13-5-15:
     if: ${{ inputs.kernel_build_version == 'all' || inputs.kernel_build_version == 'a13-5-15' }}
+    needs: [download-dependencies]
     uses: ./.github/workflows/kernel-a13-5-15.yml
     secrets: inherit
     with:
@@ -79,6 +88,7 @@ jobs:
 
   build-a14-5-15:
     if: ${{ inputs.kernel_build_version == 'all' || inputs.kernel_build_version == 'a14-5-15' }}
+    needs: [download-dependencies]
     uses: ./.github/workflows/kernel-a14-5-15.yml
     secrets: inherit
     with:
@@ -88,6 +98,7 @@ jobs:
 
   build-a14-6-1:
     if: ${{ inputs.kernel_build_version == 'all' || inputs.kernel_build_version == 'a14-6-1' }}
+    needs: [download-dependencies]
     uses: ./.github/workflows/kernel-a14-6-1.yml
     secrets: inherit
     with:
@@ -97,6 +108,7 @@ jobs:
 
   build-a15-6-6:
     if: ${{ inputs.kernel_build_version == 'all' || inputs.kernel_build_version == 'a15-6-6' }}
+    needs: [download-dependencies]
     uses: ./.github/workflows/kernel-a15-6-6.yml
     secrets: inherit
     with:
@@ -106,6 +118,7 @@ jobs:
 
   build-a16-6-12:
     if: ${{ inputs.kernel_build_version == 'all' || inputs.kernel_build_version == 'a16-6-12' }}
+    needs: [download-dependencies]
     uses: ./.github/workflows/kernel-a16-6-12.yml
     secrets: inherit
     with:
@@ -115,6 +128,7 @@ jobs:
   
   build-lts:
     if: ${{ inputs.kernel_build_version == 'all' || inputs.kernel_build_version == 'lts' || github.event_name == 'push' }}
+    needs: [download-dependencies]
     uses: ./.github/workflows/kernel-lts.yml
     secrets: inherit
     with:
@@ -124,6 +138,7 @@ jobs:
 
   build-custom:
     if: ${{ inputs.kernel_build_version == 'all' || inputs.kernel_build_version == 'custom' }}
+    needs: [download-dependencies]
     uses: ./.github/workflows/kernel-custom.yml
     secrets: inherit
     with:
@@ -133,6 +148,7 @@ jobs:
 
   build-testing:
     if: ${{ inputs.kernel_build_version == 'all' || inputs.kernel_build_version == 'testing' || github.event_name == 'push' }}
+    needs: [download-dependencies]
     uses: ./.github/workflows/kernel-testing.yml
     secrets: inherit
     with: