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
10 changes: 6 additions & 4 deletions .github/workflows/root-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,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 160 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 @@ -287,7 +287,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 290 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 @@ -415,10 +415,11 @@
is_special: true
property: "clang Ninja builtins auto-registration off"
overrides: ["CMAKE_CXX_STANDARD=20"]
# Fedora Rawhide with Python debug build
# Fedora Rawhide with Python freethreading+debug build
- image: rawhide
python_venv: "/py-venv-3.14td/ROOT-CI"
is_special: true
property: "Fedora pydebug"
property: "Fedora pydebug no GIL"
overrides: ["CMAKE_CXX_STANDARD=23"]
# Minimal build
- image: alma10
Expand Down Expand Up @@ -447,7 +448,7 @@
- self-hosted
- linux
- ${{ matrix.architecture == null && 'x64' || matrix.architecture }}
- ${{ matrix.extra-runs-on == null && 'cpu' || matrix.extra-runs-on }}

Check failure on line 451 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 451 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 All @@ -466,14 +467,15 @@
BUILD_DIR: /github/home/ROOT-CI/build
INSTALL_DIR: /github/home/ROOT-CI/install
POST_INSTALL_DIR: /github/home/ROOT-CI/PostInstall
PYTHON_VENV: ${{ matrix.python_venv || '/py-venv/ROOT-CI' }}

steps:
- name: Set up environment
run: |
ccache -o max_size=${{ matrix.is_special && '5G' || '1.5G' }}
ccache -s || true
if [ -d /py-venv/ROOT-CI/bin/ ]; then
. /py-venv/ROOT-CI/bin/activate && echo PATH=$PATH >> $GITHUB_ENV;
if [ -d "$PYTHON_VENV/bin/" ]; then
. "$PYTHON_VENV/bin/activate" && echo PATH=$PATH >> $GITHUB_ENV;
fi
if ${{ contains(matrix.property, 'auto-registration off') }}; then
echo "Disabling ROOT's object auto registration for this job"
Expand Down Expand Up @@ -513,7 +515,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 518 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
--buildtype RelWithDebInfo
--platform ${{ matrix.image }}
--platform_config ${{ matrix.platform_config }}
Expand Down
3 changes: 2 additions & 1 deletion bindings/pyroot/pythonizations/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ if (Python3_VERSION VERSION_GREATER_EQUAL "3.11")
# On Windows we can't use the stable ABI yet: it requires linking against a
# different libpython, so as long as we don't build all translation units in
# the ROOT Pythonization library with the stable ABI we should not use it.
if(NOT MSVC)
# Free-threaded (Py_GIL_DISABLED) interpreters don't support the limited API.
if(NOT MSVC AND NOT Python3_GIL_DISABLED)
target_compile_options(${libname} PRIVATE -DPy_LIMITED_API=0x030B0000)
endif()
endif()
Expand Down
3 changes: 2 additions & 1 deletion bindings/tpython/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ if (Python3_VERSION VERSION_GREATER_EQUAL "3.10")
# On Windows we can't use the stable ABI yet: it requires linking against a
# different libpython, so as long as we don't build all translation units in
# the ROOT Pythonization library with the stable ABI we should not use it.
if(NOT MSVC)
# Free-threaded (Py_GIL_DISABLED) interpreters don't support the limited API.
if(NOT MSVC AND NOT Python3_GIL_DISABLED)
target_compile_options(ROOTTPython PRIVATE -DPy_LIMITED_API=0x030A0000)
endif()
endif()
Expand Down
27 changes: 27 additions & 0 deletions cmake/modules/SearchInstalledSoftware.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,33 @@ if(tmva-pymva OR tmva-sofie)
endif()
find_package(Python3 3.10 COMPONENTS ${python_components})

# Detect whether the found Python interpreter is a free-threaded build
# (Py_GIL_DISABLED is defined in pyconfig.h). The limited C API is not
# supported in free-threaded builds; including Python.h with Py_LIMITED_API
# defined produces a hard error there
# (https://docs.python.org/3/howto/free-threading-extensions.html).
# Checking the preprocessor symbol directly is more reliable than asking the
# interpreter (e.g. sysconfig.get_config_var may misreport, and
# sys._is_gil_enabled() can be overridden at runtime via PYTHON_GIL=1).
set(Python3_GIL_DISABLED FALSE)
if(Python3_Development_FOUND OR Python3_Development.Module_FOUND)
include(CheckCXXSourceCompiles)
set(_old_required_includes ${CMAKE_REQUIRED_INCLUDES})
set(CMAKE_REQUIRED_INCLUDES ${Python3_INCLUDE_DIRS})
check_cxx_source_compiles("
#include <Python.h>
#ifndef Py_GIL_DISABLED
#error \"GIL is not disabled\"
#endif
int main() { return 0; }
" ROOT_PYTHON_GIL_DISABLED)
set(CMAKE_REQUIRED_INCLUDES ${_old_required_includes})
if(ROOT_PYTHON_GIL_DISABLED)
set(Python3_GIL_DISABLED TRUE)
message(STATUS "Python ${Python3_VERSION} is a free-threaded build (Py_GIL_DISABLED defined); the limited C API will not be used")
endif()
endif()

#---Check for OpenGL installation-------------------------------------------------------
# OpenGL is required by various graf3d features that are enabled with opengl=ON,
# or by the Cocoa-related code that always requires it.
Expand Down
1 change: 1 addition & 0 deletions roottest/scripts/custom_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def __init__(self):
r"^In file included from input_line", # Wrapper input line
r"^[:space:]*$", # Lines which are empty apart from spaces
r"^Info in <TROOT>: Object auto registration", # ROOT 7 mode
r"^<frozen importlib\._bootstrap>:\d+: RuntimeWarning: The global interpreter lock \(GIL\) has been enabled", # Free-threaded Python re-enabling the GIL to load a C extension that isn't GIL-safe
]
]

Expand Down
Loading