Skip to content

Conversation

@hageboeck
Copy link
Member

This was factored out of #17607.

In contrast to the initial proposal in #17607, I managed to keep the artifact copy at build time. This should alleviate all problems where an out-of-date file might surprise developers.
I used cmake -E copy_directory instead of going file-by-file, which again significantly reduces build targets and makes the initial copy much faster. We don't gain on the second invocation of make, and when tutorials are touched, one pays a 5s penalty, but I think the 15s saved on first invocation and the reduced number of targets make this worthwhile.

make -j6 move_artifacts Old New
1st invocation 25.5 10.4
2nd invocation 2.5 2.6
Touch a RooFit tutorial 2.5 7.8

For the people who wonder why we do this at all

  • Although all tutorials that run as part of ctest are invoked with a path to the source directory, 77 tutorials break because they call gROOT->GetTutorialDir(), which points to the path where the root.exe is.
  • Users might be used to finding the tutorials next to their root.exe, and we didn't yet have a discussion on whether or not and how this should be changed.

Fix #14953.

@hageboeck hageboeck requested a review from pcanal February 11, 2025 08:05
@hageboeck hageboeck self-assigned this Feb 11, 2025
@hageboeck hageboeck requested a review from bellenot as a code owner February 11, 2025 08:05
@github-actions
Copy link

github-actions bot commented Feb 11, 2025

Test Results

    18 files      18 suites   4d 3h 19m 49s ⏱️
 2 715 tests  2 715 ✅ 0 💤 0 ❌
47 172 runs  47 172 ✅ 0 💤 0 ❌

Results for commit ff7cc75.

♻️ This comment has been updated with latest results.

Copy link
Member

@pcanal pcanal left a comment

Choose a reason for hiding this comment

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

This looks good to me. Unlike headers, the consequence of over-updating is negligible for the artifacts.

Use cmake -E copy_directory to execute the copy instead of doing it file
by file.

Fix root-project#14953.
When running ctest, all tutorials are invoked from the source directory,
so here we do the same for hsimple.C.
@hageboeck hageboeck merged commit dbcf400 into root-project:master Feb 12, 2025
21 checks passed
@hageboeck hageboeck deleted the artifact_copy branch February 12, 2025 15:20
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.

[cmake] Glob when copying headers and tutorials

2 participants