Преглед изворни кода

refactor: merge build summary + verified metadata into one -BuildInfo artifact

Replace the separate human-readable *-Summary and machine *-Metadata
artifacts with a single <target>-BuildInfo markdown that contains the
summary table plus an embedded, validated JSON metadata block. Remove the
dedicated summary job in main.yml (download *-Summary -> GITHUB_STEP_SUMMARY
-> delete artifacts) since there is no longer a separate summary artifact
to consolidate. Docs updated.
TheWildJames пре 2 недеља
родитељ
комит
0174308b83
3 измењених фајлова са 26 додато и 116 уклоњено
  1. 18 15
      .github/workflows/build.yml
  2. 0 94
      .github/workflows/main.yml
  3. 8 7
      docs/ROOT_VARIANTS.md

+ 18 - 15
.github/workflows/build.yml

@@ -572,15 +572,6 @@ jobs:
           fi
           fi
         } > "$SUMMARY_FILE"
         } > "$SUMMARY_FILE"
 
 
-    - name: Upload Build Summary Artifact
-      if: ${{ always() }}
-      uses: actions/upload-artifact@v7
-      with:
-        name: ${{ env.SUMMARY_BASE }}-Summary
-        path: /tmp/build-summary-${{ env.SUMMARY_BASE }}.md
-        if-no-files-found: ignore
-        compression-level: 9
-
     - name: Upload Artifacts
     - name: Upload Artifacts
       id: kernel-artifact
       id: kernel-artifact
       uses: actions/upload-artifact@v7
       uses: actions/upload-artifact@v7
@@ -598,7 +589,8 @@ jobs:
       run: |
       run: |
         set -euo pipefail
         set -euo pipefail
 
 
-        metadata_file="${{ github.workspace }}/${{ steps.extract.outputs.file_name }}-metadata.json"
+        metadata_file="/tmp/${SUMMARY_BASE}-metadata.json"
+        summary_file="/tmp/build-summary-${SUMMARY_BASE}.md"
         artifacts_api="${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/artifacts?per_page=100"
         artifacts_api="${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/artifacts?per_page=100"
 
 
         resolve_artifact() {
         resolve_artifact() {
@@ -714,11 +706,22 @@ jobs:
           .catalog.boot == "not-guaranteed"
           .catalog.boot == "not-guaranteed"
         ' "$metadata_file" > /dev/null
         ' "$metadata_file" > /dev/null
 
 
-    - name: Upload Build-verified only artifact metadata
-      if: ${{ success() && inputs.root_flavor != '' && inputs.nomount_commit != '' }}
+        # Merge the verified metadata into the combined summary markdown so both
+        # live in a single artifact: human-readable table + machine JSON block.
+        {
+          echo
+          echo "## Verified Metadata"
+          echo
+          echo '```json'
+          cat "$metadata_file"
+          echo '```'
+          echo
+        } >> "$summary_file"
+
+    - name: Upload Build Summary + Metadata
       uses: actions/upload-artifact@v7
       uses: actions/upload-artifact@v7
       with:
       with:
-        name: ${{ steps.extract.outputs.file_name }}-Metadata
-        path: ${{ github.workspace }}/${{ steps.extract.outputs.file_name }}-metadata.json
-        if-no-files-found: error
+        name: ${{ steps.extract.outputs.file_name }}-BuildInfo
+        path: /tmp/build-summary-${{ env.SUMMARY_BASE }}.md
+        if-no-files-found: warn
         compression-level: 9
         compression-level: 9

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

@@ -913,100 +913,6 @@ jobs:
         path: AIO-REJ.zip
         path: AIO-REJ.zip
         if-no-files-found: ignore
         if-no-files-found: ignore
 
 
-  summary:
-    if: ${{ !inputs.test_release_notes && always() }}
-    runs-on: ubuntu-latest
-    permissions:
-      actions: write
-      contents: read
-    needs:
-    - resolve-sources
-    - build-android12-5-10
-    - build-android13-5-10
-    - build-android13-5-15
-    - build-android14-5-15
-    - build-android14-6-1
-    - build-android15-6-6
-    - build-android16-6-12
-
-    steps:
-    - name: Download All Build Summaries
-      uses: actions/download-artifact@v7
-      with:
-        path: ./summaries
-        pattern: '*-Summary'
-        merge-multiple: true
-
-    - name: 📋 Workflow Build Summary
-      run: |
-        {
-          echo "# 📋 Build Summary — $(date -u '+%Y-%m-%d %H:%M UTC')"
-          echo
-          echo "**Feature Set:** ${{ needs.resolve-sources.outputs.feature_set }}"
-          echo "**Root Flavor:** ${{ inputs.root_flavor || 'none' }}"
-          echo "**Brand:** ${{ inputs.brand_name || 'Wild' }}"
-          echo
-          
-          # Count successes and failures
-          SUCCESS_COUNT=0
-          FAIL_COUNT=0
-          
-          # Sort summaries so they appear in a consistent order
-          for f in ./summaries/*.md; do
-            [ -f "$f" ] || continue
-            if grep -q "✅ Success" "$f"; then
-              SUCCESS_COUNT=$((SUCCESS_COUNT + 1))
-            else
-              FAIL_COUNT=$((FAIL_COUNT + 1))
-            fi
-          done
-          
-          TOTAL=$((SUCCESS_COUNT + FAIL_COUNT))
-          echo "**Results:** ${SUCCESS_COUNT}/${TOTAL} succeeded"
-          if [ "$FAIL_COUNT" -gt 0 ]; then
-            echo "  - ❌ ${FAIL_COUNT} failed"
-          fi
-          echo
-          echo "---"
-          echo
-          
-          # Output each summary
-          for f in ./summaries/*.md; do
-            [ -f "$f" ] || continue
-            cat "$f"
-            echo
-            echo "---"
-            echo
-          done
-          
-          echo
-          echo "> **SUSFS Commits:**"
-          echo "> - android12-5.10: ${{ needs.resolve-sources.outputs.susfs_commit_android12_5_10 }}"
-          echo "> - android13-5.10: ${{ needs.resolve-sources.outputs.susfs_commit_android13_5_10 }}"
-          echo "> - android13-5.15: ${{ needs.resolve-sources.outputs.susfs_commit_android13_5_15 }}"
-          echo "> - android14-5.15: ${{ needs.resolve-sources.outputs.susfs_commit_android14_5_15 }}"
-          echo "> - android14-6.1: ${{ needs.resolve-sources.outputs.susfs_commit_android14_6_1 }}"
-          echo "> - android15-6.6: ${{ needs.resolve-sources.outputs.susfs_commit_android15_6_6 }}"
-          echo "> - android16-6.12: ${{ needs.resolve-sources.outputs.susfs_commit_android16_6_12 }}"
-        } >> "$GITHUB_STEP_SUMMARY"
-
-    - name: 🧹 Cleanup Summary Files
-      if: ${{ always() }}
-      run: rm -rf ./summaries
-
-    - name: 🧹 Delete Summary Artifacts
-      if: ${{ always() }}
-      env:
-        GH_TOKEN: ${{ github.token }}
-      run: |
-        # Delete all *-Summary artifacts from this run since they're now consolidated
-        RUN_ID="${{ github.run_id }}"
-        ARTIFACTS=$(gh api "repos/${{ github.repository }}/actions/runs/${RUN_ID}/artifacts" --jq '.artifacts[] | select(.name | endswith("-Summary")) | .id')
-        for id in $ARTIFACTS; do
-          echo "Deleting summary artifact id=$id"
-          gh api -X DELETE "repos/${{ github.repository }}/actions/artifacts/${id}" || true
-        done
-
   release:
   release:
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
     if: ${{ github.event_name == 'workflow_dispatch' && !inputs.test_release_notes && (inputs.release_type == 'Pre-Release' || inputs.release_type == 'Release') }}
     if: ${{ github.event_name == 'workflow_dispatch' && !inputs.test_release_notes && (inputs.release_type == 'Pre-Release' || inputs.release_type == 'Release') }}

+ 8 - 7
docs/ROOT_VARIANTS.md

@@ -36,13 +36,14 @@ releases, or claim device compatibility.
 
 
 ## Build-verified only artifact metadata
 ## Build-verified only artifact metadata
 
 
-Successful builds upload a `<target>-Metadata` artifact containing
-machine-readable JSON. Its `status` is **`Build-verified only`** only after the
-corresponding AnyKernel3 and NoMount metamodule artifacts are uploaded and their
-GitHub Actions API URLs and GitHub-issued `sha256` digests are recorded. Each
-record also includes the build method, root implementation/manager/version and
-commit, SUSFS and NoMount revisions, Android branch/KMI, kernel source commit,
-and provenance run URL.
+Successful builds upload a single `<target>-BuildInfo` artifact combining a
+human-readable summary table with an embedded machine-readable JSON block. The
+JSON `status` is **`Build-verified only`** only after the corresponding
+AnyKernel3 and NoMount metamodule artifacts are uploaded and their GitHub
+Actions API URLs and GitHub-issued `sha256` digests are recorded. Each record
+also includes the build method, root implementation/manager/version and commit,
+SUSFS and NoMount revisions, Android branch/KMI, kernel source commit, and
+provenance run URL.
 
 
 NoMount integration invokes the upstream `kernel/setup.sh` by its full immutable
 NoMount integration invokes the upstream `kernel/setup.sh` by its full immutable
 commit URL and passes that same SHA as the script argument. Each kernel artifact
 commit URL and passes that same SHA as the script argument. Each kernel artifact