Jelajahi Sumber

fix: optimize LTS download speed test by increasing parallel jobs and simplifying job matrix

TheWildJames 3 bulan lalu
induk
melakukan
096b99b377
1 mengubah file dengan 18 tambahan dan 24 penghapusan
  1. 18 24
      .github/workflows/lts-download-speed-test.yml

+ 18 - 24
.github/workflows/lts-download-speed-test.yml

@@ -13,27 +13,17 @@ jobs:
     timeout-minutes: 180
     strategy:
       fail-fast: false
-      max-parallel: 5
+      max-parallel: 7
       matrix:
         branch:
+          - android12-5.10-lts
+          - android13-5.10-lts
+          - android13-5.15-lts
+          - android14-5.15-lts
+          - android14-6.1-lts
+          - android15-6.6-lts
           - android16-6.12-lts
-        combo:
-          - name: jobs-checkout-4
-            init: repo init -u https://android.googlesource.com/kernel/manifest -b common-android16-6.12-lts
-            sync: repo sync -c --jobs-checkout=4 -j4
-          - name: jobs-checkout-4-fastfetch
-            init: repo init -u https://android.googlesource.com/kernel/manifest -b common-android16-6.12-lts
-            sync: repo sync -c --jobs-checkout=4 --no-clone-bundle --optimized-fetch -j4
-          - name: fast-fetch-j16
-            init: repo init -u https://android.googlesource.com/kernel/manifest -b common-android16-6.12-lts
-            sync: repo sync -c --no-clone-bundle --optimized-fetch -j16
-          - name: minimal-shallow
-            init: repo init -u https://android.googlesource.com/kernel/manifest -b common-android16-6.12-lts --depth=1
-            sync: repo sync -c --current-branch --no-clone-bundle --no-tags --jobs-checkout=4 -j4
-          - name: force-sync-8
-            init: repo init -u https://android.googlesource.com/kernel/manifest -b common-android16-6.12-lts
-            sync: repo sync -c --no-tags --force-sync --no-clone-bundle --optimized-fetch --retry-fetches=3 --fail-fast -j8
-    name: ${{ matrix.branch }} / ${{ matrix.combo.name }}
+    name: ${{ matrix.branch }} / minimal-shallow
     steps:
       - name: Install repo tool
         shell: bash
@@ -48,20 +38,22 @@ jobs:
         shell: bash
         run: |
           set -euo pipefail
-          workdir="$RUNNER_TEMP/kernel-speed-test/${{ matrix.branch }}/${{ matrix.combo.name }}"
+          workdir="$RUNNER_TEMP/kernel-speed-test/${{ matrix.branch }}/minimal-shallow"
           mkdir -p "$workdir"
           cd "$workdir"
 
-          combo_name="${{ matrix.combo.name }}"
+          combo_name="minimal-shallow"
           result_file="$RUNNER_TEMP/kernel-speed-test-result.json"
 
+          branch="common-${{ matrix.branch }}"
+
           init_start_ns=$(date +%s%N)
           init_status=0
           sync_status=0
           error_message=""
 
           set +e
-          ${{ matrix.combo.init }}
+          repo init -u https://android.googlesource.com/kernel/manifest -b "$branch" --depth=1
           init_status=$?
           set -e
           if [ "$init_status" -ne 0 ]; then
@@ -70,12 +62,14 @@ jobs:
           init_end_ns=$(date +%s%N)
           init_elapsed_ms=$(( (init_end_ns - init_start_ns) / 1000000 ))
 
+          sync_cmd=(repo sync -c --current-branch --no-clone-bundle --no-tags --jobs-checkout=4 -j4)
+
           sync_elapsed_ms=""
           total_elapsed_ms=""
           if [ "$init_status" -eq 0 ]; then
             sync_start_ns=$(date +%s%N)
             set +e
-            timeout 20m ${{ matrix.combo.sync }}
+            timeout 20m "${sync_cmd[@]}"
             sync_status=$?
             set -e
             sync_end_ns=$(date +%s%N)
@@ -93,7 +87,7 @@ jobs:
 
           cat > "$result_file" <<EOF
           {
-            "branch": "${{ matrix.branch }}",
+            "branch": "$branch",
             "profile": "$combo_name",
             "mode": "unset",
             "init_ms": ${init_elapsed_ms},
@@ -110,7 +104,7 @@ jobs:
         if: always()
         uses: actions/upload-artifact@v4
         with:
-          name: benchmark-${{ matrix.branch }}-${{ matrix.combo.name }}
+          name: benchmark-${{ matrix.branch }}-minimal-shallow
           path: ${{ runner.temp }}/kernel-speed-test-result.json
           if-no-files-found: error