Skip to content

[DOC/CI] Make installation documentation and CI use the same commands - #8042

Merged
timosachsenberg merged 6 commits into
developfrom
pjones/ci-install
May 26, 2025
Merged

timosachsenberg merged 6 commits into
developfrom
pjones/ci-install

Conversation

@pjones

@pjones pjones commented May 13, 2025 •

Copy link
Copy Markdown
Contributor

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 use contrib in 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 using contrib from 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 using contrib on Windows and use a dedicated package manager like we do on the other platforms. But that's for another day.)

Summary by CodeRabbit

  • Documentation

    • Added and reorganized installation guides for Linux and macOS, providing streamlined, modular instructions and improved clarity.
    • Introduced new documentation for building dependencies from source and for testing OpenMS installations.
    • Enhanced CMake parameter documentation with additional usage tips.
  • Chores

    • Centralized and automated dependency installation for Ubuntu and macOS using new scripts, improving maintainability and consistency in setup workflows.

@coderabbitai

coderabbitai Bot commented May 13, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

This 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

File(s) Change Summary
.github/workflows/openms_ci_matrix_full.yml Refactored Ubuntu and macOS dependency installation steps to invoke external scripts (deps-ubuntu.sh and deps-macos.sh), removing inline package commands and adding comments to maintain this abstraction.
tools/ci/deps-ubuntu.sh
tools/ci/deps-macos.sh
Added new shell scripts to automate dependency installation for Ubuntu (using apt-get) and macOS (using Homebrew), with robust error handling and documentation markers for inclusion in public docs.
doc/doxygen/install/install-linux.doxygen
doc/doxygen/install/install-macs.doxygen
Extensively rewrote and condensed Linux and macOS installation documentation, modularizing content, simplifying instructions, and referencing external snippets and scripts for dependency management and contrib usage.
doc/doxygen/install/common-cmake-parameters.doxygen Added a section explaining how to view all CMake variables using ccmake . after initial configuration.
doc/doxygen/install/install-contrib.doxygen Added new documentation describing how to build all required dependencies from source using the contrib package and how to link them with OpenMS.
doc/doxygen/install/install-testing-openms.doxygen Added new documentation guiding users on how to test their OpenMS/TOPP installation with make test or ctest, including filtering and parallelization options.

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)
Loading

Possibly related PRs

  • OpenMS/OpenMS#8027: Also modifies install-linux.doxygen, but focuses on raising minimum dependency versions rather than restructuring documentation and CI scripts.
  • OpenMS/OpenMS#7897: Involves overlapping changes to install-linux.doxygen, providing detailed subsections and clearer instructions, similar in scope to the restructuring in this PR.

Suggested labels

Review effort 1/5

Poem

In the warren of scripts, dependencies grew,
Now one hop installs them—so easy to do!
Docs are refreshed, concise and bright,
With contrib and tests all set up right.
From Ubuntu to Mac, the build bunnies cheer—
“Just run the script, and OpenMS is here!”
🐇✨

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit 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.
Learn more here.

✨ Finishing Touches
  • 📝 Generate Docstrings

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@timosachsenberg

Copy link
Copy Markdown
Contributor

I like the scripts.

When we discussed getting rid of contrib typically those two arguments were brought up:

  • If a package is not available on a certain Linux distro or architecture, then users can't build it. This might be relevant for e.g. instrument vendors or some hpc setups.
  • Same if we want to add a new dependency

That being said. I am much in favor of reducing the role of contrib.
If maintainable, I would preferhaving two ways to build OpenMS: with

  1. system packages for binaries
  2. vcpkg for full source builds (currently not really tested or used)

@pjones

pjones commented May 14, 2025

Copy link
Copy Markdown
Contributor Author

I do think that we should continue to allow building with contrib, at least until the vcpkg stuff is ready. All I want to do is to update the installation instructions. However, we could include a blurb at the end of the docs saying how to build using contrib for those who don't have access to the packages.

@timosachsenberg

Copy link
Copy Markdown
Contributor

got ya. Yeah totally makes sense.

@pjones
pjones force-pushed the pjones/ci-install branch 2 times, most recently from 8973408 to 69df40e Compare May 22, 2025 11:30
@pjones pjones self-assigned this May 22, 2025
@pjones
pjones marked this pull request as ready for review May 22, 2025 11:33
@pjones
pjones requested a review from timosachsenberg May 22, 2025 11:34
@pjones

pjones commented May 22, 2025

Copy link
Copy Markdown
Contributor Author

@timosachsenberg Ready for final review.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 include ccmake by default. Consider adding a remark that users need to install the appropriate package (e.g., sudo apt-get install cmake-curses-gui on Ubuntu) to use ccmake.

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 for ctest to ensure users get up-to-date information, for example:

[ctest]: https://cmake.org/cmake/help/latest/manual/ctest.1.html
doc/doxygen/install/install-contrib.doxygen (2)

1-6: Clarify the status of contrib builds.
Since the contrib build 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_documentation hard-codes the relative path to the CI helper script.
If the script is ever moved (e.g. to scripts/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 \include guarded by \if so 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)/Comet is fine for typical
x86_64 builds but breaks for:

  • cross-compiles (e.g. build on x86, deploy on aarch64)
  • multi-arch images where uname -m returns the build host arch
  • renamed THIRDPARTY layouts on custom installs

Consider 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_prefix output 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_PATH expects 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

📥 Commits

Reviewing files that changed from the base of the PR and between 8b30bf3 and 69df40e.

📒 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 bash with set -eu and set -o pipefail ensures the script fails fast on errors.

tools/ci/deps-macos.sh (1)

1-5: Strict error handling is well applied.
Using set -eu and set -o pipefail is 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 – ensure set -e is inside.

The workflow executes:

bash OpenMS/tools/ci/deps-ubuntu.sh

Because 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 that deps-ubuntu.sh starts with:

#!/usr/bin/env bash
set -euo pipefail

and returns a non-zero exit status on all errors.

Comment thread tools/ci/deps-ubuntu.sh Resolved
Comment thread tools/ci/deps-macos.sh Resolved
Comment thread tools/ci/deps-macos.sh Resolved
@pjones
pjones marked this pull request as draft May 23, 2025 07:48
pjones added 2 commits May 23, 2025 10:01
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.
@pjones
pjones force-pushed the pjones/ci-install branch 2 times, most recently from 08b21ce to fe164aa Compare May 23, 2025 08:11
Comment thread tools/ci/deps-ubuntu.sh Resolved
@pjones
pjones force-pushed the pjones/ci-install branch from 966ccc4 to 35a2971 Compare May 23, 2025 08:51
pjones added 3 commits May 23, 2025 11:08
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.
@pjones
pjones force-pushed the pjones/ci-install branch from 35a2971 to 98f4a9c Compare May 23, 2025 09:08
@pjones
pjones marked this pull request as ready for review May 23, 2025 10:26
@pjones

pjones commented May 23, 2025

Copy link
Copy Markdown
Contributor Author

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 with sysctl, 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 use dnf vs yum

The 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

📥 Commits

Reviewing files that changed from the base of the PR and between 69df40e and 98f4a9c.

📒 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"
fi

Length of output: 1042


All included documentation files verified

✓ Verified that the following files exist under doc/doxygen/install/:

  • common-cmake-parameters.doxygen
  • install-testing-openms.doxygen
  • install-contrib.doxygen

No broken includes detected—no further action required.

@timosachsenberg
timosachsenberg enabled auto-merge May 26, 2025 11:31

@timosachsenberg timosachsenberg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice improvement

@timosachsenberg
timosachsenberg merged commit fabf538 into develop May 26, 2025
@timosachsenberg
timosachsenberg deleted the pjones/ci-install branch May 26, 2025 12:07
@coderabbitai coderabbitai Bot mentioned this pull request Jul 3, 2025
5 tasks
@coderabbitai coderabbitai Bot mentioned this pull request Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants