Skip to content
Closed
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: 14 additions & 12 deletions .github/workflows/root-ci-config/build_root.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,16 @@
CONNECTION = None

WINDOWS = (os.name == 'nt')
WORKDIR = (os.environ['HOME'] + '/ROOT-CI') if not WINDOWS else 'C:/ROOT-CI'
try:
WORKDIR = (os.environ['GITHUB_WORKSPACE'])
except:

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

View workflow job for this annotation

GitHub Actions / ruff

Ruff (E722)

.github/workflows/root-ci-config/build_root.py:51:1: E722 Do not use bare `except`
WORKDIR = (os.environ['HOME'] + '/ROOT-CI') if not WINDOWS else 'C:/ROOT-CI'
COMPRESSIONLEVEL = 6 if not WINDOWS else 1


def main():
# openstack.enable_logging(debug=True)
print("WORKDIR=" + WORKDIR)

# used when uploading artifacts, calculate early since build times are inconsistent
yyyy_mm_dd = datetime.datetime.today().strftime('%Y-%m-%d')
Expand All @@ -65,15 +69,17 @@
if not pull_request:
build_utils.print_info("head_ref same as base_ref, assuming non-PR build")

cleanup_previous_build()
if WINDOWS:
cleanup_previous_build()

# Load CMake options from .github/workflows/root-ci-config/buildconfig/[platform].txt
this_script_dir = os.path.dirname(os.path.abspath(__file__))

options_dict = {
**load_config(f'{this_script_dir}/buildconfig/global.txt'),
# file below overwrites values from above
**load_config(f'{this_script_dir}/buildconfig/{args.platform}.txt')
**load_config(f'{this_script_dir}/buildconfig/{args.platform}.txt'),
**load_config(f'buildconfig_overrides.txt')

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

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F541)

.github/workflows/root-ci-config/build_root.py:82:23: F541 f-string without any placeholders
}

options = build_utils.cmake_options_from_dict(options_dict)
Expand Down Expand Up @@ -113,15 +119,16 @@
build_utils.print_warning(f'Failed to download: {err}')
args.incremental = False

git_pull("src", args.repository, args.base_ref)
if WINDOWS:
git_pull("src", args.repository, args.base_ref)

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

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

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F841)

.github/workflows/root-ci-config/build_root.py:126:7: F841 Local variable `base_head_sha` is assigned to but never used

head_ref_src, _, head_ref_dst = args.head_ref.partition(":")
head_ref_dst = head_ref_dst or "__tmp"

rebase("src", "origin", base_head_sha, head_ref_dst, args.head_sha)
#rebase("src", "origin", base_head_sha, head_ref_dst, args.head_sha)

testing: bool = options_dict['testing'].lower() == "on"

Expand Down Expand Up @@ -226,11 +233,6 @@
}}
New-Item -Force -Type directory -Path {WORKDIR}
""")
else:
# mac/linux/POSIX
result = subprocess_with_log(f"""
rm -rf {WORKDIR}/*
""")

if result != 0:
die(result, "Failed to clean up previous artifacts")
Expand Down Expand Up @@ -278,9 +280,9 @@
# TODO: Simplify after ROOT is Python 3.12+ only
# c.f. https://docs.python.org/3.12/library/tarfile.html#extraction-filters
if hasattr(tarfile, "data_filter"):
tar.extractall(WORKDIR, filter="data")
tar.extract("build", WORKDIR, filter="data")
else:
tar.extractall(WORKDIR)
tar.extract("build", WORKDIR)

build_utils.log.add(f'\ncd {WORKDIR} && tar -xf {tar_path}\n')

Expand Down
180 changes: 91 additions & 89 deletions .github/workflows/root-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
contents: read

strategy:
fail-fast: false
fail-fast: true
matrix:
# Specify platform + arch + (optional) build option overrides
#
Expand All @@ -119,14 +119,17 @@ jobs:
- ${{ matrix.platform }}

name: |
${{ matrix.platform }} ${{ matrix.arch }}
${{ matrix.platform }} ${{ matrix.arch }}
${{ (github.event_name != 'schedule' && github.event_name != 'workflow_dispatch' && join( matrix.overrides, ', ' )) || '' }}

steps:
- name: Cleanup workdir
run: rm -rf ${{ github.workspace }}/*

- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref_name }}
path: "src"

- name: Apply option overrides from matrix for this job for non-release builds
if: ${{ github.event_name != 'schedule' && github.event_name != 'workflow_dispatch' && matrix.overrides != NaN }}
Expand Down Expand Up @@ -159,7 +162,7 @@ jobs:

- name: Set up curl CA bundle for Davix to work with https
run: 'echo SSL_CERT_FILE=/opt/local/share/curl/curl-ca-bundle.crt >> $GITHUB_ENV'

- name: Pull Request Build
shell: bash -leo pipefail {0}
if: github.event_name == 'pull_request'
Expand Down Expand Up @@ -231,13 +234,7 @@ jobs:
build-windows:
# For any event that is not a PR, the CI will always run. In PRs, the CI
# can be skipped if the tag [skip-ci] or [skip ci] is written in the title.
if: |
(github.repository_owner == 'root-project' && github.event_name != 'pull_request') ||
(github.event_name == 'pull_request' && !(
contains(github.event.pull_request.title, '[skip-ci]') ||
contains(github.event.pull_request.title, '[skip ci]') ||
contains(github.event.pull_request.labels.*.name, 'skip ci')
))
if: false

permissions:
contents: read
Expand Down Expand Up @@ -276,7 +273,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref_name }}
path: "src"

- name: Pull Request Build
if: github.event_name == 'pull_request'
Expand Down Expand Up @@ -378,50 +375,50 @@ jobs:
include:
- image: fedora42
overrides: ["CMAKE_CXX_STANDARD=23"]
- image: fedora43
overrides: ["CMAKE_CXX_STANDARD=23"]
is_special: true
- image: alma8
- image: alma9
overrides: ["CMAKE_BUILD_TYPE=Debug"]
- image: alma10
- image: ubuntu22
overrides: ["imt=Off", "CMAKE_BUILD_TYPE=Debug"]
- image: ubuntu2404
overrides: ["CMAKE_BUILD_TYPE=Debug"]
- image: ubuntu2504
overrides: ["CMAKE_CXX_STANDARD=23"]
- image: ubuntu2510
is_special: true
overrides: ["CMAKE_CXX_STANDARD=23"]
- image: debian125
overrides: ["CMAKE_CXX_STANDARD=20", "dev=ON", "CMAKE_CXX_FLAGS=-Wsuggest-override"]
- image: debian13
overrides: ["dev=ON", "CMAKE_CXX_FLAGS=-Wsuggest-override"]
# Special builds
- image: alma9
is_special: true
property: modules_off
overrides: ["runtime_cxxmodules=Off"]
- image: alma9
is_special: true
property: march_native
overrides: ["CMAKE_BUILD_TYPE=RelWithDebInfo", "CMAKE_CXX_FLAGS=-march=native", "CMAKE_C_FLAGS=-march=native", "builtin_zlib=ON", "builtin_zstd=ON"]
- image: alma9
is_special: true
property: arm64
overrides: ["CMAKE_BUILD_TYPE=RelWithDebInfo", "builtin_zlib=ON", "builtin_zstd=ON"]
architecture: ARM64
- image: alma10
is_special: true
property: "clang Ninja"
overrides: ["CMAKE_C_COMPILER=clang", "CMAKE_CXX_COMPILER=clang++"]
cmake_generator: Ninja
# Fedora Rawhide with Python debug build
- image: rawhide
is_special: true
property: "Fedora pydebug"
overrides: ["CMAKE_CXX_STANDARD=23"]
# - image: fedora43
# overrides: ["CMAKE_CXX_STANDARD=23"]
# is_special: true
# - image: alma8
# - image: alma9
# overrides: ["CMAKE_BUILD_TYPE=Debug"]
# - image: alma10
# - image: ubuntu22
# overrides: ["imt=Off", "CMAKE_BUILD_TYPE=Debug"]
# - image: ubuntu2404
# overrides: ["CMAKE_BUILD_TYPE=Debug"]
# - image: ubuntu2504
# overrides: ["CMAKE_CXX_STANDARD=23"]
# - image: ubuntu2510
# is_special: true
# overrides: ["CMAKE_CXX_STANDARD=23"]
# - image: debian125
# overrides: ["CMAKE_CXX_STANDARD=20", "dev=ON", "CMAKE_CXX_FLAGS=-Wsuggest-override"]
# - image: debian13
# overrides: ["dev=ON", "CMAKE_CXX_FLAGS=-Wsuggest-override"]
# # Special builds
# - image: alma9
# is_special: true
# property: modules_off
# overrides: ["runtime_cxxmodules=Off"]
# - image: alma9
# is_special: true
# property: march_native
# overrides: ["CMAKE_BUILD_TYPE=RelWithDebInfo", "CMAKE_CXX_FLAGS=-march=native", "CMAKE_C_FLAGS=-march=native", "builtin_zlib=ON", "builtin_zstd=ON"]
# - image: alma9
# is_special: true
# property: arm64
# overrides: ["CMAKE_BUILD_TYPE=RelWithDebInfo", "builtin_zlib=ON", "builtin_zstd=ON"]
# architecture: ARM64
# - image: alma10
# is_special: true
# property: "clang Ninja"
# overrides: ["CMAKE_C_COMPILER=clang", "CMAKE_CXX_COMPILER=clang++"]
# cmake_generator: Ninja
# # Fedora Rawhide with Python debug build
# - image: rawhide
# is_special: true
# property: "Fedora pydebug"
# overrides: ["CMAKE_CXX_STANDARD=23"]
# Disable GPU builds until the DNS problem is solved
# - image: ubuntu2404-cuda
# is_special: true
Expand All @@ -447,23 +444,39 @@ jobs:
CONTAINER_IMAGE: "registry.cern.ch/root-ci/${{ matrix.image }}:buildready" #KEEP IN SYNC WITH ABOVE
CONTAINER_OPTIONS: "--security-opt label=disable --rm ${{ matrix.property == 'gpu' && '--device nvidia.com/gpu=all' || '' }}" #KEEP IN SYNC WITH ABOVE

env:
BUILD_DIR: /github/home/ROOT-CI/build
INSTALL_DIR: /github/home/ROOT-CI/install
POST_INSTALL_DIR: /github/home/ROOT-CI/PostInstall

steps:
- name: Configure large ccache
if: ${{ matrix.is_special }}
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
JOB_CONTEXT: ${{ toJSON(job) }}
ENV_CONTEXT: ${{ toJSON(env) }}
run: |
ccache -o max_size=5G
ccache -p || true
ccache -s || true
echo "$GITHUB_CONTEXT"
echo "--------------------------"
echo "$JOB_CONTEXT"
echo "--------------------------"
echo "$ENV_CONTEXT"

- name: Configure small ccache
if: ${{ !matrix.is_special }}
# The github.workspace context variable returns the path *outside* of the container.
# Therefore, we need to define environment variables inside the container
- name: Define environment
run: |
ccache -o max_size=1.5G
echo "SRC_DIR=${GITHUB_WORKSPACE}/src" >> "$GITHUB_ENV"
echo "BUILD_DIR=${GITHUB_WORKSPACE}/build" >> "$GITHUB_ENV"
echo "INSTALL_DIR=${GITHUB_WORKSPACE}/install" >> "$GITHUB_ENV"
echo "POST_INSTALL_DIR=${GITHUB_WORKSPACE}/postInstall" >> "$GITHUB_ENV"

- name: Cleanup home
run: rm -rf ${GITHUB_WORKSPACE}/* ${GITHUB_WORKSPACE}/.github

- name: Directory tree
run: ls -la

- name: Configure ccache
env:
CCACHE_SIZE: ${{ matrix.is_special && '5G' || '1.5G' }}
run: |
ccache -o max_size=${CCACHE_SIZE}
ccache -p || true
ccache -s || true

Expand All @@ -476,19 +489,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref_name }}

- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
JOB_CONTEXT: ${{ toJSON(job) }}
ENV_CONTEXT: ${{ toJSON(env) }}
run: |
echo "$GITHUB_CONTEXT"
echo "--------------------------"
echo "$JOB_CONTEXT"
echo "--------------------------"
echo "$ENV_CONTEXT"
path: "src"

- name: Print debug info
run: 'printf "%s@%s\\n" "$(whoami)" "$(hostname)";
Expand All @@ -499,7 +500,7 @@ jobs:
if: ${{ ( github.event_name != 'schedule' || matrix.is_special) && github.event_name != 'workflow_dispatch' && matrix.overrides != NaN }}
env:
OVERRIDES: ${{ join( matrix.overrides, ' ') }}
CONFIGFILE: '.github/workflows/root-ci-config/buildconfig/${{ matrix.image }}.txt'
CONFIGFILE: 'buildconfig_overrides.txt'
shell: bash
run: |
set -x
Expand Down Expand Up @@ -530,7 +531,7 @@ jobs:
INCREMENTAL: ${{ !contains(github.event.pull_request.labels.*.name, 'clean build') }}
GITHUB_PR_ORIGIN: ${{ github.event.pull_request.head.repo.clone_url }}
CMAKE_GENERATOR: ${{ matrix.cmake_generator }}
run: ".github/workflows/root-ci-config/build_root.py
run: "${SRC_DIR}/.github/workflows/root-ci-config/build_root.py
--buildtype RelWithDebInfo
--platform ${{ matrix.image }}
--dockeropts \"$CONTAINER_OPTIONS\"
Expand Down Expand Up @@ -597,16 +598,17 @@ jobs:
ccache -s || true

- name: Install
run: "cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.INSTALL_DIR }}"
run: "cmake --install ${BUILD_DIR} --prefix ${INSTALL_DIR}"

- name: Build post-install test project
run: |
cmake -S test/PostInstall/ -B ${{ env.POST_INSTALL_DIR }} -DCMAKE_PREFIX_PATH=${{ env.INSTALL_DIR }};
cmake --build ${{ env.POST_INSTALL_DIR }};
cmake -S test/PostInstall/ -B ${POST_INSTALL_DIR} -DCMAKE_PREFIX_PATH=${INSTALL_DIR};
cmake --build ${POST_INSTALL_DIR};

- name: CTest in post-install test project
working-directory: ${{ env.POST_INSTALL_DIR }}
run: ctest -j $(nproc)
run: |
cd ${POST_INSTALL_DIR}
test -j $(nproc)

event_file:
# For any event that is not a PR, the CI will always run. In PRs, the CI
Expand Down
1 change: 1 addition & 0 deletions roofit/roofit/src/RooGaussian.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ RooGaussian::RooGaussian(const RooGaussian& other, const char* name) :

double RooGaussian::evaluate() const
{

return RooFit::Detail::MathFuncs::gaussian(x, mean, sigma);
}

Expand Down
Loading