Skip to content

Using vcpkg in main CI pipeline - #9927

Merged
pjones merged 33 commits into
OpenMS:developfrom
castorNova2:vcpkg_linux_integration
Aug 23, 2026
Merged

pjones merged 33 commits into
OpenMS:developfrom
castorNova2:vcpkg_linux_integration

Conversation

@castorNova2

@castorNova2 castorNova2 commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Description

Switches main CI build from contrib/system to vcpkg for dependency management, per vcpkg integration (#9511 and #9800) which are already merged. Mirrors OpenMS Vcpkg Ci (openms_vcpkg_ci.yml) workflow's approach.

Changes:

  • Removed the contrib part.
  • Added flex and bison to macOS install step since system own's are incompatible. The openms_vcpkg_ci.yml installs them explicitly, so this fills the gap.
  • Added an OpenMS/ci-tools@4855875 steps to restore and save vcpkg cache (.vcpkg-cache), place before Setup vcpkg step per spec.
  • Set VCPKG_BINARY_SOURCES to point at local .vcpkg-cache directory to store and restore cache. Even if vcpkg unable to restore rsync defined cache directory, it will compile all ports from scratch.
  • Replaced the manual cmake -G Ninja -DOPENMS_CONTRIB_LIBS=... -DPYOPENMS=ON ... invocation with cmake --preset <preset> and cmake --build --preset <preset>, using vcpkg aware presets already defined in CMakePresets.json and resolved in build.action.yml via Resolve CMake presets step.
  • Test step now runs ctest --preset <preset> instead of --test-dir-build.

Checklist

  • Make sure that you are listed in the AUTHORS file
  • Add relevant changes and new features to the CHANGELOG file
  • I have commented my code, particularly in hard-to-understand areas
  • New and existing unit tests pass locally with my changes
  • Updated or added python bindings for changed or new classes (Tick if no updates were necessary.)

How can I get additional information on failed tests during CI

Click to expand If your PR is failing you can check out

Advanced commands (admins / reviewer only)

Click to expand
  • /reformat (experimental) applies the clang-format style changes as additional commit. Note: your branch must have a different name (e.g., yourrepo:feature/XYZ) than the receiving branch (e.g., OpenMS:develop). Otherwise, reformat fails to push.
  • setting the label "NoJenkins" will skip tests for this PR on jenkins (saves resources e.g., on edits that do not affect tests)
  • commenting with rebuild jenkins will retrigger Jenkins-based CI builds

⚠️ Note: Once you opened a PR try to minimize the number of pushes to it as every push will trigger CI (automated builds and test) and is rather heavy on our infrastructure (e.g., if several pushes per day are performed).

Summary by CodeRabbit

  • Build & CI

    • Improved cross-platform builds with automatic compiler detection and platform-specific configurations.
    • Added preset-based configuration and parallelized CI testing.
    • Added optional secure remote caching to accelerate builds.
    • Improved release and test workflow reliability.
  • Dependencies

    • Improved dependency setup across Windows, Linux, and macOS.
    • Added documentation, build, and platform-specific tools.
    • Updated the package manager version used by CI.

@castorNova2

Copy link
Copy Markdown
Contributor Author

@pjones Would you please check and guide this PR?

Comment thread .github/actions/build/action.yml Resolved
Comment thread CMakePresets.json Resolved
Comment thread .github/actions/build/action.yml Resolved
@jpfeuffer

Copy link
Copy Markdown
Contributor

@castorNova2 nice. How large is the cache, though?

@castorNova2

castorNova2 commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor Author

@castorNova2 nice. How large is the cache, though?

Depends on OS. linux arm64 and macOS often have around 400MB and 700MB. linux (clang and gcc) has around 700MB. And for windows it is 1.1GB to 1.4 GB. All this without ONNX runtime.

With ONNX runtime, expect the increase in size of cache by 60 to 75 percent. Also similar increase in configure time.

From my observation, Local build often have different sizes of cache size compared to Github CI.

@castorNova2
castorNova2 force-pushed the vcpkg_linux_integration branch 4 times, most recently from 5ef98d9 to a116d70 Compare August 18, 2026 17:55
@pjones

pjones commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

@castorNova2 I'm running the release process on this branch over here. I want to make sure the installers still build correctly.

@pjones

pjones commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

UPDATE: Disregard. I see that you've already fixed this.


@castorNova2 the release workflow if failing on all platforms with the following error:

ninja: error: loading 'build.ninja': No such file or directory

This happens when running cmake followed by ninja dist. I'm guess we need to run cmake with a preset that knows how to build the installers? The installers are built with the following commands in release.yml:

cd build || exit 1

cmake_options=(
  "-DPACKAGE_TYPE=$PACKAGE_TYPE"
  "-DSEARCH_ENGINES_DIRECTORY=$GITHUB_WORKSPACE/_thirdparty"
)

if [[ -n "$HAVE_APPLE_CERT" ]] && [[ "$HAVE_APPLE_CERT" == "true" ]]; then
  cmake_options+=(
    "-DSIGNING_IDENTITY=$SIGNING_IDENTITY"
    "-DSIGNING_EMAIL=$SIGNING_EMAIL"
    "-DCPACK_PRODUCTBUILD_IDENTITY_NAME=$CPACK_PRODUCTBUILD_IDENTITY_NAME"
  )
fi

cmake "${cmake_options[@]}" ..

if ! ninja dist; then
  if [[ "$RUNNER_OS" == "Windows" ]]; then
    cat _CPack_Packages/win64/NSIS/NSISOutput.log
  fi

  exit 1
fi

pjones added 2 commits August 20, 2026 13:36
This commit changes the dependency scripts so they no longer install
libraries that are actually built from vcpkg.
@pjones
pjones force-pushed the vcpkg_linux_integration branch from 52db975 to e7e2297 Compare August 20, 2026 15:03
@pjones

pjones commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Nightly release workflow works on all platforms but Windows. However, Windows is only failing because of the required built time exceeds the GitHub maximum.

I am also working on getting this branch to work with pyopenms-wheels-cibuildwheel. This is not a requirement for GSoC but I don't want to merge while this is broken.

@pjones
pjones force-pushed the vcpkg_linux_integration branch from 1c93a55 to 1f517f4 Compare August 21, 2026 07:22
@pjones

pjones commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Python wheels built successfully. Just waiting on the Windows machine in the release workflow to finish.

@pjones

pjones commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Update: The release workflow is working, but the rsync cache action wasn't able to push the vcpkg cache due to a malformed SSH key.

I just pushed two changes to the rsync cache action:

  1. Add a terminating newline to the SSH key if it is missing

  2. When pulling the cache, if no SSH key is found, try downloading the cache over HTTP.

    This might end up being way too slow. But I thought I would try it as a workaround for not having SSH keys in foreign PRs.

I'm running a new release workflow right now.

@pjones

pjones commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

First release job completed (Ubuntu on ARM) and it pushed to the rsync cache!

@pjones

pjones commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Everything is building now!

The Windows runner failed to upload the vcpkg cache because rsync didn't like having a Windows drive letter in the directory name. I have a new version of the rsync action that I'm going to try out and when that works I'll merge the PRs.

@pjones
pjones force-pushed the vcpkg_linux_integration branch 2 times, most recently from 290e521 to 675d704 Compare August 21, 2026 17:40
Also, macOS ships with a version of rsync that is too old.
@pjones
pjones force-pushed the vcpkg_linux_integration branch from 675d704 to fda0ba8 Compare August 21, 2026 18:42
@pjones
pjones force-pushed the vcpkg_linux_integration branch from cdc3e84 to 264e017 Compare August 23, 2026 08:27
@pjones
pjones merged commit 7d0aac0 into OpenMS:develop Aug 23, 2026
49 of 50 checks passed
timosachsenberg added a commit that referenced this pull request Aug 25, 2026
…9958)

Adds entries for two recently merged PRs whose CHANGELOG checklist item
was left unchecked: #9927 (main CI build/test workflow switched to
vcpkg) and #9928 (new vcpkg dependency-management guide).

Co-authored-by: Claude <[email protected]>
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