-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[core] Use automatic build tree detection for all resource directories #21018
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -130,6 +130,11 @@ | |
| - platform: mac-beta | ||
| is_special: true | ||
| arch: ARM64 | ||
| # For the PR and incremental builds, we set gnuinstall=ON to check | ||
| # if CMake can deal with the different structure of the install and | ||
| # build tree at build and test time. We don't care how the install | ||
| # actually looks like. | ||
| overrides: ["gnuinstall=ON"] | ||
|
|
||
| runs-on: | ||
| - self-hosted | ||
|
|
@@ -157,7 +162,7 @@ | |
| INCREMENTAL: ${{ !contains(github.event.pull_request.labels.*.name, 'clean build') && !matrix.platform == 'mac15' && !matrix.platform == 'mac26'}} | ||
| GITHUB_PR_ORIGIN: ${{ github.event.pull_request.head.repo.clone_url }} | ||
| OVERRIDES: ${{ join( matrix.overrides, ' ') }} | ||
| run: | | ||
|
Check failure on line 165 in .github/workflows/root-ci.yml
|
||
| [ -d "${VIRTUAL_ENV_DIR}" ] && source ${VIRTUAL_ENV_DIR}/bin/activate | ||
| echo "Python is now $(which python3) $(python3 --version)" | ||
| src/.github/workflows/root-ci-config/build_root.py \ | ||
|
|
@@ -287,7 +292,7 @@ | |
| INCREMENTAL: ${{ !contains(github.event.pull_request.labels.*.name, 'clean build') }} | ||
| GITHUB_PR_ORIGIN: ${{ github.event.pull_request.head.repo.clone_url }} | ||
| shell: cmd | ||
| run: "C:\\setenv.bat ${{ matrix.target_arch }} && | ||
|
Check failure on line 295 in .github/workflows/root-ci.yml
|
||
| python .github/workflows/root-ci-config/build_root.py | ||
| --buildtype ${{ matrix.config }} | ||
| --platform windows10 | ||
|
|
@@ -448,7 +453,7 @@ | |
| - self-hosted | ||
| - linux | ||
| - ${{ matrix.architecture == null && 'x64' || matrix.architecture }} | ||
| - ${{ matrix.extra-runs-on == null && 'cpu' || matrix.extra-runs-on }} | ||
|
Check failure on line 456 in .github/workflows/root-ci.yml
|
||
|
|
||
| name: | | ||
| ${{ matrix.image }} ${{ matrix.property }} | ||
|
|
@@ -515,7 +520,7 @@ | |
| INCREMENTAL: ${{ !contains(github.event.pull_request.labels.*.name, 'clean build') }} | ||
| GITHUB_PR_ORIGIN: ${{ github.event.pull_request.head.repo.clone_url }} | ||
| OVERRIDES: ${{ join( matrix.overrides, ' ') }} | ||
| run: ".github/workflows/root-ci-config/build_root.py | ||
|
Check failure on line 523 in .github/workflows/root-ci.yml
|
||
| --buildtype RelWithDebInfo | ||
| --platform ${{ matrix.image }} | ||
| --platform_config ${{ matrix.platform_config }} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if
libdirandinstall_dir_absoluteare both absolute and unrelated (weird installation where one of the directory is being installed in an unusual place).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To keeps things simple and branch-free: every resource directory is encoded as a path relative to libdir, resolved at runtime against the actual location of
libCore. So the whole install tree stays relocatable as long as its internal layout is preserved.There might be corner cases where different behavior is preferable, e.g. an some absolute resource directory like
/usr/etcdirectory outside the install prefix that you expect to stay fixed even when the build is relocated. There, a relative path would be wrong. But I think that's a pathological case we Shouldn't support unless a user actually asks for it.To be fair, this would have worked before with
gnuinstall=ON, because all resource directories were absolute in that case, but that also meansgnuinstall=ONbuilds weren't relocatable. One of my goals here was to unify thegnuinstall=ONandgnuinstall=OFFbehavior so they only differ by theCMAKE_INSTALL_<…>paths. So if you want relocatable builds and not too many if-else branches in the CMake, what's in the PR is the result..There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We really do not have a good handle on whether the feature is or is not used (I do have some recollection of using stashing the etc and/or share directory 'somewhere' else). Unless I can re-find the user I am thinking of (and maybe even if), we really should "explicitly" error out if we can detect the issue.