diff options
| author | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:35 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:35 +0200 |
| commit | ffc62c792c9a5196cb4ce7a353287dfe20db6524 (patch) | |
| tree | 1269efa852935b183daae4bb33a58d1b4d2ffb53 /.github/actions | |
| parent | 059831534c7e884f0a607ed86b582fd00d821731 (diff) | |
New upstream version 3.3.0~beta1+dfsgupstream/3.3.0_beta1+dfsg
Diffstat (limited to '.github/actions')
| -rw-r--r-- | .github/actions/build-linux-payload/action.yml | 55 | ||||
| -rw-r--r-- | .github/actions/build-linux-sanitizers/action.yml | 99 | ||||
| -rw-r--r-- | .github/actions/build-windows-deps/action.yml | 24 | ||||
| -rw-r--r-- | .github/actions/upload-release-tarballs/action.yml | 51 | ||||
| -rw-r--r-- | .github/actions/warm-macos-deps/action.yml | 15 |
5 files changed, 222 insertions, 22 deletions
diff --git a/.github/actions/build-linux-payload/action.yml b/.github/actions/build-linux-payload/action.yml index f5ce1e0b..b4bc77f2 100644 --- a/.github/actions/build-linux-payload/action.yml +++ b/.github/actions/build-linux-payload/action.yml @@ -36,11 +36,11 @@ inputs: required: false default: "true" release_channel: - description: "Build release channel: DEVEL, RC, or GA" + description: "Build release channel: DEVEL, BETA, RC, GA, or empty for release-state.txt" required: false - default: "DEVEL" - rc_number: - description: "Release candidate number when release_channel is RC" + default: "" + prerelease_number: + description: "Prerelease number when release_channel is BETA or RC" required: false default: "" allow_stale_image: @@ -57,7 +57,7 @@ runs: WSJTX_VERSION: ${{ inputs.version }} HAMLIB_BRANCH: ${{ inputs.hamlib_branch }} WSJT_RELEASE_CHANNEL: ${{ inputs.release_channel }} - WSJT_RC_NUMBER: ${{ inputs.rc_number }} + WSJT_PRERELEASE_NUMBER: ${{ inputs.prerelease_number }} ARCH: ${{ inputs.arch }} VALIDATE_FORTRAN_FALLBACK: ${{ inputs.validate_fortran_fallback }} run: .github/scripts/validate-ci-inputs.sh @@ -160,7 +160,7 @@ runs: shell: bash env: WSJT_RELEASE_CHANNEL: ${{ inputs.release_channel }} - WSJT_RC_NUMBER: ${{ inputs.rc_number }} + WSJT_PRERELEASE_NUMBER: ${{ inputs.prerelease_number }} run: | cmake -S . -B wsjtx-build \ -DCMAKE_PREFIX_PATH="${{ steps.image.outputs.hamlib_prefix }};/opt/wsjtx/pfunit" \ @@ -171,7 +171,7 @@ runs: -DWSJT_ENABLE_GUI_SMOKE_TESTS=ON \ -DWSJT_FORTRAN_LIBRARY_VARIANTS=OPENMP_ONLY \ -DWSJT_RELEASE_CHANNEL="${WSJT_RELEASE_CHANNEL}" \ - -DWSJT_RC_NUMBER="${WSJT_RC_NUMBER}" \ + -DWSJT_PRERELEASE_NUMBER="${WSJT_PRERELEASE_NUMBER}" \ -DPFUNIT_DIR="${{ steps.image.outputs.pfunit_dir }}" \ -Wno-dev @@ -444,6 +444,47 @@ runs: wsjtx-build/wsprd wsjtx-build/wsjtx + # linuxdeploy.AppImage is the pinned copy the AppImage step downloaded + # and checked. + - name: Package release tarballs + if: inputs.build_packages == 'true' + shell: bash + env: + VERSION: ${{ inputs.version }} + ARCH: ${{ inputs.arch }} + run: | + .github/scripts/package-cli-tools.sh \ + --platform linux \ + --version "$VERSION" \ + --arch "$ARCH" \ + --groups CMake/release-tarballs.txt \ + --source wsjtx-build \ + --linuxdeploy ./linuxdeploy.AppImage \ + --out release-tarballs + + - name: Smoke-test release tarballs + if: inputs.build_packages == 'true' + shell: bash + env: + VERSION: ${{ inputs.version }} + ARCH: ${{ inputs.arch }} + run: | + .github/scripts/smoke-release-tarballs.sh \ + --platform linux \ + --version "$VERSION" \ + --target "linux-$ARCH" \ + --groups CMake/release-tarballs.txt \ + --dir release-tarballs \ + --ldd + + - name: Upload release tarballs + if: inputs.build_packages == 'true' + uses: ./.github/actions/upload-release-tarballs + with: + version: ${{ inputs.version }} + target: linux-${{ inputs.arch }} + directory: release-tarballs + - name: Report suppressed ccache save if: inputs.save_ccache == 'true' && steps.image.outputs.recipe_match != 'true' shell: bash diff --git a/.github/actions/build-linux-sanitizers/action.yml b/.github/actions/build-linux-sanitizers/action.yml index a9a6de6e..254c3a83 100644 --- a/.github/actions/build-linux-sanitizers/action.yml +++ b/.github/actions/build-linux-sanitizers/action.yml @@ -18,6 +18,10 @@ inputs: description: "Save compiled objects for trusted builds" required: false default: "false" + run_tests: + description: "Run sanitizer tests after compiling production and test targets" + required: false + default: "true" allow_stale_image: description: "Allow a previously promoted image when a dependency refresh changed the recipe" required: false @@ -121,6 +125,7 @@ runs: ccache-linux-x86_64-${{ steps.sanitizer.outputs.cache_key }}-${{ steps.image.outputs.ccache_compatibility_id }}- - name: Configure ccache + id: ccache-config shell: bash run: | export CCACHE_DIR="${GITHUB_WORKSPACE}/${{ steps.sanitizer.outputs.ccache_dir }}" @@ -187,15 +192,20 @@ runs: "${{ steps.sanitizer.outputs.build_dir }}/CMakeCache.txt" - name: Build sanitizer targets + id: compile shell: bash - run: cmake --build "${{ steps.sanitizer.outputs.build_dir }}" -j"$(nproc)" + run: | + SECONDS=0 + trap 'echo "duration_seconds=$SECONDS" >> "$GITHUB_OUTPUT"' EXIT + cmake --build "${{ steps.sanitizer.outputs.build_dir }}" -j"$(nproc)" - name: Show ccache stats - if: always() + if: always() && steps.ccache-config.outcome == 'success' shell: bash - run: ccache --show-stats + run: ccache --show-stats | tee "$RUNNER_TEMP/sanitizer-ccache-stats.txt" - name: Verify sanitizer instrumentation + id: instrumentation shell: bash run: >- python3 .github/scripts/verify-sanitizer-instrumentation.py @@ -214,11 +224,13 @@ runs: "${{ steps.sanitizer.outputs.build_dir }}/wsjtx" - name: Prepare test scratch directory + if: inputs.run_tests == 'true' shell: bash run: mkdir -p "${GITHUB_WORKSPACE}/${{ steps.sanitizer.outputs.build_dir }}/tmp" - name: Run tests id: ctest + if: inputs.run_tests == 'true' continue-on-error: true shell: bash working-directory: ${{ steps.sanitizer.outputs.build_dir }} @@ -233,7 +245,7 @@ runs: ctest --parallel 1 --output-on-failure --output-junit ctest-results.xml - name: Publish test summary - if: always() && steps.ctest.outcome != 'skipped' + if: always() && inputs.run_tests == 'true' && steps.ctest.outcome != 'skipped' shell: bash working-directory: ${{ steps.sanitizer.outputs.build_dir }} run: >- @@ -241,7 +253,7 @@ runs: "${{ steps.sanitizer.outputs.summary_name }}" >> "$GITHUB_STEP_SUMMARY" - name: Upload test results - if: always() && steps.ctest.outcome != 'skipped' + if: always() && inputs.run_tests == 'true' && steps.ctest.outcome != 'skipped' uses: actions/upload-artifact@v7 with: name: ${{ steps.sanitizer.outputs.artifact_name }} @@ -252,7 +264,7 @@ runs: if-no-files-found: ignore - name: Require sanitizer tests to pass - if: always() + if: always() && inputs.run_tests == 'true' shell: bash run: | failed=false @@ -264,14 +276,77 @@ runs: 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' + id: save-ccache + if: inputs.save_ccache == 'true' && github.ref == 'refs/heads/develop' && 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 }} + + - name: Summarize sanitizer cache + if: always() + shell: bash + env: + CACHE_STEPS: ${{ toJSON(steps) }} + SAVE_CCACHE: ${{ inputs.save_ccache }} + RUN_TESTS: ${{ inputs.run_tests }} + run: | + python3 - <<'PY' >> "$GITHUB_STEP_SUMMARY" + import json + import os + from pathlib import Path + + steps = json.loads(os.environ["CACHE_STEPS"]) + cache = steps.get("ccache", {}) + outputs = cache.get("outputs", {}) + image = steps.get("image", {}).get("outputs", {}) + compile_step = steps.get("compile", {}) + save = steps.get("save-ccache", {}).get("outcome", "skipped") + exact = outputs.get("cache-hit") == "true" + matched = outputs.get("cache-matched-key", "") + restore = "exact hit" if exact else "fallback restore" if matched else "miss" + if cache.get("outcome") != "success": + restore = cache.get("outcome", "not run") + + if os.environ["SAVE_CCACHE"] != "true": + publication = "disabled" + elif os.environ["GITHUB_REF"] != "refs/heads/develop": + publication = "skipped: cache writes require develop" + elif image.get("recipe_match") == "false": + publication = "skipped: image recipe mismatch" + elif save != "skipped": + publication = f"attempted (step: {save}); see cache action log for upload confirmation" + elif any(step.get("outcome") in ("failure", "cancelled") for step in steps.values()): + publication = "skipped: preceding failure or cancellation" + elif exact: + publication = "skipped: exact cache already exists" + else: + publication = "not attempted" + + tests = steps.get("ctest", {}).get("outcome", "not run") + if os.environ["RUN_TESTS"] != "true": + tests = "disabled (build-only warmer)" + duration = compile_step.get("outputs", {}).get("duration_seconds", "unavailable") + print("### Sanitizer compiler cache\n") + rows = { + "Source SHA": os.environ["GITHUB_SHA"], + "Image generation": image.get("generation", "unavailable"), + "Requested/save key": outputs.get("cache-primary-key", "unavailable"), + "Matched key": matched or "none", + "Restore": restore, + "Compilation": compile_step.get("outcome", "not run"), + "Compilation duration (seconds)": duration, + "Instrumentation": steps.get("instrumentation", {}).get("outcome", "not run"), + "Tests": tests, + "Cache publication": publication, + } + print("| Item | Result |\n| --- | --- |") + for label, value in rows.items(): + print(f"| {label} | {value} |") + stats = Path(os.environ["RUNNER_TEMP"]) / "sanitizer-ccache-stats.txt" + if stats.is_file(): + print("\n```text\n" + stats.read_text().rstrip() + "\n```") + print("\nCompiler caching covers C/C++; Fortran compilation and linking still run.") + print("Build-only warming does not establish that sanitizer tests pass.") + PY diff --git a/.github/actions/build-windows-deps/action.yml b/.github/actions/build-windows-deps/action.yml index 9f1d2d07..0d1dc844 100644 --- a/.github/actions/build-windows-deps/action.yml +++ b/.github/actions/build-windows-deps/action.yml @@ -17,6 +17,10 @@ inputs: hamlib_branch: description: "Hamlib branch to build" required: true + cold_build: + description: "Bypass dependency cache restores and saves" + required: false + default: "false" save_caches: description: "Whether to save dependency caches on misses" required: false @@ -64,18 +68,20 @@ runs: - name: Restore Boost cache id: boost-cache + if: inputs.cold_build != 'true' 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 + id: boost-build 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' + if: inputs.cold_build != 'true' && inputs.save_caches == 'true' && steps.boost-cache.outputs.cache-hit != 'true' uses: actions/cache/save@v6 with: path: boost-prefix @@ -108,12 +114,14 @@ runs: - name: Restore pFUnit cache id: pfunit-cache + if: inputs.cold_build != 'true' 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 + id: pfunit-build 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 }}" @@ -135,7 +143,7 @@ runs: done - name: Save pFUnit cache - if: inputs.save_caches == 'true' && steps.pfunit-cache.outputs.cache-hit != 'true' + if: inputs.cold_build != 'true' && inputs.save_caches == 'true' && steps.pfunit-cache.outputs.cache-hit != 'true' uses: actions/cache/save@v6 with: path: pfunit-prefix @@ -143,12 +151,14 @@ runs: - name: Restore Hamlib cache id: hamlib-cache + if: inputs.cold_build != 'true' 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 + id: hamlib-build if: steps.hamlib-cache.outputs.cache-hit != 'true' shell: msys2 {0} env: @@ -167,8 +177,16 @@ runs: 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' + if: inputs.cold_build != 'true' && 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 }} + + - name: Summarize dependency caches + if: always() + shell: bash + env: + CACHE_STEPS: ${{ toJSON(steps) }} + COLD_BUILD: ${{ inputs.cold_build }} + run: python .github/scripts/summarize-native-caches.py boost hamlib pfunit >> "$GITHUB_STEP_SUMMARY" diff --git a/.github/actions/upload-release-tarballs/action.yml b/.github/actions/upload-release-tarballs/action.yml new file mode 100644 index 00000000..daec4523 --- /dev/null +++ b/.github/actions/upload-release-tarballs/action.yml @@ -0,0 +1,51 @@ +name: "Upload release tarballs" +description: >- + Upload one target's release tarballs, one artifact each under the names + .github/scripts/release-policy.py requires. There is one step per line of + CMake/release-tarballs.txt. + +inputs: + version: + description: "WSJT-X version string" + required: true + target: + description: "Release target, for example linux-x86_64 or arm64-macOS" + required: true + directory: + description: "Directory that holds the target's release tarballs" + required: true + +runs: + using: "composite" + steps: + - name: Upload jt9 tarball + uses: actions/upload-artifact@v7 + with: + name: wsjtx-${{ inputs.version }}-${{ inputs.target }}-jt9 + path: ${{ inputs.directory }}/wsjtx-${{ inputs.version }}-${{ inputs.target }}-jt9.tar.gz + if-no-files-found: error + compression-level: 0 + + - name: Upload jt9stream tarball + uses: actions/upload-artifact@v7 + with: + name: wsjtx-${{ inputs.version }}-${{ inputs.target }}-jt9stream + path: ${{ inputs.directory }}/wsjtx-${{ inputs.version }}-${{ inputs.target }}-jt9stream.tar.gz + if-no-files-found: error + compression-level: 0 + + - name: Upload wsprd tarball + uses: actions/upload-artifact@v7 + with: + name: wsjtx-${{ inputs.version }}-${{ inputs.target }}-wsprd + path: ${{ inputs.directory }}/wsjtx-${{ inputs.version }}-${{ inputs.target }}-wsprd.tar.gz + if-no-files-found: error + compression-level: 0 + + - name: Upload utilities tarball + uses: actions/upload-artifact@v7 + with: + name: wsjtx-${{ inputs.version }}-${{ inputs.target }}-utilities + path: ${{ inputs.directory }}/wsjtx-${{ inputs.version }}-${{ inputs.target }}-utilities.tar.gz + if-no-files-found: error + compression-level: 0 diff --git a/.github/actions/warm-macos-deps/action.yml b/.github/actions/warm-macos-deps/action.yml index 74ef9423..2c68bc1f 100644 --- a/.github/actions/warm-macos-deps/action.yml +++ b/.github/actions/warm-macos-deps/action.yml @@ -66,6 +66,7 @@ runs: key: ${{ steps.qt-key.outputs.key }} - name: Build Qt + id: qt-build if: steps.qt-cache.outputs.cache-hit != 'true' shell: bash run: | @@ -154,6 +155,7 @@ runs: 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 + id: libusb-build if: steps.libusb-cache.outputs.cache-hit != 'true' shell: bash run: | @@ -177,6 +179,7 @@ runs: 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 + id: portaudio-build if: steps.portaudio-cache.outputs.cache-hit != 'true' shell: bash run: | @@ -200,6 +203,7 @@ runs: 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 + id: fftw-build if: steps.fftw-cache.outputs.cache-hit != 'true' shell: bash run: | @@ -223,6 +227,7 @@ runs: 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 + id: boost-build if: steps.boost-cache.outputs.cache-hit != 'true' shell: bash run: | @@ -263,6 +268,7 @@ runs: 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 + id: hamlib-build if: steps.hamlib-cache.outputs.cache-hit != 'true' shell: bash env: @@ -300,6 +306,7 @@ runs: 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 + id: pfunit-build if: steps.pfunit-cache.outputs.cache-hit != 'true' shell: bash env: @@ -328,3 +335,11 @@ runs: with: path: pfunit-prefix key: ${{ steps.pfunit-cache.outputs.cache-primary-key }} + + - name: Summarize dependency caches + if: always() + shell: bash + env: + CACHE_STEPS: ${{ toJSON(steps) }} + COLD_BUILD: "false" + run: python3 .github/scripts/summarize-native-caches.py qt libusb portaudio fftw boost hamlib pfunit >> "$GITHUB_STEP_SUMMARY" |
