summaryrefslogtreecommitdiff
path: root/.github/actions
diff options
context:
space:
mode:
authorhibby <d@vehibberd.com>2026-10-06 21:24:40 +0100
committerhibby <d@vehibberd.com>2026-10-06 21:24:40 +0100
commitc25cbdf6fb6d946175f4335fab77bfea601b56db (patch)
tree6f7a94b7b81f999e434f61b73d47e337dfd26bf2 /.github/actions
parent71f5689252c9f13e70e1c24856904475b2307809 (diff)
parent0685fcada9f95fe90f70b387cd7d757da8209624 (diff)
Merge tag 'debian/3.2.0_rc1+dfsg-2' into debian/trixie-backportsdebian/trixie-backports
tagging wsjtx 3.2.0~rc1+dfsg-2
Diffstat (limited to '.github/actions')
-rw-r--r--.github/actions/build-linux-payload/action.yml457
-rw-r--r--.github/actions/build-linux-sanitizers/action.yml277
-rw-r--r--.github/actions/build-windows-deps/action.yml174
-rw-r--r--.github/actions/warm-macos-deps/action.yml330
4 files changed, 1238 insertions, 0 deletions
diff --git a/.github/actions/build-linux-payload/action.yml b/.github/actions/build-linux-payload/action.yml
new file mode 100644
index 00000000..f5ce1e0b
--- /dev/null
+++ b/.github/actions/build-linux-payload/action.yml
@@ -0,0 +1,457 @@
+name: "Build Linux payload"
+description: >-
+ Build and test wsjtx for one Linux architecture, with optional package and
+ artifact production. The caller decides job-container versus explicit Docker
+ execution; this action runs the shared native pipeline.
+
+inputs:
+ arch:
+ description: "Native Linux target architecture: x86_64 or aarch64"
+ required: true
+ version:
+ description: "WSJT-X version string"
+ required: true
+ hamlib_branch:
+ description: "Hamlib branch to build"
+ required: true
+ runtime_base:
+ description: >-
+ Runtime profile used to select the GCC 13.4 Bookworm toolchain.
+ required: false
+ default: "host"
+ recache:
+ description: "Manual ccache refresh; ordinary source changes do not enable it"
+ required: false
+ default: "false"
+ save_ccache:
+ description: "Save compiled objects for trusted builds"
+ required: false
+ default: "false"
+ validate_fortran_fallback:
+ description: "Build the x86_64 non-OpenMP common-library sentinel graph"
+ required: false
+ default: "false"
+ build_packages:
+ description: "Build, validate, and upload Linux packages and executable artifacts"
+ required: false
+ default: "true"
+ release_channel:
+ description: "Build release channel: DEVEL, RC, or GA"
+ required: false
+ default: "DEVEL"
+ rc_number:
+ description: "Release candidate number when release_channel is RC"
+ required: false
+ default: ""
+ allow_stale_image:
+ description: "Allow a previously promoted image when a dependency refresh changed the recipe"
+ required: false
+ default: "false"
+
+runs:
+ using: "composite"
+ steps:
+ - name: Validate workflow inputs
+ shell: bash
+ 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 }}
+ VALIDATE_FORTRAN_FALLBACK: ${{ inputs.validate_fortran_fallback }}
+ run: .github/scripts/validate-ci-inputs.sh
+
+ - name: Verify Linux CI image
+ id: image
+ shell: bash
+ env:
+ WSJTX_CI_IMAGE_ALLOW_RECIPE_MISMATCH: ${{ inputs.allow_stale_image }}
+ run: >-
+ .github/scripts/verify-linux-ci-image.sh
+ normal "${{ inputs.arch }}" "${{ inputs.hamlib_branch }}"
+
+ - name: Select Noble toolchain
+ if: inputs.runtime_base == 'host'
+ shell: bash
+ run: |
+ {
+ echo "CC=gcc"
+ echo "CXX=g++"
+ echo "FC=gfortran"
+ } >> "$GITHUB_ENV"
+
+ - name: Select GCC 13.4 Bookworm toolchain
+ if: inputs.runtime_base == 'bookworm-gcc13.4'
+ shell: bash
+ run: |
+ CC=/usr/local/bin/gcc
+ CXX=/usr/local/bin/g++
+ FC=/usr/local/bin/gfortran
+
+ for compiler in "$CC" "$CXX" "$FC"; do
+ if [ ! -x "$compiler" ]; then
+ echo "::error::Expected compiler not found at $compiler"
+ exit 1
+ fi
+ version=$("$compiler" -dumpfullversion -dumpversion)
+ echo "$compiler: $version"
+ if [ "$version" != "13.4.0" ]; then
+ echo "::error::Expected GCC 13.4.0, found $version at $compiler"
+ exit 1
+ fi
+ done
+
+ echo "CC=$CC" >> "$GITHUB_ENV"
+ echo "CXX=$CXX" >> "$GITHUB_ENV"
+ echo "FC=$FC" >> "$GITHUB_ENV"
+
+ # Run-unique keys let a refreshed archive become the newest prefix match
+ # even when an immutable cache already exists for the same commit SHA.
+ - name: Select ccache key
+ id: ccache-key
+ shell: bash
+ env:
+ RECACHE: ${{ inputs.recache }}
+ run: .github/scripts/select-ccache-key-suffix.sh
+
+ - name: Restore ccache
+ id: ccache
+ uses: actions/cache/restore@v5
+ with:
+ path: .ccache
+ key: ccache-linux-${{ inputs.arch }}-${{ steps.image.outputs.ccache_compatibility_id }}-${{ steps.image.outputs.generation }}-${{ github.sha }}${{ steps.ccache-key.outputs.suffix }}
+ restore-keys: |
+ ccache-linux-${{ inputs.arch }}-${{ steps.image.outputs.ccache_compatibility_id }}-${{ steps.image.outputs.generation }}-
+ ccache-linux-${{ inputs.arch }}-${{ steps.image.outputs.ccache_compatibility_id }}-
+
+ - name: Configure ccache
+ shell: bash
+ run: |
+ export CCACHE_DIR="${GITHUB_WORKSPACE}/.ccache"
+ export CCACHE_COMPILERCHECK="${{ steps.image.outputs.ccache_compiler_check }}"
+ {
+ echo "CCACHE_DIR=$CCACHE_DIR"
+ echo "CCACHE_COMPILERCHECK=$CCACHE_COMPILERCHECK"
+ } >> "$GITHUB_ENV"
+ echo "ccache recache: ${{ inputs.recache }}"
+ if [ "${{ inputs.recache }}" = "true" ]; then
+ echo "CCACHE_RECACHE=1" >> "$GITHUB_ENV"
+ echo "Forcing ccache recache for this run"
+ fi
+ mkdir -p "${GITHUB_WORKSPACE}/.ccache"
+ ccache --version
+ ccache --show-config
+ ccache --zero-stats
+
+ # Exercise the public CMake default without duplicating its compile graph.
+ # AUTO resolves to BOTH on the OpenMP-capable Linux x86_64 toolchain.
+ - name: Configure default Fortran graph
+ if: inputs.arch == 'x86_64'
+ shell: bash
+ run: |
+ cmake -S . -B cfgmatrix-default \
+ -DCMAKE_PREFIX_PATH="${{ steps.image.outputs.hamlib_prefix }};/opt/wsjtx/pfunit" \
+ -DWSJT_SKIP_MANPAGES=ON \
+ -DPFUNIT_DIR="${{ steps.image.outputs.pfunit_dir }}" \
+ -Wno-dev
+
+ - name: Configure build and tests
+ shell: bash
+ env:
+ WSJT_RELEASE_CHANNEL: ${{ inputs.release_channel }}
+ WSJT_RC_NUMBER: ${{ inputs.rc_number }}
+ run: |
+ cmake -S . -B wsjtx-build \
+ -DCMAKE_PREFIX_PATH="${{ steps.image.outputs.hamlib_prefix }};/opt/wsjtx/pfunit" \
+ -DCMAKE_C_COMPILER_LAUNCHER=ccache \
+ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
+ -DWSJT_SKIP_MANPAGES=ON \
+ -DWSJT_ENABLE_TESTS=ON \
+ -DWSJT_ENABLE_GUI_SMOKE_TESTS=ON \
+ -DWSJT_FORTRAN_LIBRARY_VARIANTS=OPENMP_ONLY \
+ -DWSJT_RELEASE_CHANNEL="${WSJT_RELEASE_CHANNEL}" \
+ -DWSJT_RC_NUMBER="${WSJT_RC_NUMBER}" \
+ -DPFUNIT_DIR="${{ steps.image.outputs.pfunit_dir }}" \
+ -Wno-dev
+
+ - name: Build and test targets
+ shell: bash
+ run: cmake --build wsjtx-build -j$(nproc)
+
+ - name: Show ccache stats
+ if: always()
+ shell: bash
+ run: ccache --show-stats
+
+ # MAP65 retains target-local OpenMP while the shared WSJT Fortran library
+ # uses its serial variant. Run this fallback graph only on the native leg.
+ - name: Build non-OpenMP common-library sentinels
+ if: inputs.arch == 'x86_64' && inputs.validate_fortran_fallback == 'true'
+ shell: bash
+ run: |
+ cmake -S . -B cfgmatrix-NON_OPENMP_ONLY \
+ -DCMAKE_PREFIX_PATH="${{ steps.image.outputs.hamlib_prefix }};/opt/wsjtx/pfunit" \
+ -DWSJT_SKIP_MANPAGES=ON \
+ -DWSJT_FORTRAN_LIBRARY_VARIANTS=NON_OPENMP_ONLY \
+ -DPFUNIT_DIR="${{ steps.image.outputs.pfunit_dir }}" \
+ -Wno-dev
+ cmake --build cfgmatrix-NON_OPENMP_ONLY \
+ --target jt65sim m65impl qmap_impl test_jtty_pack \
+ -j$(nproc)
+
+ - name: Run tests
+ id: ctest
+ shell: bash
+ run: xvfb-run -a -s "-screen 0 1280x1024x24" ctest --parallel 3 --output-on-failure --output-junit ctest-results.xml
+ working-directory: wsjtx-build
+ env:
+ QT_QPA_PLATFORM: xcb
+
+ - name: Publish test summary
+ if: always() && steps.ctest.conclusion != 'skipped'
+ shell: bash
+ working-directory: wsjtx-build
+ run: python3 ../.github/scripts/publish-ctest-summary.py "Linux ${{ inputs.arch }}" >> "$GITHUB_STEP_SUMMARY"
+
+ - name: Upload test results
+ if: always() && steps.ctest.conclusion != 'skipped'
+ uses: actions/upload-artifact@v7
+ with:
+ name: ctest-results-linux-${{ inputs.arch }}
+ path: wsjtx-build/ctest-results.xml
+ if-no-files-found: ignore
+
+ - name: Verify binary
+ shell: bash
+ env:
+ ARCH: ${{ inputs.arch }}
+ run: |
+ source .github/scripts/linux-artifact-validation.sh
+ validate_linux_build_executables wsjtx-build "$ARCH"
+
+ # CMakeLists.txt:1989-2012 enables CPack's DEB generator when
+ # dpkg-buildpackage is on the path (provided by dpkg-dev, installed
+ # above). The DEB generator ignores CPACK_PACKAGE_FILE_NAME and
+ # uses its own CPACK_DEBIAN_FILE_NAME (default <pkg>_<ver>_<arch>.deb
+ # → wsjtx_3.0.1_amd64.deb regardless). Override that variable to
+ # align the filename with the AppImage/installer naming used by
+ # the rest of the pipeline.
+ - name: Package .deb
+ if: inputs.build_packages == 'true'
+ shell: bash
+ env:
+ VERSION: ${{ inputs.version }}
+ ARCH: ${{ inputs.arch }}
+ run: |
+ cd wsjtx-build
+ cpack -G DEB \
+ -D "CPACK_DEBIAN_FILE_NAME=wsjtx-${VERSION}-linux-${ARCH}.deb"
+ DEB="wsjtx-${VERSION}-linux-${ARCH}.deb"
+ if [ ! -f "$DEB" ]; then
+ echo "::error::cpack -G DEB produced no .deb at expected path: $DEB"
+ ls -la *.deb 2>/dev/null || true
+ exit 1
+ fi
+ ls -lh "$DEB"
+ file "$DEB"
+ # sed instead of `| head -20` so dpkg-deb doesn't get SIGPIPE'd by
+ # head's early close — interacts badly with `bash -o pipefail` under
+ # Bookworm's dpkg-deb (observed exit 141 on first container run).
+ dpkg-deb --info "$DEB" | sed -n '1,20p'
+ source ../.github/scripts/linux-artifact-validation.sh
+ validate_deb_package "$DEB"
+
+ - name: Upload .deb
+ if: inputs.build_packages == 'true'
+ uses: actions/upload-artifact@v7
+ with:
+ name: wsjtx-${{ inputs.version }}-linux-${{ inputs.arch }}-deb
+ path: wsjtx-build/wsjtx-${{ inputs.version }}-linux-${{ inputs.arch }}.deb
+ if-no-files-found: error
+ compression-level: 0
+
+ # RPM builds via the same CPack scaffolding the .deb step above
+ # uses. CMakeLists.txt:2014-2026 already auto-detects rpmbuild and
+ # sets the Fedora-style dependency list (qt5-qtbase >= 5.9, fftw-
+ # libs-single, boost-log, etc.); only the workflow side was
+ # missing. `-G RPM` is explicit so this step doesn't accidentally
+ # rebuild the .deb already produced above.
+ - name: Package RPM
+ if: inputs.build_packages == 'true'
+ shell: bash
+ working-directory: wsjtx-build
+ run: |
+ cpack -G RPM
+ ls -lh *.rpm
+
+ - name: Smoke-test RPM
+ if: inputs.build_packages == 'true'
+ shell: bash
+ working-directory: wsjtx-build
+ run: |
+ rpms=(*.rpm)
+ RPM=${rpms[0]}
+ echo "Querying $RPM"
+ rpm -qpi "$RPM"
+ rpm -qpR "$RPM"
+ source ../.github/scripts/linux-artifact-validation.sh
+ validate_rpm_package "$RPM"
+
+ - name: Upload RPM
+ if: inputs.build_packages == 'true'
+ uses: actions/upload-artifact@v7
+ with:
+ name: wsjtx-${{ inputs.version }}-linux-${{ inputs.arch }}-rpm
+ path: wsjtx-build/*.rpm
+ if-no-files-found: error
+ compression-level: 0
+
+ - name: Install to AppDir
+ if: inputs.build_packages == 'true'
+ shell: bash
+ env:
+ ARCH: ${{ inputs.arch }}
+ run: |
+ cmake --install wsjtx-build --prefix "${GITHUB_WORKSPACE}/AppDir/usr"
+ source .github/scripts/linux-artifact-validation.sh
+ validate_linux_application_tree AppDir appdir "$ARCH"
+
+ - name: Package AppImage
+ if: inputs.build_packages == 'true'
+ shell: bash
+ env:
+ VERSION: ${{ inputs.version }}
+ ARCH: ${{ inputs.arch }}
+ # Core linuxdeploy is pinned to a dated release. The Qt5 plugin
+ # stays on the rolling "continuous" channel because upstream has
+ # not cut a dated release since 1-alpha-20250213-1, which carries
+ # a filesystem_error bug on ubuntu-24.04 / Qt5.15.
+ LINUXDEPLOY_TAG: "1-alpha-20251107-1"
+ # Force every AppImage spawned by linuxdeploy (the qt plugin and
+ # appimagetool, both invoked as AppImages internally) to use
+ # `--appimage-extract-and-run` instead of expecting FUSE to be
+ # available. The host runner has libfuse2 installed by default so
+ # the plain `./linuxdeploy.AppImage --appimage-extract-and-run`
+ # was enough for x86_64; the Bookworm container has no FUSE and the
+ # plugin AppImage's first call (`--plugin-api-version`) exits 127
+ # without this env var. APPIMAGE_EXTRACT_AND_RUN=1 is the
+ # AppImage runtime's documented FUSE-less escape hatch.
+ APPIMAGE_EXTRACT_AND_RUN: "1"
+ run: |
+ curl_flags=(--fail --show-error --silent --location --retry 5 --retry-delay 5)
+ github_api_token='${{ github.token }}'
+ github_api_curl() {
+ local api_headers=(-H "User-Agent: wsjtx-ci")
+ if [ -n "$github_api_token" ]; then
+ api_headers+=(-H "Authorization: Bearer ${github_api_token}")
+ env GITHUB_TOKEN="$github_api_token" curl "${curl_flags[@]}" "${api_headers[@]}" "$@"
+ else
+ curl "${curl_flags[@]}" "${api_headers[@]}" "$@"
+ fi
+ }
+ case "$ARCH" in
+ x86_64)
+ LINUXDEPLOY_SHA256="c20cd71e3a4e3b80c3483cef793cda3f4e990aca14014d23c544ca3ce1270b4d"
+ ;;
+ aarch64)
+ LINUXDEPLOY_SHA256="620095110d693282b8ebeb244a95b5e911cf8f65f76c88b4b47d16ae6346fcff"
+ ;;
+ *) echo "::error::Unknown linuxdeploy arch: $ARCH"; exit 1 ;;
+ esac
+
+ QT_PLUGIN_ASSET_NAME="linuxdeploy-plugin-qt-${ARCH}.AppImage"
+ QT_PLUGIN_ASSET_ID="$(
+ github_api_curl -H "Accept: application/vnd.github+json" \
+ "https://api.github.com/repos/linuxdeploy/linuxdeploy-plugin-qt/releases/tags/continuous" |
+ python3 -c 'import json, sys; name = sys.argv[1]; matches = [asset for asset in json.load(sys.stdin)["assets"] if asset["name"] == name]; print(matches[0]["id"]) if matches else sys.exit("asset not found: " + name)' "$QT_PLUGIN_ASSET_NAME"
+ )"
+
+ # Resolve the current asset ID because the Qt plugin intentionally
+ # follows upstream's rolling continuous release.
+ curl "${curl_flags[@]}" -o linuxdeploy.AppImage \
+ "https://github.com/linuxdeploy/linuxdeploy/releases/download/${LINUXDEPLOY_TAG}/linuxdeploy-${ARCH}.AppImage"
+ github_api_curl -H "Accept: application/octet-stream" -o linuxdeploy-plugin-qt.AppImage \
+ "https://api.github.com/repos/linuxdeploy/linuxdeploy-plugin-qt/releases/assets/${QT_PLUGIN_ASSET_ID}"
+ echo "${LINUXDEPLOY_SHA256} linuxdeploy.AppImage" | sha256sum -c -
+ chmod +x linuxdeploy.AppImage linuxdeploy-plugin-qt.AppImage
+
+ # --appimage-extract-and-run on linuxdeploy itself + the env-var
+ # above on every child AppImage means the whole pipeline runs
+ # FUSE-free.
+ export OUTPUT="wsjtx-${VERSION}-linux-${ARCH}.AppImage"
+ env -u GITHUB_TOKEN ./linuxdeploy.AppImage --appimage-extract-and-run \
+ --appdir AppDir \
+ --plugin qt \
+ --output appimage \
+ --desktop-file AppDir/usr/share/applications/wsjtx.desktop \
+ --icon-file AppDir/usr/share/pixmaps/wsjtx_icon.png
+
+ ls -lh "$OUTPUT"
+ file "$OUTPUT"
+
+ - name: Smoke-test AppImage payload
+ if: inputs.build_packages == 'true'
+ shell: bash
+ env:
+ VERSION: ${{ inputs.version }}
+ ARCH: ${{ inputs.arch }}
+ run: |
+ APPIMAGE="wsjtx-${VERSION}-linux-${ARCH}.AppImage"
+ ./"$APPIMAGE" --appimage-extract >/dev/null
+ source .github/scripts/linux-artifact-validation.sh
+ validate_linux_application_tree squashfs-root appimage "$ARCH"
+ rm -rf squashfs-root
+
+ - name: Runtime-smoke-test AppImage
+ if: inputs.build_packages == 'true'
+ id: appimage_runtime_smoke
+ shell: bash
+ env:
+ VERSION: ${{ inputs.version }}
+ ARCH: ${{ inputs.arch }}
+ run: |
+ APPIMAGE="wsjtx-${VERSION}-linux-${ARCH}.AppImage"
+ LOG="wsjtx-build/appimage-startup-smoke.log"
+ source .github/scripts/linux-artifact-validation.sh
+ run_packaged_appimage_startup_smoke "./$APPIMAGE" "$LOG"
+
+ - name: Upload AppImage startup diagnostics
+ if: inputs.build_packages == 'true' && failure() && steps.appimage_runtime_smoke.outcome == 'failure'
+ uses: actions/upload-artifact@v7
+ with:
+ name: wsjtx-startup-smoke-linux-${{ inputs.arch }}
+ path: wsjtx-build/appimage-startup-smoke.log
+ if-no-files-found: ignore
+ retention-days: 7
+
+ - name: Upload AppImage
+ if: inputs.build_packages == 'true'
+ uses: actions/upload-artifact@v7
+ with:
+ name: wsjtx-${{ inputs.version }}-linux-${{ inputs.arch }}-AppImage
+ path: wsjtx-${{ inputs.version }}-linux-${{ inputs.arch }}.AppImage
+ if-no-files-found: error
+ compression-level: 0
+
+ - name: Upload build artifacts
+ if: inputs.build_packages == 'true'
+ uses: actions/upload-artifact@v7
+ with:
+ name: wsjtx-${{ inputs.version }}-linux-${{ inputs.arch }}
+ path: |
+ wsjtx-build/jt9
+ wsjtx-build/wsprd
+ wsjtx-build/wsjtx
+
+ - name: Report suppressed ccache save
+ if: inputs.save_ccache == 'true' && steps.image.outputs.recipe_match != 'true'
+ shell: bash
+ run: echo "::notice::Not saving ccache because this build used a stale Linux CI image recipe"
+
+ - name: Save ccache
+ if: inputs.save_ccache == 'true' && steps.image.outputs.recipe_match == 'true' && steps.ccache.outputs.cache-hit != 'true'
+ uses: actions/cache/save@v5
+ with:
+ path: .ccache
+ key: ${{ steps.ccache.outputs.cache-primary-key }}
diff --git a/.github/actions/build-linux-sanitizers/action.yml b/.github/actions/build-linux-sanitizers/action.yml
new file mode 100644
index 00000000..a9a6de6e
--- /dev/null
+++ b/.github/actions/build-linux-sanitizers/action.yml
@@ -0,0 +1,277 @@
+name: "Build Linux sanitizers"
+description: >-
+ Build and test WSJT-X with GCC sanitizers on Linux x86_64.
+
+inputs:
+ hamlib_branch:
+ description: "Hamlib branch to build"
+ required: true
+ sanitizer:
+ description: "Sanitizer mode: asan-ubsan or tsan"
+ required: false
+ default: "asan-ubsan"
+ recache:
+ description: "Force ccache to recompile and refresh cached objects"
+ required: false
+ default: "false"
+ save_ccache:
+ description: "Save compiled objects for trusted builds"
+ required: false
+ default: "false"
+ allow_stale_image:
+ description: "Allow a previously promoted image when a dependency refresh changed the recipe"
+ required: false
+ default: "false"
+
+runs:
+ using: "composite"
+ steps:
+ - name: Validate workflow inputs
+ shell: bash
+ env:
+ HAMLIB_BRANCH: ${{ inputs.hamlib_branch }}
+ run: .github/scripts/validate-ci-inputs.sh
+
+ - name: Resolve sanitizer configuration
+ id: sanitizer
+ shell: bash
+ env:
+ SANITIZER: ${{ inputs.sanitizer }}
+ run: |
+ case "$SANITIZER" in
+ asan-ubsan)
+ echo "build_dir=wsjtx-sanitizer-build" >> "$GITHUB_OUTPUT"
+ echo "ccache_dir=.ccache-sanitizers" >> "$GITHUB_OUTPUT"
+ echo "cache_key=asan-ubsan-gcc" >> "$GITHUB_OUTPUT"
+ echo "cmake_option=WSJT_ENABLE_ASAN_UBSAN" >> "$GITHUB_OUTPUT"
+ echo "summary_name=Linux x86_64 ASan + UBSan" >> "$GITHUB_OUTPUT"
+ echo "artifact_name=ctest-results-linux-x86_64-asan-ubsan" >> "$GITHUB_OUTPUT"
+ echo "asan_options=detect_leaks=0:detect_stack_use_after_return=1:halt_on_error=1:abort_on_error=1" >> "$GITHUB_OUTPUT"
+ echo "ubsan_options=halt_on_error=1:print_stacktrace=1" >> "$GITHUB_OUTPUT"
+ echo "tsan_options=" >> "$GITHUB_OUTPUT"
+ ;;
+ tsan)
+ echo "build_dir=wsjtx-tsan-build" >> "$GITHUB_OUTPUT"
+ echo "ccache_dir=.ccache-tsan" >> "$GITHUB_OUTPUT"
+ echo "cache_key=tsan-gcc" >> "$GITHUB_OUTPUT"
+ echo "cmake_option=WSJT_ENABLE_TSAN" >> "$GITHUB_OUTPUT"
+ echo "summary_name=Linux x86_64 TSan" >> "$GITHUB_OUTPUT"
+ echo "artifact_name=ctest-results-linux-x86_64-tsan" >> "$GITHUB_OUTPUT"
+ echo "asan_options=" >> "$GITHUB_OUTPUT"
+ echo "ubsan_options=" >> "$GITHUB_OUTPUT"
+ tsan_suppressions="${GITHUB_WORKSPACE}/tests/sanitizers/tsan.supp"
+ if [ ! -f "$tsan_suppressions" ]; then
+ echo "::error::TSan suppressions file not found: $tsan_suppressions"
+ exit 1
+ fi
+ echo "tsan_options=halt_on_error=0:second_deadlock_stack=1:suppressions=${tsan_suppressions}" >> "$GITHUB_OUTPUT"
+ ;;
+ *)
+ echo "::error::Unsupported sanitizer mode: $SANITIZER"
+ exit 1
+ ;;
+ esac
+
+ - name: Verify Linux CI image
+ id: image
+ shell: bash
+ env:
+ WSJTX_CI_IMAGE_ALLOW_RECIPE_MISMATCH: ${{ inputs.allow_stale_image }}
+ run: |
+ flavor=normal
+ if [ "${{ inputs.sanitizer }}" = tsan ]; then
+ flavor=tsan
+ fi
+ .github/scripts/verify-linux-ci-image.sh \
+ "$flavor" x86_64 "${{ inputs.hamlib_branch }}"
+
+ - name: Export TSan dependency environment
+ if: inputs.sanitizer == 'tsan'
+ shell: bash
+ run: |
+ {
+ echo "CC=gcc-13"
+ echo "CXX=g++-13"
+ echo "FC=gfortran-13"
+ echo "TSAN_QT_PREFIX=${{ steps.image.outputs.qt_prefix }}"
+ echo "TSAN_BOOST_PREFIX=${{ steps.image.outputs.boost_prefix }}"
+ echo "TSAN_HAMLIB_PREFIX=${{ steps.image.outputs.hamlib_prefix }}"
+ echo "TSAN_CMAKE_PREFIX_PATH=${{ steps.image.outputs.qt_prefix }};${{ steps.image.outputs.boost_prefix }};${{ steps.image.outputs.hamlib_prefix }}"
+ echo "LD_LIBRARY_PATH=${{ steps.image.outputs.qt_prefix }}/lib:${{ steps.image.outputs.boost_prefix }}/lib:${LD_LIBRARY_PATH:-}"
+ echo "PKG_CONFIG_PATH=${{ steps.image.outputs.qt_prefix }}/lib/pkgconfig:${{ steps.image.outputs.boost_prefix }}/lib/pkgconfig:${{ steps.image.outputs.hamlib_prefix }}/lib/pkgconfig:${PKG_CONFIG_PATH:-}"
+ echo "QT_PLUGIN_PATH=${{ steps.image.outputs.qt_prefix }}/plugins"
+ } >> "$GITHUB_ENV"
+ echo "${{ steps.image.outputs.qt_prefix }}/bin" >> "$GITHUB_PATH"
+
+ - name: Select ccache key
+ id: ccache-key
+ shell: bash
+ env:
+ RECACHE: ${{ inputs.recache }}
+ run: .github/scripts/select-ccache-key-suffix.sh
+
+ - name: Restore sanitizer objects
+ id: ccache
+ uses: actions/cache/restore@v5
+ with:
+ path: ${{ steps.sanitizer.outputs.ccache_dir }}
+ key: ccache-linux-x86_64-${{ steps.sanitizer.outputs.cache_key }}-${{ steps.image.outputs.ccache_compatibility_id }}-${{ steps.image.outputs.generation }}-${{ github.sha }}${{ steps.ccache-key.outputs.suffix }}
+ restore-keys: |
+ ccache-linux-x86_64-${{ steps.sanitizer.outputs.cache_key }}-${{ steps.image.outputs.ccache_compatibility_id }}-${{ steps.image.outputs.generation }}-
+ ccache-linux-x86_64-${{ steps.sanitizer.outputs.cache_key }}-${{ steps.image.outputs.ccache_compatibility_id }}-
+
+ - name: Configure ccache
+ shell: bash
+ run: |
+ export CCACHE_DIR="${GITHUB_WORKSPACE}/${{ steps.sanitizer.outputs.ccache_dir }}"
+ export CCACHE_COMPILERCHECK="${{ steps.image.outputs.ccache_compiler_check }}"
+ {
+ echo "CCACHE_DIR=$CCACHE_DIR"
+ echo "CCACHE_COMPILERCHECK=$CCACHE_COMPILERCHECK"
+ } >> "$GITHUB_ENV"
+ echo "ccache recache: ${{ inputs.recache }}"
+ if [ "${{ inputs.recache }}" = "true" ]; then
+ echo "CCACHE_RECACHE=1" >> "$GITHUB_ENV"
+ echo "Forcing ccache recache for this run"
+ fi
+ mkdir -p "$CCACHE_DIR"
+ ccache --version
+ ccache --show-config
+ ccache --zero-stats
+
+ - name: Configure sanitizer build
+ shell: bash
+ run: |
+ prefix_path="${{ steps.image.outputs.hamlib_prefix }}"
+ compiler_args=()
+ boost_args=()
+ if [ "${{ inputs.sanitizer }}" = "tsan" ]; then
+ prefix_path="$TSAN_CMAKE_PREFIX_PATH"
+ compiler_args=(
+ -DCMAKE_C_COMPILER="$CC"
+ -DCMAKE_CXX_COMPILER="$CXX"
+ -DCMAKE_Fortran_COMPILER="$FC"
+ )
+ boost_args=(
+ -DBOOST_ROOT="$TSAN_BOOST_PREFIX"
+ -DBoost_NO_SYSTEM_PATHS=ON
+ )
+ fi
+
+ cmake -S . -B "${{ steps.sanitizer.outputs.build_dir }}" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
+ -DCMAKE_PREFIX_PATH="$prefix_path" \
+ -DCMAKE_C_COMPILER_LAUNCHER=ccache \
+ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
+ -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
+ -DWSJT_GENERATE_DOCS=OFF \
+ -DWSJT_SKIP_MANPAGES=ON \
+ -DWSJT_ENABLE_TESTS=ON \
+ -DWSJT_ENABLE_GUI_SMOKE_TESTS=ON \
+ -D${{ steps.sanitizer.outputs.cmake_option }}=ON \
+ -DWSJT_BUILD_UTILS=OFF \
+ -DWSJT_FORTRAN_LIBRARY_VARIANTS=OPENMP_ONLY \
+ "${compiler_args[@]}" \
+ "${boost_args[@]}" \
+ -Wno-dev
+
+ - name: Verify configured TSan dependency resolution
+ if: inputs.sanitizer == 'tsan'
+ shell: bash
+ run: >-
+ .github/scripts/verify-tsan-deps-linux.sh
+ "$TSAN_QT_PREFIX"
+ "$TSAN_BOOST_PREFIX"
+ "$TSAN_HAMLIB_PREFIX"
+ "${{ steps.sanitizer.outputs.build_dir }}/CMakeCache.txt"
+
+ - name: Build sanitizer targets
+ shell: bash
+ run: cmake --build "${{ steps.sanitizer.outputs.build_dir }}" -j"$(nproc)"
+
+ - name: Show ccache stats
+ if: always()
+ shell: bash
+ run: ccache --show-stats
+
+ - name: Verify sanitizer instrumentation
+ shell: bash
+ run: >-
+ python3 .github/scripts/verify-sanitizer-instrumentation.py
+ "${{ steps.sanitizer.outputs.build_dir }}"
+ --sanitizer "${{ inputs.sanitizer }}"
+
+ - name: Verify linked TSan dependency runtime
+ if: inputs.sanitizer == 'tsan'
+ shell: bash
+ run: >-
+ .github/scripts/verify-tsan-deps-linux.sh
+ "$TSAN_QT_PREFIX"
+ "$TSAN_BOOST_PREFIX"
+ "$TSAN_HAMLIB_PREFIX"
+ "${{ steps.sanitizer.outputs.build_dir }}/CMakeCache.txt"
+ "${{ steps.sanitizer.outputs.build_dir }}/wsjtx"
+
+ - name: Prepare test scratch directory
+ shell: bash
+ run: mkdir -p "${GITHUB_WORKSPACE}/${{ steps.sanitizer.outputs.build_dir }}/tmp"
+
+ - name: Run tests
+ id: ctest
+ continue-on-error: true
+ shell: bash
+ working-directory: ${{ steps.sanitizer.outputs.build_dir }}
+ env:
+ ASAN_OPTIONS: ${{ steps.sanitizer.outputs.asan_options }}
+ UBSAN_OPTIONS: ${{ steps.sanitizer.outputs.ubsan_options }}
+ TSAN_OPTIONS: ${{ steps.sanitizer.outputs.tsan_options }}
+ QT_QPA_PLATFORM: xcb
+ TMPDIR: ${{ github.workspace }}/${{ steps.sanitizer.outputs.build_dir }}/tmp
+ run: >-
+ xvfb-run -a -s "-screen 0 1280x1024x24"
+ ctest --parallel 1 --output-on-failure --output-junit ctest-results.xml
+
+ - name: Publish test summary
+ if: always() && steps.ctest.outcome != 'skipped'
+ shell: bash
+ working-directory: ${{ steps.sanitizer.outputs.build_dir }}
+ run: >-
+ python3 ../.github/scripts/publish-ctest-summary.py
+ "${{ steps.sanitizer.outputs.summary_name }}" >> "$GITHUB_STEP_SUMMARY"
+
+ - name: Upload test results
+ if: always() && steps.ctest.outcome != 'skipped'
+ uses: actions/upload-artifact@v7
+ with:
+ name: ${{ steps.sanitizer.outputs.artifact_name }}
+ path: |
+ ${{ steps.sanitizer.outputs.build_dir }}/ctest-results.xml
+ ${{ steps.sanitizer.outputs.build_dir }}/Testing/Temporary/LastTest.log
+ ${{ steps.sanitizer.outputs.build_dir }}/Testing/Golden/test_jt9_mtd_ft8_210703_133430*/stderr.txt
+ if-no-files-found: ignore
+
+ - name: Require sanitizer tests to pass
+ if: always()
+ shell: bash
+ run: |
+ failed=false
+ if [ "${{ steps.ctest.outcome }}" != "success" ]; then
+ echo "::error::CTest failed under ${{ steps.sanitizer.outputs.summary_name }}"
+ failed=true
+ fi
+ if [ "$failed" = "true" ]; then
+ exit 1
+ fi
+
+ - name: Report suppressed sanitizer ccache save
+ if: inputs.save_ccache == 'true' && steps.image.outputs.recipe_match != 'true'
+ shell: bash
+ run: echo "::notice::Not saving sanitizer ccache because this build used a stale Linux CI image recipe"
+
+ - name: Save sanitizer objects
+ if: inputs.save_ccache == 'true' && steps.image.outputs.recipe_match == 'true' && steps.ccache.outputs.cache-hit != 'true'
+ uses: actions/cache/save@v5
+ with:
+ path: ${{ steps.sanitizer.outputs.ccache_dir }}
+ key: ${{ steps.ccache.outputs.cache-primary-key }}
diff --git a/.github/actions/build-windows-deps/action.yml b/.github/actions/build-windows-deps/action.yml
new file mode 100644
index 00000000..9f1d2d07
--- /dev/null
+++ b/.github/actions/build-windows-deps/action.yml
@@ -0,0 +1,174 @@
+name: "Build Windows dependencies"
+description: "Restore or populate Windows Boost, pFUnit, and Hamlib dependency caches."
+
+inputs:
+ boost_version:
+ description: "Boost version to build"
+ required: false
+ default: "1.91.0"
+ boost_source_sha256:
+ description: "Expected SHA-256 for the Boost source archive"
+ required: false
+ default: "de5e6b0e4913395c6bdfa90537febd9028ea4c0735d2cdb0cd9b45d5f51264f5"
+ windows_api_floor:
+ description: "Windows API floor used for Boost and WSJT-X builds"
+ required: false
+ default: "0x0601"
+ hamlib_branch:
+ description: "Hamlib branch to build"
+ required: true
+ save_caches:
+ description: "Whether to save dependency caches on misses"
+ required: false
+ default: "true"
+
+outputs:
+ boost_prefix:
+ description: "MSYS path to the Boost prefix"
+ value: ${{ steps.paths.outputs.boost_prefix }}
+ hamlib_prefix:
+ description: "MSYS path to the Hamlib prefix"
+ value: ${{ steps.paths.outputs.hamlib_prefix }}
+ pfunit_dir:
+ description: "Directory containing PFUNITConfig.cmake"
+ value: ${{ steps.pfunit.outputs.pfunit_dir }}
+ gftl_dir:
+ description: "Directory containing GFTLConfig.cmake"
+ value: ${{ steps.pfunit.outputs.gftl_dir }}
+ gftl_shared_dir:
+ description: "Directory containing GFTL_SHAREDConfig.cmake"
+ value: ${{ steps.pfunit.outputs.gftl_shared_dir }}
+ fargparse_dir:
+ description: "Directory containing FARGPARSEConfig.cmake"
+ value: ${{ steps.pfunit.outputs.fargparse_dir }}
+
+runs:
+ using: "composite"
+ steps:
+ - name: Validate workflow inputs
+ shell: bash
+ env:
+ HAMLIB_BRANCH: ${{ inputs.hamlib_branch }}
+ run: .github/scripts/validate-ci-inputs.sh
+
+ - name: Resolve dependency prefixes
+ id: paths
+ shell: msys2 {0}
+ run: |
+ WORKSPACE=$(cygpath "${GITHUB_WORKSPACE}")
+ {
+ echo "boost_prefix=${WORKSPACE}/boost-prefix"
+ echo "hamlib_prefix=${WORKSPACE}/hamlib-prefix"
+ echo "pfunit_prefix=${WORKSPACE}/pfunit-prefix"
+ } >> "$GITHUB_OUTPUT"
+
+ - name: Restore Boost cache
+ id: boost-cache
+ uses: actions/cache/restore@v6
+ with:
+ path: boost-prefix
+ key: boost-windows-windows-latest-mingw64-${{ inputs.boost_version }}-${{ inputs.boost_source_sha256 }}-winapi${{ inputs.windows_api_floor }}-epoch1-${{ hashFiles('.github/scripts/build-boost-windows.sh') }}
+
+ - name: Build Boost
+ if: steps.boost-cache.outputs.cache-hit != 'true'
+ shell: msys2 {0}
+ run: .github/scripts/build-boost-windows.sh "${{ inputs.boost_version }}" "${{ inputs.boost_source_sha256 }}" "${{ inputs.windows_api_floor }}" "${{ steps.paths.outputs.boost_prefix }}"
+
+ - name: Save Boost cache
+ if: inputs.save_caches == 'true' && steps.boost-cache.outputs.cache-hit != 'true'
+ uses: actions/cache/save@v6
+ with:
+ path: boost-prefix
+ key: ${{ steps.boost-cache.outputs.cache-primary-key }}
+
+ - name: Verify Boost Windows API floor
+ shell: msys2 {0}
+ run: |
+ boost_dlls=("${{ steps.paths.outputs.boost_prefix }}"/lib/libboost_*.dll)
+ if [ ! -e "${boost_dlls[0]}" ]; then
+ echo "::error::Boost DLLs not found under ${{ steps.paths.outputs.boost_prefix }}/lib"
+ ls -la "${{ steps.paths.outputs.boost_prefix }}/lib" || true
+ exit 1
+ fi
+ bad=0
+ for boost_dll in "${boost_dlls[@]}"; do
+ echo "Inspecting ${boost_dll}"
+ objdump -p "$boost_dll" | awk '/DLL Name:/ {print " " $3}' | sort -u
+ if objdump -p "$boost_dll" | awk '/WaitOnAddress|WakeByAddressSingle|WakeByAddressAll|api-ms-win-core-synch-l1-2-0\.dll/ { found=1; print } END { exit found ? 0 : 1 }'; then
+ echo "::error::${boost_dll} imports Windows 8+ synchronization APIs"
+ bad=1
+ fi
+ done
+ exit "$bad"
+
+ - name: Locate gfortran
+ id: fc
+ shell: msys2 {0}
+ run: echo "version=$(gfortran -dumpfullversion -dumpversion)" >> "$GITHUB_OUTPUT"
+
+ - name: Restore pFUnit cache
+ id: pfunit-cache
+ uses: actions/cache/restore@v6
+ with:
+ path: pfunit-prefix
+ key: pfunit-windows-windows-latest-mingw64-v4.14.0-gfortran${{ steps.fc.outputs.version }}-epoch1-${{ hashFiles('.github/scripts/build-pfunit-windows.sh') }}
+
+ - name: Build pFUnit
+ if: steps.pfunit-cache.outputs.cache-hit != 'true'
+ shell: msys2 {0}
+ run: .github/scripts/build-pfunit-windows.sh v4.14.0 "${{ steps.paths.outputs.pfunit_prefix }}"
+
+ - name: Locate pFUnit config
+ id: pfunit
+ shell: msys2 {0}
+ run: |
+ for pkg in PFUNIT GFTL GFTL_SHARED FARGPARSE; do
+ CONFIG=$(find "${{ steps.paths.outputs.pfunit_prefix }}" -name ${pkg}Config.cmake | head -1)
+ if [ -z "$CONFIG" ]; then
+ echo "ERROR: ${pkg}Config.cmake not found under pfunit-prefix"
+ find "${{ steps.paths.outputs.pfunit_prefix }}" -maxdepth 3 -type d
+ exit 1
+ fi
+ DIR="$(dirname "$CONFIG")"
+ echo "Found ${pkg}Config.cmake at: $CONFIG"
+ echo "$(echo $pkg | tr '[:upper:]' '[:lower:]')_dir=${DIR}" >> "$GITHUB_OUTPUT"
+ done
+
+ - name: Save pFUnit cache
+ if: inputs.save_caches == 'true' && steps.pfunit-cache.outputs.cache-hit != 'true'
+ uses: actions/cache/save@v6
+ with:
+ path: pfunit-prefix
+ key: ${{ steps.pfunit-cache.outputs.cache-primary-key }}
+
+ - name: Restore Hamlib cache
+ id: hamlib-cache
+ uses: actions/cache/restore@v6
+ with:
+ path: hamlib-prefix
+ key: hamlib-windows-windows-latest-mingw64-${{ inputs.hamlib_branch }}-epoch2-${{ hashFiles('.github/scripts/build-hamlib-windows.sh') }}
+
+ - name: Build Hamlib
+ if: steps.hamlib-cache.outputs.cache-hit != 'true'
+ shell: msys2 {0}
+ env:
+ MSYS2_PATH_TYPE: inherit
+ HAMLIB_BRANCH: ${{ inputs.hamlib_branch }}
+ run: .github/scripts/build-hamlib-windows.sh "$HAMLIB_BRANCH" "${{ steps.paths.outputs.hamlib_prefix }}"
+
+ - name: Verify Hamlib prefix
+ shell: msys2 {0}
+ run: |
+ test -f "${{ steps.paths.outputs.hamlib_prefix }}/bin/libhamlib-4.dll"
+ test -f "${{ steps.paths.outputs.hamlib_prefix }}/bin/rigctl.exe"
+ test -f "${{ steps.paths.outputs.hamlib_prefix }}/bin/rigctld.exe"
+ test -f "${{ steps.paths.outputs.hamlib_prefix }}/bin/rigctlcom.exe"
+ test -f "${{ steps.paths.outputs.hamlib_prefix }}/include/hamlib/rig.h"
+ test -f "${{ steps.paths.outputs.hamlib_prefix }}/lib/libhamlib.dll.a"
+
+ - name: Save Hamlib cache
+ if: inputs.save_caches == 'true' && steps.hamlib-cache.outputs.cache-hit != 'true'
+ uses: actions/cache/save@v6
+ with:
+ path: hamlib-prefix
+ key: ${{ steps.hamlib-cache.outputs.cache-primary-key }}
diff --git a/.github/actions/warm-macos-deps/action.yml b/.github/actions/warm-macos-deps/action.yml
new file mode 100644
index 00000000..74ef9423
--- /dev/null
+++ b/.github/actions/warm-macos-deps/action.yml
@@ -0,0 +1,330 @@
+name: "Warm macOS dependency caches"
+description: "Restore or populate macOS Qt and pinned dependency caches without building WSJT-X."
+
+inputs:
+ arch:
+ description: "Target architecture: arm64 or x86_64"
+ required: true
+ runner:
+ description: "GitHub Actions runner label"
+ required: true
+ deployment_target:
+ description: "macOS deployment target version"
+ required: true
+ hamlib_branch:
+ description: "Hamlib branch to build"
+ required: true
+
+runs:
+ using: "composite"
+ steps:
+ - name: Validate workflow inputs
+ shell: bash
+ env:
+ HAMLIB_BRANCH: ${{ inputs.hamlib_branch }}
+ ARCH: ${{ inputs.arch }}
+ DEPLOYMENT_TARGET: ${{ inputs.deployment_target }}
+ RUNNER: ${{ inputs.runner }}
+ run: .github/scripts/validate-ci-inputs.sh
+
+ - name: Verify macOS build tuple
+ shell: bash
+ run: |
+ case "${{ inputs.arch }}:${{ inputs.runner }}:${{ inputs.deployment_target }}" in
+ arm64:macos-15:11.0|x86_64:macos-15-intel:10.13)
+ echo "Using supported macOS dependency tuple: ${{ inputs.arch }} on ${{ inputs.runner }} targeting ${{ inputs.deployment_target }}"
+ ;;
+ *)
+ echo "::error::Unsupported macOS dependency tuple: arch=${{ inputs.arch }}, runner=${{ inputs.runner }}, deployment_target=${{ inputs.deployment_target }}"
+ exit 1
+ ;;
+ esac
+
+ - name: Set Homebrew prefix
+ shell: bash
+ run: echo "HOMEBREW_PREFIX=$(brew --prefix)" >> "$GITHUB_ENV"
+
+ - name: Install dependencies
+ shell: bash
+ run: brew install cmake autoconf automake libtool pkg-config
+
+ - name: Compute Qt cache key
+ id: qt-key
+ shell: bash
+ run: |
+ .github/scripts/macos-qt-cache-key.sh \
+ --arch "${{ inputs.arch }}" \
+ --runner "${{ inputs.runner }}" \
+ --deployment-target "${{ inputs.deployment_target }}" \
+ --github-output
+
+ - name: Restore Qt cache
+ id: qt-cache
+ uses: actions/cache/restore@v5
+ with:
+ path: qt-prefix
+ key: ${{ steps.qt-key.outputs.key }}
+
+ - name: Build Qt
+ if: steps.qt-cache.outputs.cache-hit != 'true'
+ shell: bash
+ run: |
+ .github/scripts/build-qt-macos.sh \
+ --arch "${{ inputs.arch }}" \
+ --deployment-target "${{ inputs.deployment_target }}" \
+ --prefix "${GITHUB_WORKSPACE}/qt-prefix"
+
+ - name: Save Qt cache
+ if: steps.qt-cache.outputs.cache-hit != 'true'
+ uses: actions/cache/save@v5
+ with:
+ path: qt-prefix
+ key: ${{ steps.qt-cache.outputs.cache-primary-key }}
+
+ - name: Verify Qt prefix
+ shell: bash
+ run: |
+ .github/scripts/verify-macos-artifacts.sh \
+ --target "${{ inputs.deployment_target }}" \
+ --arch "${{ inputs.arch }}" \
+ --allow-prefix "${GITHUB_WORKSPACE}/qt-prefix" \
+ "${GITHUB_WORKSPACE}/qt-prefix"
+
+ - name: Install controlled ARM gfortran
+ id: controlled-arm-fc
+ if: inputs.arch == 'arm64'
+ shell: bash
+ run: |
+ .github/scripts/install-r-macos-gfortran.sh \
+ --target "${{ inputs.deployment_target }}" \
+ --arch "${{ inputs.arch }}" \
+ --work-dir "${RUNNER_TEMP}/r-macos-gfortran" \
+ --prefix "${GITHUB_WORKSPACE}/gfortran-prefix" \
+ --github-output
+
+ - name: Install controlled Intel gfortran
+ id: controlled-intel-fc
+ if: inputs.arch == 'x86_64'
+ shell: bash
+ run: |
+ .github/scripts/install-xpack-gfortran-macos.sh \
+ --target "${{ inputs.deployment_target }}" \
+ --arch "${{ inputs.arch }}" \
+ --work-dir "${RUNNER_TEMP}/xpack-gfortran" \
+ --prefix "${GITHUB_WORKSPACE}/gfortran-prefix" \
+ --github-output
+
+ - name: Select gfortran
+ id: fc
+ shell: bash
+ run: |
+ if [ "${{ inputs.arch }}" = "x86_64" ]; then
+ echo "Using controlled gfortran: ${{ steps.controlled-intel-fc.outputs.path }}"
+ {
+ echo "path=${{ steps.controlled-intel-fc.outputs.path }}"
+ echo "runtime_lib_dir=${{ steps.controlled-intel-fc.outputs.runtime_lib_dir }}"
+ echo "runtime_archives=${{ steps.controlled-intel-fc.outputs.runtime_archives }}"
+ echo "cache_key=${{ steps.controlled-intel-fc.outputs.cache_key }}"
+ } >> "$GITHUB_OUTPUT"
+ exit 0
+ fi
+
+ echo "Using controlled gfortran: ${{ steps.controlled-arm-fc.outputs.path }}"
+ {
+ echo "path=${{ steps.controlled-arm-fc.outputs.path }}"
+ echo "runtime_lib_dir=${{ steps.controlled-arm-fc.outputs.runtime_lib_dir }}"
+ echo "runtime_archives=${{ steps.controlled-arm-fc.outputs.runtime_archives }}"
+ echo "cache_key=${{ steps.controlled-arm-fc.outputs.cache_key }}"
+ } >> "$GITHUB_OUTPUT"
+
+ - name: Verify static Fortran runtime
+ shell: bash
+ run: |
+ .github/scripts/verify-macos-static-archives.sh \
+ --target "${{ inputs.deployment_target }}" \
+ --arch "${{ inputs.arch }}" \
+ --mode error \
+ ${{ steps.fc.outputs.runtime_archives }}
+
+ - name: Restore libusb cache
+ id: libusb-cache
+ uses: actions/cache/restore@v5
+ with:
+ path: libusb-prefix
+ key: libusb-macos-${{ inputs.arch }}-${{ inputs.runner }}-1.0.27-min${{ inputs.deployment_target }}-epoch1-${{ hashFiles('.github/scripts/build-libusb-macos.sh') }}
+
+ - name: Build libusb
+ if: steps.libusb-cache.outputs.cache-hit != 'true'
+ shell: bash
+ run: |
+ .github/scripts/build-libusb-macos.sh \
+ 1.0.27 \
+ "${{ inputs.deployment_target }}" \
+ "${GITHUB_WORKSPACE}/libusb-prefix"
+
+ - name: Save libusb cache
+ if: steps.libusb-cache.outputs.cache-hit != 'true'
+ uses: actions/cache/save@v5
+ with:
+ path: libusb-prefix
+ key: ${{ steps.libusb-cache.outputs.cache-primary-key }}
+
+ - name: Restore PortAudio cache
+ id: portaudio-cache
+ uses: actions/cache/restore@v5
+ with:
+ path: portaudio-prefix
+ key: portaudio-macos-${{ inputs.arch }}-${{ inputs.runner }}-19.7.0-min${{ inputs.deployment_target }}-epoch1-${{ hashFiles('.github/scripts/build-portaudio-macos.sh') }}
+
+ - name: Build PortAudio
+ if: steps.portaudio-cache.outputs.cache-hit != 'true'
+ shell: bash
+ run: |
+ .github/scripts/build-portaudio-macos.sh \
+ 19.7.0 \
+ "${{ inputs.deployment_target }}" \
+ "${GITHUB_WORKSPACE}/portaudio-prefix"
+
+ - name: Save PortAudio cache
+ if: steps.portaudio-cache.outputs.cache-hit != 'true'
+ uses: actions/cache/save@v5
+ with:
+ path: portaudio-prefix
+ key: ${{ steps.portaudio-cache.outputs.cache-primary-key }}
+
+ - name: Restore FFTW cache
+ id: fftw-cache
+ uses: actions/cache/restore@v5
+ with:
+ path: fftw-prefix
+ key: fftw-macos-${{ inputs.arch }}-${{ inputs.runner }}-3.3.10-min${{ inputs.deployment_target }}-epoch1-${{ hashFiles('.github/scripts/build-fftw-macos.sh') }}
+
+ - name: Build FFTW
+ if: steps.fftw-cache.outputs.cache-hit != 'true'
+ shell: bash
+ run: |
+ .github/scripts/build-fftw-macos.sh \
+ 3.3.10 \
+ "${{ inputs.deployment_target }}" \
+ "${GITHUB_WORKSPACE}/fftw-prefix"
+
+ - name: Save FFTW cache
+ if: steps.fftw-cache.outputs.cache-hit != 'true'
+ uses: actions/cache/save@v5
+ with:
+ path: fftw-prefix
+ key: ${{ steps.fftw-cache.outputs.cache-primary-key }}
+
+ - name: Restore Boost cache
+ id: boost-cache
+ uses: actions/cache/restore@v5
+ with:
+ path: boost-prefix
+ key: boost-macos-${{ inputs.arch }}-${{ inputs.runner }}-1.85.0-7009fe1faa1697476bdc7027703a2badb84e849b7b0baad5086b087b971f8617-min${{ inputs.deployment_target }}-epoch1-${{ hashFiles('.github/scripts/build-boost-macos.sh') }}
+
+ - name: Build Boost
+ if: steps.boost-cache.outputs.cache-hit != 'true'
+ shell: bash
+ run: |
+ .github/scripts/build-boost-macos.sh \
+ 1.85.0 \
+ 7009fe1faa1697476bdc7027703a2badb84e849b7b0baad5086b087b971f8617 \
+ "${{ inputs.arch }}" \
+ "${{ inputs.deployment_target }}" \
+ "${GITHUB_WORKSPACE}/boost-prefix"
+
+ - name: Save Boost cache
+ if: steps.boost-cache.outputs.cache-hit != 'true'
+ uses: actions/cache/save@v5
+ with:
+ path: boost-prefix
+ key: ${{ steps.boost-cache.outputs.cache-primary-key }}
+
+ - name: Verify pinned runtime prefixes
+ shell: bash
+ run: |
+ .github/scripts/verify-macos-artifacts.sh \
+ --target "${{ inputs.deployment_target }}" \
+ --arch "${{ inputs.arch }}" \
+ --allow-prefix "${GITHUB_WORKSPACE}/libusb-prefix" \
+ --allow-prefix "${GITHUB_WORKSPACE}/portaudio-prefix" \
+ --allow-prefix "${GITHUB_WORKSPACE}/fftw-prefix" \
+ --allow-prefix "${GITHUB_WORKSPACE}/boost-prefix" \
+ "${GITHUB_WORKSPACE}/libusb-prefix" \
+ "${GITHUB_WORKSPACE}/portaudio-prefix" \
+ "${GITHUB_WORKSPACE}/fftw-prefix" \
+ "${GITHUB_WORKSPACE}/boost-prefix"
+
+ - name: Restore Hamlib cache
+ id: hamlib-cache
+ uses: actions/cache/restore@v5
+ with:
+ path: hamlib-prefix
+ key: hamlib-macos-${{ inputs.arch }}-${{ inputs.runner }}-${{ inputs.hamlib_branch }}-libusb1.0.27-min${{ inputs.deployment_target }}-epoch1-${{ hashFiles('.github/scripts/build-hamlib-macos.sh', '.github/scripts/build-libusb-macos.sh') }}
+
+ - name: Build Hamlib
+ if: steps.hamlib-cache.outputs.cache-hit != 'true'
+ shell: bash
+ env:
+ HAMLIB_BRANCH: ${{ inputs.hamlib_branch }}
+ DEPLOYMENT_TARGET: ${{ inputs.deployment_target }}
+ run: |
+ .github/scripts/build-hamlib-macos.sh \
+ "$HAMLIB_BRANCH" \
+ "$DEPLOYMENT_TARGET" \
+ "${GITHUB_WORKSPACE}/hamlib-prefix" \
+ "${GITHUB_WORKSPACE}/libusb-prefix"
+
+ - name: Verify Hamlib prefix
+ shell: bash
+ run: |
+ test -f "${GITHUB_WORKSPACE}/hamlib-prefix/lib/libhamlib.a"
+ .github/scripts/verify-macos-static-archives.sh \
+ --target "${{ inputs.deployment_target }}" \
+ --arch "${{ inputs.arch }}" \
+ --mode error \
+ "${GITHUB_WORKSPACE}/hamlib-prefix/lib/libhamlib.a"
+
+ - name: Save Hamlib cache
+ if: steps.hamlib-cache.outputs.cache-hit != 'true'
+ uses: actions/cache/save@v5
+ with:
+ path: hamlib-prefix
+ key: ${{ steps.hamlib-cache.outputs.cache-primary-key }}
+
+ - name: Restore pFUnit cache
+ id: pfunit-cache
+ uses: actions/cache/restore@v5
+ with:
+ path: pfunit-prefix
+ key: pfunit-macos-${{ inputs.arch }}-${{ inputs.runner }}-v4.14.0-${{ steps.fc.outputs.cache_key }}-min${{ inputs.deployment_target }}-epoch3-${{ hashFiles('.github/scripts/build-pfunit-macos.sh') }}
+
+ - name: Build pFUnit
+ if: steps.pfunit-cache.outputs.cache-hit != 'true'
+ shell: bash
+ env:
+ DYLD_LIBRARY_PATH: ${{ steps.fc.outputs.runtime_lib_dir }}
+ run: |
+ .github/scripts/build-pfunit-macos.sh \
+ v4.14.0 \
+ "${{ steps.fc.outputs.path }}" \
+ "${{ inputs.deployment_target }}" \
+ "${GITHUB_WORKSPACE}/pfunit-prefix"
+
+ - name: Locate pFUnit config
+ shell: bash
+ run: |
+ config=$(find "${GITHUB_WORKSPACE}/pfunit-prefix" -name PFUNITConfig.cmake -print -quit)
+ if [ -z "$config" ]; then
+ echo "ERROR: PFUNITConfig.cmake not found under pfunit-prefix"
+ find "${GITHUB_WORKSPACE}/pfunit-prefix" -maxdepth 3 -type d
+ exit 1
+ fi
+ echo "Found PFUNITConfig.cmake at: $config"
+
+ - name: Save pFUnit cache
+ if: steps.pfunit-cache.outputs.cache-hit != 'true'
+ uses: actions/cache/save@v5
+ with:
+ path: pfunit-prefix
+ key: ${{ steps.pfunit-cache.outputs.cache-primary-key }}