ci: check the CTest the Linux build tree uses #28689

Merged
oneandonlydean merged 1 commit from upstream-pr/28689 into main 2026-12-04 09:04:50 +00:00
oneandonlydean commented 2026-12-02 21:59:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-12-02T21:59:43Z.


What

Linux jobs on some runners build and then fail to run any test: /opt/anyps5-cmake/bin/ctest: error while loading shared libraries: librhash.so.0 (exit 127), for example main runs 46938767145 and 46968839905. The check added by #28615 passed there because it probed the cmake on PATH (3.28.3), not the CTest the build tree records.

After configure, this reads CMAKE_CTEST_COMMAND from build/CMakeCache.txt. If that CTest cannot start, it downloads the same pinned Kitware bundle, reconfigures the tree with it and puts it on PATH. Otherwise the step does nothing.

Tested

Linux, the step's script alone: a working CTest in the cache exits at once; a CTest that exits 127 takes the download branch. The download and reconfigure were not run, and not on an affected runner.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code
  • Unimplemented paths throw: n/a
  • No notes, investigation files or images added
  • New third-party code: none
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

Summary by CodeRabbit

  • Chores
    • Updated the Linux build workflow to verify that its test runner starts successfully and to retry setup with a checksum-verified CMake bundle if it does not.
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5615452962 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/28689). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-12-02T21:59:43Z. --- ### What Linux jobs on some runners build and then fail to run any test: `/opt/anyps5-cmake/bin/ctest: error while loading shared libraries: librhash.so.0` (exit 127), for example main runs 46938767145 and 46968839905. The check added by #28615 passed there because it probed the `cmake` on PATH (3.28.3), not the CTest the build tree records. After configure, this reads `CMAKE_CTEST_COMMAND` from `build/CMakeCache.txt`. If that CTest cannot start, it downloads the same pinned Kitware bundle, reconfigures the tree with it and puts it on PATH. Otherwise the step does nothing. ### Tested Linux, the step's script alone: a working CTest in the cache exits at once; a CTest that exits 127 takes the download branch. The download and reconfigure were not run, and not on an affected runner. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code - [x] Unimplemented paths throw: n/a - [x] No notes, investigation files or images added - [x] New third-party code: none - [x] Generic behaviour, not specific to one title - [ ] Depends on: none - [ ] Fixes: none - [ ] Unblocks: none - [ ] GPUs tested: n/a - [x] AI-assisted: yes <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Chores** * Updated the Linux build workflow to verify that its test runner starts successfully and to retry setup with a checksum-verified CMake bundle if it does not. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
MarcZX10 commented 2026-12-02 23:07:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-02T23:07:23Z.

Review: APPROVED


Reviewed — looks good

The Linux workflow checks the CTest recorded in the build cache and falls back to a checksum-verified Kitware bundle if it cannot start; I found no defect in the inspected change.

What I ran

Reviewed head 5bca1a64a3f61c031a45db1404bd122fa1c117c6 in the read-only review environment; no runtime toolchain was used.

sed -n '640,735p' files/.github/workflows/build.yml
rg -n 'CONFIGURE|CMAKE_CTEST_COMMAND|CMAKE_VERSION|ANYPS5_ENABLE_SPIRV_TOOLS' files/.github/workflows/build.yml
python3 repo_read.py cat .github/workflows/build.yml 698 726

The reader displayed the requested lines, then exited while attempting to write its read log in the read-only workspace.

Results

Check Result Note
Changed workflow review passed Fallback path inspected
Workflow execution not run No CI runner used

Negative control

Not run; no test or execution environment was used to inject a failing CTest.

Findings

Blocking

None.

Non-blocking

None.

Sources

Not verified

The fallback download, checksum verification, reconfiguration, and subsequent CI steps were not executed. The author-reported script checks were not rerun. The only changed file, .github/workflows/build.yml, was inspected in the changed section and its surrounding setup; files.json lists no excluded files.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6160648173 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/28689#pullrequestreview-6160648173). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-12-02T23:07:23Z. **Review:** APPROVED --- # Reviewed — looks good The Linux workflow checks the CTest recorded in the build cache and falls back to a checksum-verified Kitware bundle if it cannot start; I found no defect in the inspected change. ## What I ran Reviewed head `5bca1a64a3f61c031a45db1404bd122fa1c117c6` in the read-only review environment; no runtime toolchain was used. ```text sed -n '640,735p' files/.github/workflows/build.yml rg -n 'CONFIGURE|CMAKE_CTEST_COMMAND|CMAKE_VERSION|ANYPS5_ENABLE_SPIRV_TOOLS' files/.github/workflows/build.yml python3 repo_read.py cat .github/workflows/build.yml 698 726 ``` The reader displayed the requested lines, then exited while attempting to write its read log in the read-only workspace. ## Results | Check | Result | Note | |---|---|---| | Changed workflow review | passed | Fallback path inspected | | Workflow execution | not run | No CI runner used | ## Negative control Not run; no test or execution environment was used to inject a failing CTest. ## Findings ### Blocking None. ### Non-blocking None. ## Sources - [Changed workflow at the reviewed commit](https://github.com/boykopovar/AnyPS5/blob/5bca1a64a3f61c031a45db1404bd122fa1c117c6/.github/workflows/build.yml#L705-L723) ## Not verified The fallback download, checksum verification, reconfiguration, and subsequent CI steps were not executed. The author-reported script checks were not rerun. The only changed file, `.github/workflows/build.yml`, was inspected in the changed section and its surrounding setup; `files.json` lists no excluded files. ## To get this to a good state Nothing is required.
ligmaSec commented 2026-12-03 00:27:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T00:27:36Z.

Review: COMMENTED


I ran the added Bash step from 5bca1a64a3f6 against a small Ninja build on Debian 13. With the working cached CTest 3.31.6, the step exited without writing to GITHUB_PATH. With the cached CTest replaced by a stub that returned 127 and printed the reported librhash.so.0 error, the step verified and unpacked the pinned Kitware 4.2.3 archive, reconfigured the same tree, updated CMAKE_CTEST_COMMAND, and wrote the bundle's bin directory to GITHUB_PATH. The new CTest ran the test that the original configure flag enabled.

I pre-fetched the real Kitware archive and supplied it from disk inside the isolated test. This covers the reconfigure and CTest handoff. The affected runner and the full AnyPS5 build were outside this test.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6161535238 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/28689#pullrequestreview-6161535238). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T00:27:36Z. **Review:** COMMENTED --- I ran the added Bash step from `5bca1a64a3f6` against a small Ninja build on Debian 13. With the working cached CTest 3.31.6, the step exited without writing to `GITHUB_PATH`. With the cached CTest replaced by a stub that returned 127 and printed the reported `librhash.so.0` error, the step verified and unpacked the pinned Kitware 4.2.3 archive, reconfigured the same tree, updated `CMAKE_CTEST_COMMAND`, and wrote the bundle's bin directory to `GITHUB_PATH`. The new CTest ran the test that the original configure flag enabled. I pre-fetched the real Kitware archive and supplied it from disk inside the isolated test. This covers the reconfigure and CTest handoff. The affected runner and the full AnyPS5 build were outside this test. AI-assisted: yes
Plyxen commented 2026-12-03 04:51:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Plyxen on 2026-12-03T04:51:27Z.

Review: APPROVED


I read the diff at 5bca1a64a3 and ran the new step on Linux (WSL Ubuntu 24.04, cmake and ctest 3.28.3) with the same bash -e -o pipefail. I did not run the workflow itself.

Why it is needed: I looked at 10 main runs since 2026-11-27. The Linux job ends with /opt/anyps5-cmake/bin/ctest: error while loading shared libraries: librhash.so.0 (exit 127), so no Linux test runs. The check from #28615 passes there, because it starts ctest from inside cmake.

I reproduced that with a cmake wrapper that sets a variable its ctest needs to start, then configured a small project:

Case Result
main's check passes (ctest version 3.28.3), then the test step fails with exit 127
this step, broken ctest warns, unpacks the bundle, reconfigures; the cache and GITHUB_PATH point at the bundle, the generator and build type are kept and ctest --test-dir build passes
this step, wrong checksum exit 1, GITHUB_PATH unchanged
this step, working ctest prints the version, downloads nothing, GITHUB_PATH unchanged

I replaced the download with a local archive of cmake 3.28.3, so the real 4.2.3 bundle is not covered. Its version and checksum are the ones main already uses in the step above.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6163881725 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/28689#pullrequestreview-6163881725). Originally posted by [Plyxen](https://github.com/Plyxen) on 2026-12-03T04:51:27Z. **Review:** APPROVED --- I read the diff at `5bca1a64a3` and ran the new step on Linux (WSL Ubuntu 24.04, cmake and ctest 3.28.3) with the same `bash -e -o pipefail`. I did not run the workflow itself. Why it is needed: I looked at 10 `main` runs since 2026-11-27. The Linux job ends with `/opt/anyps5-cmake/bin/ctest: error while loading shared libraries: librhash.so.0` (exit 127), so no Linux test runs. The check from #28615 passes there, because it starts ctest from inside cmake. I reproduced that with a `cmake` wrapper that sets a variable its `ctest` needs to start, then configured a small project: | Case | Result | |---|---| | `main`'s check | passes (`ctest version 3.28.3`), then the test step fails with exit 127 | | this step, broken ctest | warns, unpacks the bundle, reconfigures; the cache and `GITHUB_PATH` point at the bundle, the generator and build type are kept and `ctest --test-dir build` passes | | this step, wrong checksum | exit 1, `GITHUB_PATH` unchanged | | this step, working ctest | prints the version, downloads nothing, `GITHUB_PATH` unchanged | I replaced the download with a local archive of cmake 3.28.3, so the real 4.2.3 bundle is not covered. Its version and checksum are the ones `main` already uses in the step above. AI-assisted: yes (Claude Code)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!28689
No description provided.