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
15 changes: 11 additions & 4 deletions .github/workflows/root-ci-config/build_root.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
# the target branch in the ROOT repository using base_ref and head_ref:
# - The base_ref is e.g. "master" or "v6-38-00-patches"
# - The head_ref for PRs is formatted as <PR branch>:<Fork branch> e.g. "refs/pull/20742/head:cppyy_fixup"
if not ":" in args.head_ref:

Check failure on line 62 in .github/workflows/root-ci-config/build_root.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (E713)

.github/workflows/root-ci-config/build_root.py:62:16: E713 Test for membership should be `not in`
build_utils.print_error(f"This has been identified as a PR build. However, the head-ref is {args.head_ref}.")
branch_in_fork = args.head_ref.split(":")[-1]
if branch_in_fork == args.base_ref:
Expand Down Expand Up @@ -131,6 +131,10 @@

git_pull("src", args.repository, args.base_ref)

benchmark: bool = 'rootbench' in options_dict and options_dict['rootbench'].lower() == "on"
if benchmark:
git_pull("rootbench", "https://github.com/root-project/rootbench", "master")

if pull_request:
base_head_sha = get_base_head_sha("src", args.repository, args.sha, args.head_sha)

Expand Down Expand Up @@ -161,11 +165,12 @@
create_binaries(args.buildtype)

if testing:
extra_ctest_flags = ""
extra_ctest_flags = ''
if WINDOWS:
extra_ctest_flags += "--repeat until-pass:5 "
extra_ctest_flags += "--build-config " + args.buildtype

extra_ctest_flags += '--repeat until-pass:5 '
extra_ctest_flags += '--build-config ' + args.buildtype
if benchmark:
extra_ctest_flags = ' -R "^rootbench-" '
ctest_returncode = run_ctest(extra_ctest_flags)

if args.coverage:
Expand Down Expand Up @@ -332,8 +337,10 @@
failures in main().
"""
builddir = os.path.join(WORKDIR, "build")
setupROOTEnv = f""". '{builddir}/bin/thisroot.sh'""" if 'rootbench' in extra_ctest_flags else ''
ctest_result = subprocess_with_log(f"""
cd '{builddir}'
{setupROOTEnv}
ctest --output-on-failure --parallel {os.cpu_count()} --output-junit TestResults.xml {extra_ctest_flags}
""")

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/root-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,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 159 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 @@ -286,7 +286,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 289 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 @@ -424,6 +424,11 @@
minimal: true
property: "minimal build"
overrides: ["CMAKE_CXX_STANDARD=20"]
# Benchmark build
- image: alma10
is_special: true
property: "benchmark build"
overrides: ["CMAKE_CXX_STANDARD=20", "rootbench=ON"]
# Disable GPU builds until the DNS problem is solved
# - image: ubuntu2404-cuda
# is_special: true
Expand All @@ -434,7 +439,7 @@
- self-hosted
- linux
- ${{ matrix.architecture == null && 'x64' || matrix.architecture }}
- ${{ matrix.extra-runs-on == null && 'cpu' || matrix.extra-runs-on }}

Check failure on line 442 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; cmake_generator: string; image: string; is_special: bool; minimal: bool; overrides: array<string>; property: string}

Check failure on line 442 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; cmake_generator: string; image: string; is_special: bool; minimal: bool; overrides: array<string>; property: string}

name: |
${{ matrix.image }} ${{ matrix.property }}
Expand Down
Loading