|
43 | 43 | description: 'Clean build (no ccache)' |
44 | 44 | type: boolean |
45 | 45 | default: false |
46 | | - susfs_config: |
47 | | - description: 'SUSFS config (JSON format, blank=all "next". Examples in README)' |
| 46 | + android12-5_10_susfs_branch_or_commit: |
| 47 | + description: 'Enter SusFS Branch or commit hash for android12-5.10' |
| 48 | + type: string |
| 49 | + default: '' |
| 50 | + android13-5_10_susfs_branch_or_commit: |
| 51 | + description: 'Enter SusFS Branch or commit hash for android13-5.10' |
| 52 | + type: string |
| 53 | + default: '' |
| 54 | + android13-5_15_susfs_branch_or_commit: |
| 55 | + description: 'Enter SusFS Branch or commit hash for android13-5.15' |
| 56 | + type: string |
| 57 | + default: '' |
| 58 | + android14-5_15_susfs_branch_or_commit: |
| 59 | + description: 'Enter SusFS Branch or commit hash for android14-5.15' |
| 60 | + type: string |
| 61 | + default: '' |
| 62 | + android14-6_1_susfs_branch_or_commit: |
| 63 | + description: 'Enter SusFS Branch or commit hash for android14-6.1' |
| 64 | + type: string |
| 65 | + default: '' |
| 66 | + android15-6_6_susfs_branch_or_commit: |
| 67 | + description: 'Enter SusFS Branch or commit hash for android15-6.6' |
48 | 68 | type: string |
49 | 69 | default: '' |
50 | 70 |
|
|
54 | 74 | outputs: |
55 | 75 | matrix: ${{ steps.set-matrix.outputs.matrix }} |
56 | 76 | device_count: ${{ steps.set-matrix.outputs.count }} |
57 | | - susfs_map: ${{ steps.parse-susfs.outputs.susfs_map }} |
58 | 77 | steps: |
59 | 78 | - name: 📥 Checkout Code (to access configs/) |
60 | 79 | uses: actions/checkout@v4 |
|
63 | 82 | configs/ |
64 | 83 | sparse-checkout-cone-mode: false |
65 | 84 |
|
66 | | - - name: 🔍 Parse SUSFS Configuration |
67 | | - id: parse-susfs |
68 | | - shell: bash |
69 | | - run: | |
70 | | - set -euo pipefail |
71 | | - |
72 | | - echo "::group::SUSFS Configuration" |
73 | | - |
74 | | - DEFAULT_SUSFS='{ |
75 | | - "android12-5.10": "next", |
76 | | - "android13-5.10": "next", |
77 | | - "android13-5.15": "next", |
78 | | - "android14-5.15": "next", |
79 | | - "android14-6.1": "next", |
80 | | - "android15-6.6": "next" |
81 | | - }' |
82 | | - |
83 | | - INPUT='${{ inputs.susfs_config }}' |
84 | | - |
85 | | - if [ -z "$INPUT" ] || [ "$INPUT" = "{}" ]; then |
86 | | - echo "ℹ️ Using default SUSFS configuration (all 'next' = auto-select gki branches)" |
87 | | - SUSFS_MAP="$DEFAULT_SUSFS" |
88 | | - else |
89 | | - echo "🔧 Parsing custom SUSFS configuration..." |
90 | | - |
91 | | - if ! echo "$INPUT" | jq empty 2>/dev/null; then |
92 | | - echo "::error::Invalid JSON in susfs_config input" |
93 | | - exit 1 |
94 | | - fi |
95 | | - |
96 | | - SUSFS_MAP=$(jq -n \ |
97 | | - --argjson defaults "$DEFAULT_SUSFS" \ |
98 | | - --argjson input "$INPUT" \ |
99 | | - '$defaults * $input') |
100 | | - |
101 | | - echo "✅ Custom SUSFS configuration applied" |
102 | | - fi |
103 | | - |
104 | | - echo "" |
105 | | - echo "📋 Final SUSFS Configuration:" |
106 | | - echo "$SUSFS_MAP" | jq -r 'to_entries[] | |
107 | | - if .value == "next" then |
108 | | - " - \(.key): next (will auto-select gki-\(.key))" |
109 | | - else |
110 | | - " - \(.key): \(.value)" |
111 | | - end' |
112 | | - |
113 | | - echo "susfs_map<<SUSFS_EOF" >> "$GITHUB_OUTPUT" |
114 | | - echo "$SUSFS_MAP" >> "$GITHUB_OUTPUT" |
115 | | - echo "SUSFS_EOF" >> "$GITHUB_OUTPUT" |
116 | | - |
117 | | - echo "::endgroup::" |
118 | | -
|
119 | 85 | - name: 🔍 Generate build matrix |
120 | 86 | id: set-matrix |
121 | 87 | shell: bash |
@@ -209,22 +175,33 @@ jobs: |
209 | 175 | | Create Release | ${{ inputs.make_release }} | |
210 | 176 | |
211 | 177 | ### SUSFS Configuration |
| 178 | + | Kernel Version | SUSFS Branch/Commit | |
| 179 | + |----------------|---------------------| |
212 | 180 | EOF |
213 | 181 | |
214 | | - echo '${{ steps.parse-susfs.outputs.susfs_map }}' | jq -r ' |
215 | | - "| Kernel Version | SUSFS Branch |", |
216 | | - "|----------------|--------------|", |
217 | | - (to_entries[] | |
218 | | - if .value == "next" then |
219 | | - "| \(.key) | `next` (→ gki-\(.key)) |" |
220 | | - else |
221 | | - "| \(.key) | `\(.value)` |" |
222 | | - end |
223 | | - ) |
224 | | - ' >> $GITHUB_STEP_SUMMARY |
| 182 | + # Display SUSFS config for each kernel version |
| 183 | + for key in "android12-5.10" "android13-5.10" "android13-5.15" "android14-5.15" "android14-6.1" "android15-6.6"; do |
| 184 | + input_key=$(echo "$key" | tr '.-' '__') |
| 185 | + input_name="android${key#android}_susfs_branch_or_commit" |
| 186 | + |
| 187 | + case "$key" in |
| 188 | + "android12-5.10") value="${{ inputs.android12-5_10_susfs_branch_or_commit }}" ;; |
| 189 | + "android13-5.10") value="${{ inputs.android13-5_10_susfs_branch_or_commit }}" ;; |
| 190 | + "android13-5.15") value="${{ inputs.android13-5_15_susfs_branch_or_commit }}" ;; |
| 191 | + "android14-5.15") value="${{ inputs.android14-5_15_susfs_branch_or_commit }}" ;; |
| 192 | + "android14-6.1") value="${{ inputs.android14-6_1_susfs_branch_or_commit }}" ;; |
| 193 | + "android15-6.6") value="${{ inputs.android15-6_6_susfs_branch_or_commit }}" ;; |
| 194 | + esac |
| 195 | + |
| 196 | + if [ -z "$value" ]; then |
| 197 | + echo "| $key | \`(auto: gki-$key)\` |" >> $GITHUB_STEP_SUMMARY |
| 198 | + else |
| 199 | + echo "| $key | \`$value\` |" >> $GITHUB_STEP_SUMMARY |
| 200 | + fi |
| 201 | + done |
225 | 202 | |
226 | 203 | echo "" >> $GITHUB_STEP_SUMMARY |
227 | | - echo "> **Note:** \`next\` auto-maps to the matching gki-androidX-Y.Z branch during build." >> $GITHUB_STEP_SUMMARY |
| 204 | + echo "> **Note:** Empty values auto-map to the matching gki-androidX-Y.Z branch during build." >> $GITHUB_STEP_SUMMARY |
228 | 205 |
|
229 | 206 | build: |
230 | 207 | name: build (${{ matrix.model }}, ${{ matrix.soc }}, ${{ matrix.branch }}, ${{ matrix.manifest }}, ${{ matrix.android_version }}, ${{ matrix.kernel_version }}, ${{ matrix.os_version }}, ${{ inputs.ksun_branch }}) |
@@ -257,25 +234,50 @@ jobs: |
257 | 234 | echo "✅ Available space: $AVAIL" |
258 | 235 | echo "::endgroup::" |
259 | 236 |
|
260 | | - - name: 🔍 Resolve SUSFS branch from config |
| 237 | + - name: 🔍 Resolve SUSFS branch from inputs |
261 | 238 | id: susfs |
262 | 239 | shell: bash |
263 | 240 | run: | |
264 | 241 | set -euo pipefail |
265 | 242 | |
266 | 243 | key="${{ matrix.android_version }}-${{ matrix.kernel_version }}" |
267 | | - SUSFS_MAP='${{ needs.set-op-model.outputs.susfs_map }}' |
268 | 244 | |
269 | 245 | echo "Looking up SUSFS branch for: $key" |
270 | 246 | |
271 | | - susfs_branch=$(echo "$SUSFS_MAP" | jq -r --arg key "$key" '.[$key] // "next"') |
| 247 | + # Map kernel version to input value |
| 248 | + case "$key" in |
| 249 | + "android12-5.10") |
| 250 | + susfs_branch="${{ inputs.android12-5_10_susfs_branch_or_commit }}" |
| 251 | + ;; |
| 252 | + "android13-5.10") |
| 253 | + susfs_branch="${{ inputs.android13-5_10_susfs_branch_or_commit }}" |
| 254 | + ;; |
| 255 | + "android13-5.15") |
| 256 | + susfs_branch="${{ inputs.android13-5_15_susfs_branch_or_commit }}" |
| 257 | + ;; |
| 258 | + "android14-5.15") |
| 259 | + susfs_branch="${{ inputs.android14-5_15_susfs_branch_or_commit }}" |
| 260 | + ;; |
| 261 | + "android14-6.1") |
| 262 | + susfs_branch="${{ inputs.android14-6_1_susfs_branch_or_commit }}" |
| 263 | + ;; |
| 264 | + "android15-6.6") |
| 265 | + susfs_branch="${{ inputs.android15-6_6_susfs_branch_or_commit }}" |
| 266 | + ;; |
| 267 | + *) |
| 268 | + echo "::error::Unsupported kernel version: $key" |
| 269 | + exit 1 |
| 270 | + ;; |
| 271 | + esac |
272 | 272 | |
| 273 | + # If empty, it will be auto-resolved to gki-* branch in the action |
273 | 274 | if [ -z "$susfs_branch" ]; then |
274 | | - echo "::warning::No SUSFS branch found for $key, using 'next'" |
275 | | - susfs_branch="next" |
| 275 | + echo "ℹ️ No custom SUSFS branch specified for $key" |
| 276 | + echo " Will auto-select: gki-$key" |
| 277 | + else |
| 278 | + echo "✅ Using custom SUSFS branch for $key: '$susfs_branch'" |
276 | 279 | fi |
277 | 280 | |
278 | | - echo "✅ SUSFS branch for $key: '$susfs_branch'" |
279 | 281 | echo "susfs_branch=$susfs_branch" >> "$GITHUB_OUTPUT" |
280 | 282 |
|
281 | 283 | - name: 📥 Checkout Code |
@@ -356,7 +358,7 @@ jobs: |
356 | 358 | ### ${{ matrix.model }} - ${{ job.status == 'success' && '✅ Success' || '❌ Failed' }} |
357 | 359 | |
358 | 360 | **Kernel:** ${{ matrix.android_version }}-${{ matrix.kernel_version }} |
359 | | - **SUSFS Branch:** \`${{ steps.susfs.outputs.susfs_branch }}\` |
| 361 | + **SUSFS Branch:** \`${{ steps.susfs.outputs.susfs_branch || format('(auto: gki-{0}-{1})', matrix.android_version, matrix.kernel_version) }}\` |
360 | 362 | |
361 | 363 | EOF |
362 | 364 | |
|
0 commit comments