Repository navigation
contrib: Treat as a submodule so we don't release it separately - #9155
Conversation
6c14786 to
bf7efb9
Compare
📝 WalkthroughWalkthroughExtracted Windows contrib preparation into a dedicated Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as "GitHub Actions (Matrix)"
participant Win as "Windows runner\n(prepare-contrib-for-windows)"
participant Artifact as "GitHub Artifacts"
participant Build as "Runner\n(build-and-test)"
participant Git as "Contrib Submodule"
Dev->>Win: start prepare-contrib-for-windows
Win->>Git: determine contrib submodule rev
Win->>Win: check cache for `${{ runner.os }}-<rev>`\nbuild via CMake on cache miss
Win->>Artifact: upload `contrib-<rev>` artifact
Dev->>Build: start build-and-test (depends on prepare)
Build->>Git: recompute contrib submodule rev
Build->>Artifact: download `contrib-<rev>` -> `OpenMS/contrib/build`
Build->>Build: set OPENMS_CONTRIB_LIBS to `.../OpenMS/contrib/build`\ncontinue build & tests
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/openms_ci_matrix_full.yml:
- Around line 94-95: The top-level needs key referencing
prepare-contrib-for-windows is forcing every matrix row to wait and blocking
non-Windows runs; remove that global dependency and instead create a dedicated
preparatory job (e.g., prepare-contrib-for-windows) that other jobs do not
implicitly need, then make only the Windows build job depend on it (or add an
explicit needs on that single Windows job) so the strategy/matrix jobs for Linux
and macOS run independently of Windows contrib prep.
- Around line 412-417: The step with id "contrib-rev" runs git submodule status
from the workflow root which is not a git repo; change the command to run in the
checked-out OpenMS directory by invoking git with -C OpenMS (i.e., update the
run block for the "Identify contrib submodule revision for cache key" step so
the git command uses git -C OpenMS submodule status --cached -- contrib) so the
submodule status is evaluated in the correct repository directory.
- Around line 51-57: The contrib-rev step is using plain echo which doesn't set
a GitHub Actions step output; change the step (id: contrib-rev) to write the
output into $GITHUB_OUTPUT (e.g., append "rev=$rev" to $GITHUB_OUTPUT) so that
steps.contrib-rev.outputs.rev is populated; apply the same change to the other
identical step(s) that set the contrib submodule revision (the later block
around the other occurrence) so cache keys and artifact names include the actual
submodule revision.
- Around line 72-81: The CI step "Build contrib if not in cache" currently only
runs the cmake generator command (cmake -G"Visual Studio 17 2022" -Ax64
-DBUILD_TYPE=ALL ...) which produces project files but does not compile
binaries; after the existing cmake generation call add an explicit build
invocation (using the same parallelism env var $NPROC /
$env:CMAKE_BUILD_PARALLEL_LEVEL) to actually build the generated Visual Studio
solution (e.g. run cmake --build . --config Release with parallel build flags)
so the expected lib/, bin/, and include/ outputs are produced before artifact
upload. Ensure the build runs in the same working directory set by Set-Location
"${{ github.workspace }}\contrib\build" and that failures propagate (exit on
non-zero).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ec6b5b67-2451-4155-94a1-4e0322e8070c
📒 Files selected for processing (1)
.github/workflows/openms_ci_matrix_full.yml
|
Sounds good - seems it could make things easier on Windows (and is a temporary solution). |
477212a to
e90e588
Compare
|
@timosachsenberg Build times are per job not per runner or per workspace so it shouldn't be a problem. I did a full CI build without caching and it was fine. |
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (2)
.github/workflows/openms_ci_matrix_full.yml (2)
94-95:⚠️ Potential issue | 🟠 MajorDon’t gate the full matrix on the Windows contrib prep job.
Line 95 makes Linux and macOS wait for a Windows-only cache/build path. On a cache miss, that turns the stated Windows slowdown into a whole-matrix slowdown.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/openms_ci_matrix_full.yml around lines 94 - 95, The build-and-test job is currently gated on the Windows-only preparatory job prepare-contrib-for-windows via the needs: field; remove that global dependency and instead either (A) drop needs: prepare-contrib-for-windows from build-and-test so Linux/macOS runners aren’t blocked, or (B) make the Windows-specific matrix entry depend on prepare-contrib-for-windows by splitting build-and-test into separate jobs or adding a conditional that only requires prepare-contrib-for-windows for the Windows matrix axis; update references to the job name build-and-test and the dependency prepare-contrib-for-windows accordingly.
413-418:⚠️ Potential issue | 🔴 CriticalRun the submodule lookup from
OpenMS/.In this job the repository is checked out under
OpenMS/(Lines 141-143), so Line 417 executesgit submodule statusoutside a Git repository and the Windows artifact download never gets a valid revision.Suggested fix
- name: Identify contrib submodule revision for cache key id: contrib-rev shell: bash run: | - rev=$(git submodule status --cached -- contrib | sed -E 's/^-?//' | cut -d' ' -f1) + rev=$(git -C OpenMS submodule status --cached -- contrib | sed -E 's/^-?//' | cut -d' ' -f1) echo "rev=$rev" >> "$GITHUB_OUTPUT"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/openms_ci_matrix_full.yml around lines 413 - 418, The "Identify contrib submodule revision for cache key" step (id: contrib-rev) runs git submodule status outside the checked-out OpenMS working tree, so it returns no revision; update the step to execute the submodule lookup from the OpenMS checkout (either change the working directory to OpenMS before running the existing git submodule status command, or invoke git with the -C OpenMS option) so that the rev=$(git submodule status --cached -- contrib) extraction runs inside the OpenMS repository and produces a valid revision for the artifact cache key.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/openms_ci_matrix_full.yml:
- Around line 45-57: In the CI prep job step with id contrib-rev (name "Identify
contrib submodule revision for cache key"), remove the stray "cd OpenMS" so the
git submodule status command runs from the workspace root (where the job checks
out and builds contrib/...), i.e. delete the cd line and keep the rev assignment
and echo as-is so rev=$(git submodule status --cached -- contrib | sed -E
's/^-?//' | cut -d' ' -f1) executes in the correct directory to produce the
cache key and artifact name.
---
Duplicate comments:
In @.github/workflows/openms_ci_matrix_full.yml:
- Around line 94-95: The build-and-test job is currently gated on the
Windows-only preparatory job prepare-contrib-for-windows via the needs: field;
remove that global dependency and instead either (A) drop needs:
prepare-contrib-for-windows from build-and-test so Linux/macOS runners aren’t
blocked, or (B) make the Windows-specific matrix entry depend on
prepare-contrib-for-windows by splitting build-and-test into separate jobs or
adding a conditional that only requires prepare-contrib-for-windows for the
Windows matrix axis; update references to the job name build-and-test and the
dependency prepare-contrib-for-windows accordingly.
- Around line 413-418: The "Identify contrib submodule revision for cache key"
step (id: contrib-rev) runs git submodule status outside the checked-out OpenMS
working tree, so it returns no revision; update the step to execute the
submodule lookup from the OpenMS checkout (either change the working directory
to OpenMS before running the existing git submodule status command, or invoke
git with the -C OpenMS option) so that the rev=$(git submodule status --cached
-- contrib) extraction runs inside the OpenMS repository and produces a valid
revision for the artifact cache key.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f9a0ccf0-1359-4414-a07f-a7c36d46cbac
📒 Files selected for processing (1)
.github/workflows/openms_ci_matrix_full.yml
We want to use the submodule revision hash as the way to connect an OpenMS release to a version of contrib. By doing this we make releasing OpenMS easier because we don't have to tag/release contrib. Yes, I know this is slower for building on Windows. But contrib is going away in the next couple of months. I put the contrib build in its own job so that we don't hit run-time limits.
e90e588 to
9dbd850
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/openms_ci_matrix_full.yml:
- Line 502: The CMake prefix path variable OPENMS_CONTRIB_LIBS was changed to
only include OpenMS/contrib/build which omits the Windows libcurl install in
OpenMS/contrib; restore or extend OPENMS_CONTRIB_LIBS so it includes both the
contrib root and the build subdir (so CMake can find libcurl installed into
OpenMS/contrib by the Windows libcurl step) — update the workflow entry that
defines OPENMS_CONTRIB_LIBS to include both "${{ github.workspace
}}/OpenMS/contrib" and "${{ github.workspace }}/OpenMS/contrib/build" so the
Windows configure step finds the correct curl.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3257e20e-9ca0-4c96-9243-cd6b40931245
📒 Files selected for processing (1)
.github/workflows/openms_ci_matrix_full.yml
|
@timosachsenberg The CI builds finally finished. I'm not sure what's going on but installing doxygen on Windows sometimes and randomly results in a 404. I've seen it in other builds as well. Restarting the build usually fixes the issue but in this case I had to restart it twice. |
|
Ok cool. I observed this as well. Not sure why choco seems to be so flaky |
Add entry for contrib directory converted to git submodule (#9155): developers and packagers building from source now need 'git submodule update --init' to obtain vendored third-party libraries. Co-authored-by: Copilot <[email protected]>
Add entry for contrib directory converted to git submodule (#9155): developers and packagers building from source now need 'git submodule update --init' to obtain vendored third-party libraries. Co-authored-by: GitHub Copilot <[email protected]> Co-authored-by: Copilot <[email protected]>
The contrib directory was converted to a git submodule (#9155). Add a note to AGENTS.md so developers know to run 'git submodule update --init contrib' before building. Co-authored-by: GitHub Copilot <[email protected]> Co-authored-by: Copilot <[email protected]>
Instead of pulling pre-built releases of
contrib, build it in CI from the associated submodule.We want to use the submodule revision hash as the way to connect an OpenMS release to a version of contrib. By doing this we make releasing OpenMS easier because we don't have to tag/release contrib and other external repositories.
Yes, this will add 45 minutes to the CI builds, but only when the
contribsubmodule is changed or the cached build ofcontribis evicted from the cache.Summary by CodeRabbit