summaryrefslogtreecommitdiff
path: root/.github/workflows/build-linux.yml
blob: 8535f8b3070d384186f1888537e5d62c1da4f711 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
name: Build Linux

on:
  workflow_call:
    inputs:
      version:
        description: "WSJT-X version string"
        required: true
        type: string
      hamlib_branch:
        description: "Hamlib branch to build"
        required: false
        type: string
        default: "4.7.2"
      arch:
        description: "Linux target architecture: x86_64, aarch64, or armhf"
        required: false
        type: string
        default: "x86_64"
      recache:
        description: "Force ccache to recompile and refresh cached objects"
        required: false
        type: boolean
        default: false
      image_tag:
        description: "Immutable GHCR image tag; empty resolves the current validated generation"
        required: false
        type: string
        default: ""
      image_source:
        description: "Builder image source: internal or public-release"
        required: false
        type: string
        default: "internal"
      image_digest:
        description: "Required sha256 digest for a public-release builder image"
        required: false
        type: string
        default: ""
      armhf_cross_image_digest:
        description: "Required sha256 digest for the public-release ARMHF cross-builder"
        required: false
        type: string
        default: ""
      allow_stale_image:
        description: "Allow a previously promoted image when a dependency refresh changed the recipe"
        required: false
        type: boolean
        default: false
      save_ccache:
        description: "Save compiled objects for trusted builds"
        required: false
        type: boolean
        default: false
      validate_fortran_fallback:
        description: "Build the x86_64 non-OpenMP common-library sentinel graph"
        required: false
        type: boolean
        default: false
      build_packages:
        description: "Build, validate, and upload Linux packages and executable artifacts"
        required: false
        type: boolean
        default: true
      release_channel:
        description: "Build release channel: DEVEL, RC, or GA"
        required: false
        type: string
        default: "DEVEL"
      rc_number:
        description: "Release candidate number when release_channel is RC"
        required: false
        type: string
        default: ""
  # Also runnable on its own ("Run workflow" / gh workflow run) to build a single
  # Linux arch without dispatching the full ci.yml matrix. GitHub only exposes
  # workflow_dispatch when the trigger is on the default branch (develop), so this
  # must be merged before it can be dispatched. This entry point supports focused
  # single-architecture diagnosis and candidate-image validation; ARMHF also joins
  # ci.yml's opt-in full-ci matrix. Inputs mirror workflow_call with standalone
  # defaults: hamlib_branch matches what ci.yml / release.yml pass (4.7.2), and
  # version is overridable via `-f version=...`.
  workflow_dispatch:
    inputs:
      version:
        description: "WSJT-X version string (artifact + package names)"
        required: false
        type: string
        default: "3.2.0-devel"
      hamlib_branch:
        description: "Hamlib branch to build"
        required: false
        type: string
        default: "4.7.2"
      arch:
        description: "Linux target architecture"
        required: false
        type: choice
        options:
          - x86_64
          - aarch64
          - armhf
        default: "x86_64"
      recache:
        description: "Force ccache to recompile and refresh cached objects"
        required: false
        type: boolean
        default: false
      image_tag:
        description: "Immutable GHCR image tag; empty resolves the current validated generation"
        required: false
        type: string
        default: ""
      image_source:
        description: "Builder image source"
        required: false
        type: choice
        options:
          - internal
          - public-release
        default: internal
      image_digest:
        description: "sha256 digest required with public-release image source"
        required: false
        type: string
        default: ""
      armhf_cross_image_digest:
        description: "sha256 digest required for the public-release ARMHF cross-builder"
        required: false
        type: string
        default: ""
      allow_stale_image:
        description: "Allow a previously promoted image when a dependency refresh changed the recipe"
        required: false
        type: boolean
        default: false
      save_ccache:
        description: "Save compiled objects"
        required: false
        type: boolean
        default: false
      validate_fortran_fallback:
        description: "Build the x86_64 non-OpenMP common-library sentinel graph"
        required: false
        type: boolean
        default: false
      build_packages:
        description: "Build, validate, and upload Linux packages and executable artifacts"
        required: false
        type: boolean
        default: true
      release_channel:
        description: "Build release channel"
        required: false
        type: choice
        options:
          - DEVEL
          - RC
          - GA
        default: "DEVEL"
      rc_number:
        description: "Release candidate number when release_channel is RC"
        required: false
        type: string
        default: ""

# Architecture jobs are gated on `inputs.arch`. Each call from ci.yml /
# release.yml passes a single target, so exactly one build job runs per call.
# Splitting on arch
# keeps the per-arch runtime profile explicit at the job level:
#
#   x86_64 — validated Noble container on ubuntu-24.04.
#   aarch64 — validated GCC 13.4 Bookworm container on ubuntu-24.04-arm. This keeps the
#            Bookworm glibc 2.36 + pre-t64 library baseline while using GCC 13
#            (issue #49).
#   armhf  — native x86_64-to-ARMHF GCC 13.4 cross-build followed by target
#            tests and packaging in a Bookworm arm/v7 container under QEMU
#            (issue #51). DigiPi / Pi Zero 2W class.
#
# The native jobs use the build-linux-payload composite action. ARMHF needs
# separate host-build and target-runtime phases, but shares their artifact
# validators and external artifact contracts.

permissions:
  contents: read
  packages: read

jobs:
  resolve-image:
    runs-on: ubuntu-24.04
    timeout-minutes: 10
    outputs:
      image_tag: ${{ steps.resolve.outputs.image_tag }}
      image_reference: ${{ steps.resolve.outputs.image_reference }}
      cross_image_reference: ${{ steps.resolve.outputs.cross_image_reference }}
    steps:
      - uses: actions/checkout@v7
      - id: resolve
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          REQUESTED_TAG: ${{ inputs.image_tag }}
          ARMHF_BUILD: ${{ inputs.arch == 'armhf' }}
          ARCH: ${{ inputs.arch }}
          IMAGE_SOURCE: ${{ inputs.image_source }}
          IMAGE_DIGEST: ${{ inputs.image_digest }}
          ARMHF_CROSS_IMAGE_DIGEST: ${{ inputs.armhf_cross_image_digest }}
          REQUEST_REPOSITORY: ${{ github.repository }}
        shell: bash
        run: |
          case "$ARCH" in
            x86_64) package=linux-noble; cross_package= ;;
            aarch64) package=linux-arm64-bookworm; cross_package= ;;
            armhf) package=linux-armv7-bookworm; cross_package=linux-armhf-cross-bookworm ;;
            *)
              echo "::error::Unsupported Linux architecture: $ARCH"
              exit 2
              ;;
          esac

          case "$IMAGE_SOURCE" in
            internal)
              if [ -n "$IMAGE_DIGEST" ] || [ -n "$ARMHF_CROSS_IMAGE_DIGEST" ]; then
                echo "::error::image digests are valid only for public-release images"
                exit 2
              fi
              package_root=ghcr.io/wsjtx/wsjtx-internal
              ;;
            public-release)
              if [ "$REQUEST_REPOSITORY" != WSJTX/wsjtx ]; then
                echo "::error::Public release images may only be used by WSJTX/wsjtx"
                exit 2
              fi
              if [[ ! "$IMAGE_DIGEST" =~ ^sha256:[0-9a-f]{64}$ ]]; then
                echo "::error::public-release images require an immutable sha256 digest"
                exit 2
              fi
              if [ "$ARCH" = armhf ]; then
                if [[ ! "$ARMHF_CROSS_IMAGE_DIGEST" =~ ^sha256:[0-9a-f]{64}$ ]]; then
                  echo "::error::public-release ARMHF builds require an immutable cross-builder sha256 digest"
                  exit 2
                fi
              elif [ -n "$ARMHF_CROSS_IMAGE_DIGEST" ]; then
                echo "::error::armhf_cross_image_digest is valid only for ARMHF builds"
                exit 2
              fi
              if [ -z "$REQUESTED_TAG" ]; then
                echo "::error::public-release images require their release-specific image_tag"
                exit 2
              fi
              package_root=ghcr.io/wsjtx/wsjtx
              ;;
            *)
              echo "::error::Unsupported image_source: $IMAGE_SOURCE"
              exit 2
              ;;
          esac

          if [ -n "$REQUESTED_TAG" ]; then
            IMAGE_TAG="$REQUESTED_TAG" .github/scripts/validate-ci-inputs.sh
            echo "image_tag=$REQUESTED_TAG" >> "$GITHUB_OUTPUT"
          elif [ "$ARMHF_BUILD" = true ]; then
            RESOLVE_ARMHF=true .github/scripts/resolve-linux-ci-image-tag.py
          else
            .github/scripts/resolve-linux-ci-image-tag.py
          fi

          if [ "$IMAGE_SOURCE" = public-release ]; then
            echo "image_reference=${package_root}/${package}@${IMAGE_DIGEST}" >> "$GITHUB_OUTPUT"
            if [ "$ARCH" = armhf ]; then
              echo "cross_image_reference=${package_root}/${cross_package}@${ARMHF_CROSS_IMAGE_DIGEST}" >> "$GITHUB_OUTPUT"
            fi
          else
            image_tag="$(awk -F= '$1 == "image_tag" { print $2 }' "$GITHUB_OUTPUT" | tail -n 1)"
            echo "image_reference=${package_root}/${package}:${image_tag}" >> "$GITHUB_OUTPUT"
            if [ "$ARCH" = armhf ]; then
              echo "cross_image_reference=${package_root}/${cross_package}:${image_tag}" >> "$GITHUB_OUTPUT"
            fi
          fi

  build-x86_64:
    needs: resolve-image
    if: inputs.arch == 'x86_64'
    runs-on: ubuntu-24.04
    timeout-minutes: 65
    container:
      image: ${{ needs.resolve-image.outputs.image_reference }}
      credentials:
        username: ${{ github.actor }}
        password: ${{ secrets.GITHUB_TOKEN }}
    steps:
      - uses: actions/checkout@v7
      - name: Validate workflow inputs
        env:
          WSJTX_VERSION: ${{ inputs.version }}
          HAMLIB_BRANCH: ${{ inputs.hamlib_branch }}
          WSJT_RELEASE_CHANNEL: ${{ inputs.release_channel }}
          WSJT_RC_NUMBER: ${{ inputs.rc_number }}
          ARCH: ${{ inputs.arch }}
          IMAGE_TAG: ${{ needs.resolve-image.outputs.image_tag }}
          VALIDATE_FORTRAN_FALLBACK: ${{ inputs.validate_fortran_fallback }}
        run: .github/scripts/validate-ci-inputs.sh
      - uses: ./.github/actions/build-linux-payload
        with:
          arch: x86_64
          version: ${{ inputs.version }}
          hamlib_branch: ${{ inputs.hamlib_branch }}
          runtime_base: host
          recache: ${{ inputs.recache }}
          save_ccache: ${{ inputs.save_ccache }}
          validate_fortran_fallback: ${{ inputs.validate_fortran_fallback }}
          build_packages: ${{ inputs.build_packages }}
          release_channel: ${{ inputs.release_channel }}
          rc_number: ${{ inputs.rc_number }}
          allow_stale_image: ${{ inputs.allow_stale_image }}

  build-aarch64:
    needs: resolve-image
    if: inputs.arch == 'aarch64'
    runs-on: ubuntu-24.04-arm
    timeout-minutes: 45
    # The official GCC image adds GCC 13.4 without moving off the Bookworm
    # glibc 2.36 and pre-t64 runtime baseline (issue #49).
    container:
      image: ${{ needs.resolve-image.outputs.image_reference }}
      credentials:
        username: ${{ github.actor }}
        password: ${{ secrets.GITHUB_TOKEN }}
    steps:
      - uses: actions/checkout@v7
      - name: Validate workflow inputs
        env:
          WSJTX_VERSION: ${{ inputs.version }}
          HAMLIB_BRANCH: ${{ inputs.hamlib_branch }}
          WSJT_RELEASE_CHANNEL: ${{ inputs.release_channel }}
          WSJT_RC_NUMBER: ${{ inputs.rc_number }}
          ARCH: ${{ inputs.arch }}
          IMAGE_TAG: ${{ needs.resolve-image.outputs.image_tag }}
          VALIDATE_FORTRAN_FALLBACK: ${{ inputs.validate_fortran_fallback }}
        run: .github/scripts/validate-ci-inputs.sh
      - uses: ./.github/actions/build-linux-payload
        with:
          arch: aarch64
          version: ${{ inputs.version }}
          hamlib_branch: ${{ inputs.hamlib_branch }}
          runtime_base: bookworm-gcc13.4
          recache: ${{ inputs.recache }}
          save_ccache: ${{ inputs.save_ccache }}
          validate_fortran_fallback: ${{ inputs.validate_fortran_fallback }}
          build_packages: ${{ inputs.build_packages }}
          release_channel: ${{ inputs.release_channel }}
          rc_number: ${{ inputs.rc_number }}
          allow_stale_image: ${{ inputs.allow_stale_image }}

  build-armhf:
    needs: resolve-image
    if: inputs.arch == 'armhf'
    runs-on: ubuntu-24.04
    timeout-minutes: 160
    # Compile natively on x86_64 with a pinned GCC 13.4 cross-toolchain, then
    # execute target tests and packaging in a clean Bookworm ARMv7 runtime.
    #
    # Keep JavaScript actions on the host: the runner's x86_64 Node runtime
    # cannot execute in the ARMv7 container. Both explicit containers mount
    # the checkout at /work so CTest paths remain stable across phases.
    env:
      VERSION: ${{ inputs.version }}
      HAMLIB_BRANCH: ${{ inputs.hamlib_branch }}
      WSJT_RELEASE_CHANNEL: ${{ inputs.release_channel }}
      WSJT_RC_NUMBER: ${{ inputs.rc_number }}
    steps:
      # setup-qemu-action runs on the host (job has no `container:`),
      # mutating the host kernel's binfmt_misc table. With arm/v7
      # registered, subsequent `docker run --platform linux/arm/v7`
      # invocations execute the container's arm/v7 init + binaries via
      # qemu-arm-static.
      - uses: docker/setup-qemu-action@v4
        with:
          image: tonistiigi/binfmt:qemu-v10.2.3-68@sha256:400a4873b838d1b89194d982c45e5fb3cda4593fbfd7e08a02e76b03b21166f0
          platforms: linux/arm/v7
      - uses: actions/checkout@v7
      - name: Validate workflow inputs
        env:
          WSJTX_VERSION: ${{ inputs.version }}
          HAMLIB_BRANCH: ${{ inputs.hamlib_branch }}
          WSJT_RELEASE_CHANNEL: ${{ inputs.release_channel }}
          WSJT_RC_NUMBER: ${{ inputs.rc_number }}
          ARCH: armhf
          IMAGE_TAG: ${{ needs.resolve-image.outputs.image_tag }}
          VALIDATE_FORTRAN_FALLBACK: ${{ inputs.validate_fortran_fallback }}
        run: .github/scripts/validate-ci-inputs.sh

      - uses: docker/login-action@v4
        with:
          registry: ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - name: Inspect ARMHF image pair
        id: image
        env:
          CROSS_BUILDER_IMAGE: ${{ needs.resolve-image.outputs.cross_image_reference }}
          RUNTIME_IMAGE: ${{ needs.resolve-image.outputs.image_reference }}
          ALLOW_STALE_IMAGE: ${{ inputs.allow_stale_image }}
          HAMLIB_BRANCH: ${{ inputs.hamlib_branch }}
        run: |
          docker pull --platform linux/amd64 "$CROSS_BUILDER_IMAGE"
          docker pull --platform linux/arm/v7 "$RUNTIME_IMAGE"
          output_file=.armhf-image-verification-output
          trap 'rm -f "$output_file"' EXIT
          docker run --rm --platform linux/amd64 \
            -v "${GITHUB_WORKSPACE}:/work" \
            -w /work \
            -e GITHUB_OUTPUT=/work/$output_file \
            -e WSJTX_CI_OUTPUT_PREFIX=cross_ \
            -e WSJTX_CI_IMAGE_ALLOW_RECIPE_MISMATCH="$ALLOW_STALE_IMAGE" \
            "$CROSS_BUILDER_IMAGE" \
            bash .github/scripts/verify-armhf-ci-image.sh cross-builder armhf "$HAMLIB_BRANCH"
          docker run --rm --platform linux/arm/v7 \
            -v "${GITHUB_WORKSPACE}:/work" \
            -w /work \
            -e GITHUB_OUTPUT=/work/$output_file \
            -e WSJTX_CI_OUTPUT_PREFIX=runtime_ \
            -e WSJTX_CI_IMAGE_ALLOW_RECIPE_MISMATCH="$ALLOW_STALE_IMAGE" \
            "$RUNTIME_IMAGE" \
            bash .github/scripts/verify-armhf-ci-image.sh runtime armhf "$HAMLIB_BRANCH"

          cross_generation=$(awk -F= '$1 == "cross_generation" { print $2 }' "$output_file")
          runtime_generation=$(awk -F= '$1 == "runtime_generation" { print $2 }' "$output_file")
          cross_toolchain_id=$(awk -F= '$1 == "cross_toolchain_id" { print $2 }' "$output_file")
          runtime_toolchain_id=$(awk -F= '$1 == "runtime_toolchain_id" { print $2 }' "$output_file")
          if [ "$cross_generation" != "$runtime_generation" ]; then
            echo "ARMHF image generation mismatch: $cross_generation != $runtime_generation" >&2
            exit 1
          fi
          if [ "$cross_toolchain_id" != "$runtime_toolchain_id" ]; then
            echo "ARMHF toolchain identity mismatch: $cross_toolchain_id != $runtime_toolchain_id" >&2
            exit 1
          fi
          cross_recipe_match=$(awk -F= '$1 == "cross_recipe_match" { print $2 }' "$output_file")
          runtime_recipe_match=$(awk -F= '$1 == "runtime_recipe_match" { print $2 }' "$output_file")
          recipe_match=false
          if [ "$cross_recipe_match" = true ] && [ "$runtime_recipe_match" = true ]; then
            recipe_match=true
          fi
          ccache_compatibility_id=$(awk -F= '$1 == "cross_ccache_compatibility_id" { print $2 }' "$output_file")
          ccache_compiler_check=$(awk -F= '$1 == "cross_ccache_compiler_check" { print $2 }' "$output_file")
          # Empty manifest values could coalesce caches from incompatible
          # toolchains, so reject them before constructing any cache key.
          if [ -z "$ccache_compatibility_id" ] || [ -z "$ccache_compiler_check" ]; then
            echo "ARMHF image verification returned incomplete ccache identity" >&2
            exit 1
          fi
          {
            echo "generation=$cross_generation"
            echo "recipe_match=$recipe_match"
            echo "ccache_compatibility_id=$ccache_compatibility_id"
            echo "ccache_compiler_check=$ccache_compiler_check"
          } >> "$GITHUB_OUTPUT"

      - name: Select armhf ccache key
        id: ccache-key
        env:
          RECACHE: ${{ inputs.recache }}
        run: .github/scripts/select-ccache-key-suffix.sh

      - name: Restore armhf ccache
        id: ccache
        uses: actions/cache/restore@v6
        with:
          path: .ccache-armhf
          key: ccache-linux-armhf-${{ steps.image.outputs.ccache_compatibility_id }}-${{ steps.image.outputs.generation }}-${{ github.sha }}${{ steps.ccache-key.outputs.suffix }}
          restore-keys: |
            ccache-linux-armhf-${{ steps.image.outputs.ccache_compatibility_id }}-${{ steps.image.outputs.generation }}-
            ccache-linux-armhf-${{ steps.image.outputs.ccache_compatibility_id }}-

      - name: Cross-build ARMHF binaries
        env:
          ARCH: armhf
          CROSS_BUILDER_IMAGE: ${{ needs.resolve-image.outputs.cross_image_reference }}
          RECACHE: ${{ inputs.recache }}
          CCACHE_COMPILERCHECK: ${{ steps.image.outputs.ccache_compiler_check }}
          WSJTX_CI_IMAGE_ALLOW_RECIPE_MISMATCH: ${{ inputs.allow_stale_image }}
        run: |
          ccache_args=()
          if [ "$RECACHE" = true ]; then
            ccache_args=(-e CCACHE_RECACHE=1)
          fi
          docker run --rm --platform linux/amd64 \
            -v "${GITHUB_WORKSPACE}:/work" \
            -w /work \
            -e VERSION \
            -e HAMLIB_BRANCH \
            -e ARCH \
            -e WSJT_RELEASE_CHANNEL \
            -e WSJT_RC_NUMBER \
            -e CCACHE_DIR=/work/.ccache-armhf \
            -e CCACHE_COMPILERCHECK \
            -e WSJTX_CI_IMAGE_ALLOW_RECIPE_MISMATCH \
            "${ccache_args[@]}" \
            "$CROSS_BUILDER_IMAGE" \
            bash .github/scripts/build-linux-armhf-cross.sh

      - name: Test and package under ARMv7 QEMU
        id: armhf-runtime
        env:
          ARCH: armhf
          RUNTIME_IMAGE: ${{ needs.resolve-image.outputs.image_reference }}
          WSJTX_CI_IMAGE_ALLOW_RECIPE_MISMATCH: ${{ inputs.allow_stale_image }}
          ARMHF_RUNTIME_PHASE: ${{ inputs.build_packages && 'all' || 'test' }}
        run: |
          GITHUB_TOKEN="${{ github.token }}" docker run --rm --platform linux/arm/v7 \
            -v "${GITHUB_WORKSPACE}:/work" \
            -w /work \
            -e VERSION \
            -e HAMLIB_BRANCH \
            -e ARCH \
            -e WSJT_RELEASE_CHANNEL \
            -e WSJT_RC_NUMBER \
            -e GITHUB_TOKEN \
            -e ARMHF_RUNTIME_PHASE \
            -e WSJTX_CI_IMAGE_ALLOW_RECIPE_MISMATCH \
            "$RUNTIME_IMAGE" \
            bash .github/scripts/validate-linux-armhf-runtime.sh

      - name: Publish armhf test summary
        if: always()
        run: >-
          python3 .github/scripts/publish-ctest-summary.py
          "Linux armhf" wsjtx-build/ctest-results.xml
          >> "$GITHUB_STEP_SUMMARY"

      - name: Upload armhf AppImage startup diagnostics
        if: inputs.build_packages && failure() && steps.armhf-runtime.outcome == 'failure'
        uses: actions/upload-artifact@v7
        with:
          name: wsjtx-startup-smoke-linux-armhf
          path: wsjtx-build/appimage-startup-smoke.log
          if-no-files-found: ignore
          retention-days: 7

      # Artifacts produced inside the container land in $GITHUB_WORKSPACE
      # via the bind-mount. Upload from the host where actions/upload-
      # artifact runs natively. Same artifact names as the composite
      # action's uploads so release.yml's all-platforms-ready gate
      # pattern works unchanged.
      - name: Upload .deb
        if: inputs.build_packages
        uses: actions/upload-artifact@v7
        with:
          name: wsjtx-${{ inputs.version }}-linux-armhf-deb
          path: wsjtx-build/wsjtx-${{ inputs.version }}-linux-armhf.deb
          if-no-files-found: error
          compression-level: 0
      - name: Upload RPM
        if: inputs.build_packages
        uses: actions/upload-artifact@v7
        with:
          name: wsjtx-${{ inputs.version }}-linux-armhf-rpm
          path: wsjtx-build/*.rpm
          if-no-files-found: error
          compression-level: 0
      - name: Upload AppImage
        if: inputs.build_packages
        uses: actions/upload-artifact@v7
        with:
          name: wsjtx-${{ inputs.version }}-linux-armhf-AppImage
          path: wsjtx-${{ inputs.version }}-linux-armhf.AppImage
          if-no-files-found: error
          compression-level: 0
      - name: Upload build artifacts
        if: inputs.build_packages
        uses: actions/upload-artifact@v7
        with:
          name: wsjtx-${{ inputs.version }}-linux-armhf
          path: |
            wsjtx-build/jt9
            wsjtx-build/wsprd
            wsjtx-build/wsjtx
      - name: Upload test results
        if: always()
        uses: actions/upload-artifact@v7
        with:
          name: ctest-results-linux-armhf
          path: wsjtx-build/ctest-results.xml
          if-no-files-found: ignore

      - name: Report suppressed armhf ccache save
        if: inputs.save_ccache && steps.image.outputs.recipe_match != 'true'
        run: echo "::notice::Not saving armhf ccache because this build used a stale Linux CI image recipe"

      - name: Save armhf ccache
        if: inputs.save_ccache && steps.image.outputs.recipe_match == 'true' && steps.ccache.outputs.cache-hit != 'true'
        uses: actions/cache/save@v6
        with:
          path: .ccache-armhf
          key: ${{ steps.ccache.outputs.cache-primary-key }}