Repository navigation
[DOC/CI] Make installation documentation and CI use the same commands - #8042
Conversation
WalkthroughThis update centralizes dependency installation for Ubuntu and macOS CI workflows by replacing explicit package commands with external scripts. It also extensively rewrites and modularizes installation documentation for Linux and macOS, adds new documentation on contrib builds and testing, and introduces new shell scripts for automated dependency setup on both platforms. Changes
Sequence Diagram(s)sequenceDiagram
participant CI Workflow
participant deps-ubuntu.sh
participant deps-macos.sh
participant OS Package Manager
CI Workflow->>deps-ubuntu.sh: Run on Ubuntu runner
deps-ubuntu.sh->>OS Package Manager: Install required/optional packages (apt-get)
CI Workflow->>deps-macos.sh: Run on macOS runner
deps-macos.sh->>OS Package Manager: Install required/optional packages (brew)
Possibly related PRs
Suggested labels
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. ✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
I like the scripts. When we discussed getting rid of contrib typically those two arguments were brought up:
That being said. I am much in favor of reducing the role of contrib.
|
|
I do think that we should continue to allow building with |
|
got ya. Yeah totally makes sense. |
8973408 to
69df40e
Compare
|
@timosachsenberg Ready for final review. |
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (9)
tools/ci/deps-ubuntu.sh (1)
14-43: Consider ordering and grouping packages.
The list of required dependencies is comprehensive. For maintainability, consider sorting packages alphabetically or grouping related ones (e.g., Qt, Boost, Eigen) to improve readability and simplify future updates.doc/doxygen/install/common-cmake-parameters.doxygen (1)
112-119: Note prerequisite for ccmake.
Not all installations includeccmakeby default. Consider adding a remark that users need to install the appropriate package (e.g.,sudo apt-get install cmake-curses-guion Ubuntu) to useccmake.doc/doxygen/install/install-testing-openms.doxygen (2)
22-22: Fix typo: plural "tests".
Change "will run all TOPP test" to "will run all TOPP tests" for grammatical accuracy.
24-27: Update ctest man page link.
The current link points to Ubuntu Hardy (2008) man pages. Consider linking to the official CMake documentation forctestto ensure users get up-to-date information, for example:[ctest]: https://cmake.org/cmake/help/latest/manual/ctest.1.htmldoc/doxygen/install/install-contrib.doxygen (2)
1-6: Clarify the status of contrib builds.
Since thecontribbuild is a fallback pending vcpkg integration, add a note at the top indicating that this method is optional and may require manual upkeep of dependencies.
26-27: Refine phrasing for formality.
The sentence is clear but can be more concise:doc/doxygen/install/install-linux.doxygen (2)
35-38: Consider using a verified snippet path or adding a brief “how-to” fallback.
\snippet "../../tools/ci/deps-ubuntu.sh" installation_documentationhard-codes the relative path to the CI helper script.
If the script is ever moved (e.g. toscripts/ci), this include will silently break and the rendered docs will show an empty block.Two low-effort mitigations:
-\snippet "../../tools/ci/deps-ubuntu.sh" installation_documentation +\snippet "../../tools/ci/deps-ubuntu.sh" installation_documentation ///< keep CI + docs in sync +// If the snippet fails to render (file moved), see tools/ci for up-to-date commands.or convert to a
\includeguarded by\ifso Doxygen fails loudly.
This keeps the documentation resilient while still sharing the single source
of truth.
105-112: Path construction assumes native build and directory layout.
$OPENMS_DIR/OpenMS/THIRDPARTY/Linux/$(uname -m)/Cometis fine for typical
x86_64 builds but breaks for:
- cross-compiles (e.g. build on x86, deploy on aarch64)
- multi-arch images where
uname -mreturns the build host arch- renamed
THIRDPARTYlayouts on custom installsConsider wording the example as illustrative and add a hint:
// Replace `$(uname -m)` with the architecture folder you actually built.or provide a cmake variable that exposes the resolved path.
.github/workflows/openms_ci_matrix_full.yml (1)
272-277:cmake_prefixoutput mixes semicolons & colons – double-check CMake parsing.The macOS block writes:
echo "cmake_prefix=$(brew --prefix qt)/lib/cmake;$(brew --prefix qt);$(brew --prefix libomp)" >>$GITHUB_OUTPUT
CMAKE_PREFIX_PATHexpects semicolons as the list separator, but the first
path itself contains a slash-and-semicolon boundary (.../cmake;…).
That is correct, yet easy to read as a typo. A tiny clarification helps:# qt cmake files ; qt root ; libomp root (semicolon = CMake list separator)Purely a readability nit – no functional change required.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
.github/workflows/openms_ci_matrix_full.yml(2 hunks)doc/doxygen/install/common-cmake-parameters.doxygen(1 hunks)doc/doxygen/install/install-contrib.doxygen(1 hunks)doc/doxygen/install/install-linux.doxygen(1 hunks)doc/doxygen/install/install-macs.doxygen(1 hunks)doc/doxygen/install/install-testing-openms.doxygen(1 hunks)tools/ci/deps-macos.sh(1 hunks)tools/ci/deps-ubuntu.sh(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: build-and-test (windows-2022, cl.exe, 14.36)
- GitHub Check: build-and-test (macos-13, xcode, 14.2)
- GitHub Check: build-and-test (macos-14, xcode, 15.0.1)
🔇 Additional comments (3)
tools/ci/deps-ubuntu.sh (1)
1-5: Strict error handling is well applied.
Using#!/usr/bin/env bashwithset -euandset -o pipefailensures the script fails fast on errors.tools/ci/deps-macos.sh (1)
1-5: Strict error handling is well applied.
Usingset -euandset -o pipefailis excellent for catching errors early in CI..github/workflows/openms_ci_matrix_full.yml (1)
244-248: Fail-fast behaviour relies on the helper script – ensureset -eis inside.The workflow executes:
bash OpenMS/tools/ci/deps-ubuntu.shBecause the step itself does not have
set -e, any silent failure in the
script will pass unless the script contains strict error handling. Please
verify thatdeps-ubuntu.shstarts with:#!/usr/bin/env bash set -euo pipefailand returns a non-zero exit status on all errors.
Prevent the documentation from becoming stale by using the same dependency installation commands as CI.
Streamline the build instructions and demote instructions for using contrib.
08b21ce to
fe164aa
Compare
This is probably an artifact for an older version of macOS.
We still have to use Doxygen 1.9 on Ubuntu and it doesn't support indented code fences.
|
Ready for review again. I implemented all suggested changes and verified that CI is building correctly. The Windows build fails during the NSIS step because my branch name makes file names too long. Otherwise everything is good. |
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (1)
doc/doxygen/install/install-linux.doxygen (1)
94-94: Great implementation of dynamic CPU detection!The make command now properly detects the number of CPU cores with appropriate fallbacks for different systems (Linux with
nproc, macOS withsysctl, and a fallback to 2).
🧹 Nitpick comments (2)
doc/doxygen/install/install-linux.doxygen (2)
25-25: Fix grammatical error: "built" should be "build"There's a typo in the sentence.
- We recommend installing all dependencies using your distribution's - package manager. However, If you would rather built all + We recommend installing all dependencies using your distribution's + package manager. However, If you would rather build all
46-47: Consider being more specific about when to usednfvsyumThe comment about changing yum to dnf could be more specific about which distributions/versions require this change.
- # In newer distros change yum to dnf + # Use dnf for Fedora >= 22, RHEL/CentOS >= 8; use yum for older versions
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
.github/workflows/openms_ci_matrix_full.yml(2 hunks)doc/doxygen/install/common-cmake-parameters.doxygen(1 hunks)doc/doxygen/install/install-contrib.doxygen(1 hunks)doc/doxygen/install/install-linux.doxygen(1 hunks)doc/doxygen/install/install-macs.doxygen(1 hunks)doc/doxygen/install/install-testing-openms.doxygen(1 hunks)tools/ci/deps-macos.sh(1 hunks)tools/ci/deps-ubuntu.sh(1 hunks)
✅ Files skipped from review due to trivial changes (4)
- doc/doxygen/install/common-cmake-parameters.doxygen
- doc/doxygen/install/install-testing-openms.doxygen
- doc/doxygen/install/install-contrib.doxygen
- tools/ci/deps-macos.sh
🚧 Files skipped from review as they are similar to previous changes (3)
- tools/ci/deps-ubuntu.sh
- .github/workflows/openms_ci_matrix_full.yml
- doc/doxygen/install/install-macs.doxygen
🔇 Additional comments (1)
doc/doxygen/install/install-linux.doxygen (1)
116-124:Details
✅ Verification successful
Verify all included documentation files exist
The documentation includes references to external files. Let's ensure they all exist to prevent broken documentation.
🏁 Script executed:
#!/bin/bash # Description: Verify that all included documentation files exist echo "Checking for included documentation files..." # List of files referenced in the documentation files=( "doc/doxygen/install/common-cmake-parameters.doxygen" "doc/doxygen/install/install-testing-openms.doxygen" "doc/doxygen/install/install-contrib.doxygen" ) all_exist=true for file in "${files[@]}"; do if [ -f "$file" ]; then echo "✓ Found: $file" else echo "✗ Missing: $file" all_exist=false fi done if [ "$all_exist" = true ]; then echo -e "\n✓ All included documentation files exist" else echo -e "\n✗ Some documentation files are missing" fiLength of output: 1042
All included documentation files verified
✓ Verified that the following files exist under
doc/doxygen/install/:
common-cmake-parameters.doxygeninstall-testing-openms.doxygeninstall-contrib.doxygenNo broken includes detected—no further action required.
timosachsenberg
left a comment
There was a problem hiding this comment.
nice improvement
Description
Prevent the documentation from becoming stale by using the same dependency installation commands as CI.
I have extracted the dependency installation commands from the CI workflow and put them in their own shell scripts. This allows the CI workflow and the installation documentation to use the same installation commands. Hopefully this means that the documentation is always up to date with respect to the source code.
Furthermore I'm opening this as a draft because I'd like to start a discussion about the instructions for using
contrib. Since we do not usecontribin CI for macOS and Linux, we can't be sure that they can successfully link with OpenMS on those platforms. I would therefore like to remove the instructions for usingcontribfrom the macOS and Linux installation instructions and focus on using the same commands we use in CI. (I also think we should move away from usingcontribon Windows and use a dedicated package manager like we do on the other platforms. But that's for another day.)Summary by CodeRabbit
Documentation
Chores