From 4128f7fc5cd6434765fa487ddd3667fa9f222d0f Mon Sep 17 00:00:00 2001 From: David Rowland Date: Wed, 14 Oct 2026 15:05:01 +0100 Subject: [PATCH 1/2] Fix the macOS app not finding librtcheck.dylib outside the build tree, and smoke test the release zips --- .github/workflows/build.yaml | 12 ++++++++++++ CHANGELIST.md | 1 + CMakeLists.txt | 5 +++++ 3 files changed, 18 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e7857b6..eb53ae8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -166,6 +166,18 @@ jobs: working-directory: ${{ env.APP_DIR }} run: 7z a -aoa -tzip ${{ env.ZIP_FILE_NAME }} ${{ matrix.app }} + # Run the packaged app away from the build tree, as a user would, so anything + # that only resolves on the build machine (e.g. a dylib rpath) fails here + # rather than in a published release. + - name: Smoke test the zip + shell: bash + run: | + mkdir -p "$RUNNER_TEMP/smoke" + 7z x -y -o"$RUNNER_TEMP/smoke" "${{ env.APP_DIR }}/${{ env.ZIP_FILE_NAME }}" > /dev/null + cd "$RUNNER_TEMP/smoke" + chmod +x ${{ matrix.test-binary }} + ${{ matrix.test-binary }} --version + - name: Upload zip files uses: actions/upload-artifact@v4 with: diff --git a/CHANGELIST.md b/CHANGELIST.md index 5a3bd3d..599adb8 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -21,6 +21,7 @@ - Fixed false failures in the "Plugin state restoration" test where the first parameter was compared against the last value sent by a previous test rather than the plugin's own value - Below strictness level 8, two-step (on/off) parameters are now only sent 0 or 1 when tests randomise parameter values. Arbitrary values are still sent to them at level 8 and above, and to all other parameters at every level - Fixed the "Plugin state restoration" test's exact binary state comparison never running. It was documented as running at strictness level 8 and above but checked the test's own level instead of the run's +- Fixed the macOS app failing to start on any machine other than the one that built it ("Library not loaded: @rpath/librtcheck.dylib"); this affected the `v2.0.0-beta1` and `v2.0.0-beta2` releases - Enabled the editor stress and extreme (real-time allocation / oversized block) tests that were present in the source tree but had not been compiled into the build ### 1.0.5 diff --git a/CMakeLists.txt b/CMakeLists.txt index ba9d07d..96bf1a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -238,6 +238,11 @@ if (PLUGINVAL_ENABLE_RTCHECK) rtcheck) if (APPLE) + # The dylib is copied into the app bundle (below), so also look for it there. + # Otherwise the only rpath is the build tree's, and the app only starts on the + # machine that built it. + set_target_properties(pluginval PROPERTIES BUILD_RPATH "@executable_path/../Libraries") + add_custom_command(TARGET pluginval POST_BUILD COMMAND ${CMAKE_COMMAND} -E echo "Executable path: $") add_custom_command(TARGET pluginval POST_BUILD From d93ba8cf9766fa267f52ff64cbba0eda37605f16 Mon Sep 17 00:00:00 2001 From: David Rowland Date: Wed, 14 Oct 2026 15:37:43 +0100 Subject: [PATCH 2/2] Smoke test: hide the build's rtcheck directory so the bundled dylib must be found --- .github/workflows/build.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index eb53ae8..11ea44f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -172,6 +172,12 @@ jobs: - name: Smoke test the zip shell: bash run: | + # The macOS binary also has the build tree's rtcheck directory as an rpath, + # which exists on this runner but not on a user's machine, so hide it to + # make sure the dylib bundled in the app is the one that's found. + rtcheck_build="$PWD/${{ env.BUILD_DIR }}/_deps/rtcheck-build" + if [ -d "$rtcheck_build" ]; then mv "$rtcheck_build" "$rtcheck_build.hidden"; fi + mkdir -p "$RUNNER_TEMP/smoke" 7z x -y -o"$RUNNER_TEMP/smoke" "${{ env.APP_DIR }}/${{ env.ZIP_FILE_NAME }}" > /dev/null cd "$RUNNER_TEMP/smoke"