Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion .github/workflows/root-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
env:
VIRTUAL_ENV_DIR: ${{ github.workspace }}/ROOT_CI_VENV
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.platform == 'mac-beta' && '27' || '' }} # Problems with gfortran falling back 18 (unsupported)
HOME: /Users/sftnight

strategy:
fail-fast: false
Expand Down Expand Up @@ -154,11 +155,10 @@
- name: Pull Request Build
if: github.event_name == 'pull_request'
env:
HOME: /Users/sftnight
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 161 in .github/workflows/root-ci.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

"github.event.pull_request.head.ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/reference/security/secure-use#good-practices-for-mitigating-script-injection-attacks for more details
[ -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 \
Expand Down Expand Up @@ -231,6 +231,30 @@
path: /Users/sftnight/ROOT-CI/packages/root_v*
if-no-files-found: error

- name: Install
env:
BUILD_DIR: ${{ env.HOME }}/ROOT-CI/build
INSTALL_DIR: ${{ env.HOME }}/ROOT-CI/install
if: ${{ !cancelled() && !matrix.is_special }}
run: "cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.INSTALL_DIR }}"

- name: Build post-install test project
if: ${{ !cancelled() && !matrix.is_special }}
env:
SOURCE_DIR: ${{ env.HOME }}/ROOT-CI/src/test/PostInstall/
INSTALL_DIR: ${{ env.HOME }}/ROOT-CI/install
POST_INSTALL_DIR: ${{ env.HOME }}/ROOT-CI/PostInstall
run: |
cmake -S ${{ env.SOURCE_DIR }} -B ${{ env.POST_INSTALL_DIR }} -DCMAKE_PREFIX_PATH=${{ env.INSTALL_DIR }};
cmake --build ${{ env.POST_INSTALL_DIR }};

- name: CTest in post-install test project
if: ${{ !cancelled() && !matrix.is_special }}
env:
POST_INSTALL_DIR: ${{ env.HOME }}/ROOT-CI/PostInstall
working-directory: ${{ env.POST_INSTALL_DIR }}
run: ctest --output-on-failure -j $(sysctl -n hw.logicalcpu)


build-windows:
# For any event that is not a PR, the CI will always run. In PRs, the CI
Expand Down Expand Up @@ -288,7 +312,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 315 in .github/workflows/root-ci.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

"github.event.pull_request.head.ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/reference/security/secure-use#good-practices-for-mitigating-script-injection-attacks for more details
python .github/workflows/root-ci-config/build_root.py
--buildtype ${{ matrix.config }}
--platform windows10
Expand Down Expand Up @@ -455,7 +479,7 @@
- self-hosted
- linux
- ${{ matrix.architecture == null && 'x64' || matrix.architecture }}
- ${{ matrix.extra-runs-on == null && 'cpu' || matrix.extra-runs-on }}

Check failure on line 482 in .github/workflows/root-ci.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

property "extra-runs-on" is not defined in object type {architecture: string; image: string; is_special: bool; overrides: array<string>; platform_config: string; property: string; python_venv: string}

Check failure on line 482 in .github/workflows/root-ci.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

property "extra-runs-on" is not defined in object type {architecture: string; image: string; is_special: bool; overrides: array<string>; platform_config: string; property: string; python_venv: string}

name: |
${{ matrix.image }} ${{ matrix.property }}
Expand Down
7 changes: 6 additions & 1 deletion core/base/src/TSystem.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2276,6 +2276,11 @@ const char *TSystem::GetLibraries(const char *regexp, const char *options,

static TRegexp separator("[^ \\t\\s]+");
static TRegexp dynload("/lib-dynload/");
// Skip libffi, it is a private library used by the system. This is visible in the stub .tbd file:
// allowable-clients:
// clients: [ '!' ]
// See https://github.com/Homebrew/homebrew-core/issues/272324#issuecomment-5119880493 for more info
static TRegexp libffiMatch("/usr/lib/libffi");

Ssiz_t start, index, end;
start = index = end = 0;
Expand All @@ -2284,7 +2289,7 @@ const char *TSystem::GetLibraries(const char *regexp, const char *options,
index = libs2.Index(separator, &end, start);
if (index >= 0) {
TString s = libs2(index, end);
if (s.Index(dynload) == kNPOS) {
if (s.Index(dynload) == kNPOS && s.Index(libffiMatch) == kNPOS) {
if (!maclibs.IsNull()) maclibs.Append(" ");
maclibs.Append(s);
}
Expand Down
19 changes: 19 additions & 0 deletions test/PostInstall/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,24 @@ if(BUILD_TESTING)
set_tests_properties(python-package-metadata
PROPERTIES ENVIRONMENT PYTHONPATH=${ROOT_LIBRARY_DIR}
)

# Test ACLiC can be run from Python after installation
configure_file(post_install_test_ACLiC.C ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
configure_file(post_install_test_ACLiC.py ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
add_test(NAME python-post-install-ACLiC
COMMAND ${Python3_EXECUTABLE} post_install_test_ACLiC.py
)
set_tests_properties(python-post-install-ACLiC
PROPERTIES
ENVIRONMENT PYTHONPATH=${ROOT_LIBRARY_DIR}
FIXTURES_REQUIRED python-post-install-ACLiC-fixture
)
add_test(NAME python-post-install-ACLiC-cleanupfiles
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/post_install_test_ACLiC_cleanup.cmake
)
set_tests_properties(python-post-install-ACLiC-cleanupfiles
PROPERTIES FIXTURES_CLEANUP python-post-install-ACLiC-fixture
)

endif()
endif()
4 changes: 4 additions & 0 deletions test/PostInstall/post_install_test_ACLiC.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
int post_install_test_ACLiC()
{
return 42;
}
21 changes: 21 additions & 0 deletions test/PostInstall/post_install_test_ACLiC.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import ctypes

import cppyy.ll
import ROOT


def main():
err = ctypes.c_int(-1) # A value purposely different than any of the EErrorCode values
err_ptr = cppyy.ll.reinterpret_cast["TInterpreter::EErrorCode*"](ctypes.addressof(err))
ROOT.gInterpreter.ProcessLine(".L post_install_test_ACLiC.C+", err_ptr)
if err.value != ROOT.TInterpreter.kNoError:
raise RuntimeError(f"Failed to compile post_install_test_ACLiC.C, error code: {err.value}")

val = ROOT.gInterpreter.MakeInterpreterValue()
ROOT.gInterpreter.Evaluate("post_install_test_ACLiC()", val)

return 0 if val.GetAsUnsignedLong() == 42 else 1


if __name__ == "__main__":
raise SystemExit(main())
2 changes: 2 additions & 0 deletions test/PostInstall/post_install_test_ACLiC_cleanup.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
file(GLOB post_install_test_ACLiC_artifacts "post_install_test_ACLiC_*")
file(REMOVE ${post_install_test_ACLiC_artifacts})
Loading