diff --git a/.github/workflows/root-ci-config/build_root.py b/.github/workflows/root-ci-config/build_root.py index e3c2e0e18c34e..ff7761f5d06dd 100755 --- a/.github/workflows/root-ci-config/build_root.py +++ b/.github/workflows/root-ci-config/build_root.py @@ -318,7 +318,7 @@ def run_ctest(extra_ctest_flags: str) -> int: builddir = os.path.join(WORKDIR, "build") ctest_result = subprocess_with_log(f""" cd '{builddir}' - ctest --output-on-failure --parallel {os.cpu_count()} --output-junit TestResults.xml {extra_ctest_flags} + ctest -R "roottest-root-hist-h2root" --output-on-failure --parallel {os.cpu_count()} --output-junit TestResults.xml {extra_ctest_flags} """) return ctest_result diff --git a/.github/workflows/root-ci-config/buildconfig/mac13.txt b/.github/workflows/root-ci-config/buildconfig/mac13.txt index f1206b5371ce9..ca7b20ae43bee 100644 --- a/.github/workflows/root-ci-config/buildconfig/mac13.txt +++ b/.github/workflows/root-ci-config/buildconfig/mac13.txt @@ -1,3 +1,4 @@ +CMAKE_BUILD_RPATH=/usr/local/lib asimage_tiff=OFF builtin_cfitsio=ON builtin_cppzmq=ON @@ -27,7 +28,6 @@ builtin_zeromq=ON builtin_zstd=ON ccache=ON cocoa=ON -fortran=OFF minuit2_omp=OFF pythia8=OFF test_distrdf_dask=ON diff --git a/.github/workflows/root-ci-config/buildconfig/mac14.txt b/.github/workflows/root-ci-config/buildconfig/mac14.txt index a43856231ec74..a4fb57f2322ac 100644 --- a/.github/workflows/root-ci-config/buildconfig/mac14.txt +++ b/.github/workflows/root-ci-config/buildconfig/mac14.txt @@ -1,3 +1,4 @@ +CMAKE_BUILD_RPATH=/usr/local/lib asimage_tiff=OFF builtin_cfitsio=ON builtin_cppzmq=ON @@ -27,7 +28,6 @@ builtin_zeromq=ON builtin_zstd=ON ccache=ON cocoa=ON -fortran=OFF minuit2_omp=OFF pythia8=OFF test_distrdf_dask=OFF diff --git a/.github/workflows/root-ci.yml b/.github/workflows/root-ci.yml index ea2044a218c62..6a515aebac2ab 100644 --- a/.github/workflows/root-ci.yml +++ b/.github/workflows/root-ci.yml @@ -220,353 +220,6 @@ jobs: path: /Users/sftnight/ROOT-CI/packages/root_v* if-no-files-found: error - - 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]'))) - - permissions: - contents: read - - strategy: - fail-fast: false - matrix: - # We have to get a bit creative here: GitHub actions only allows to - # exclude partial matches, so we artificially add the event_name as - # a "constant variable" that we can use to remove the Debug entries - # for pull requests and on branch pushes. This is further complicated - # by the fact that event_name is a string, but we need an array. So - # we construct a JSON string that we can then convert into an array. - event_name: ${{ fromJSON(format('["{0}"]', github.event_name)) }} - config: ["RelWithDebInfo", "Release"] - target_arch: [x64, x86] - exclude: - - event_name: pull_request - config: RelWithDebInfo - - event_name: push - config: RelWithDebInfo - # This is this platform is subject to timeouts when building from - # scratch. - #- target_arch: x86 - # config: RelWithDebInfo - - name: Windows 10 ${{ matrix.target_arch }} ${{ matrix.config }} - - runs-on: # Using '[self-hosted, windows, ${{ matrix.arch }}]' does not work for some reason :) - - self-hosted - - windows - - x64 # machine host, not build target - - target${{ matrix.target_arch }} - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ inputs.ref_name }} - - - name: Pull Request Build - if: github.event_name == 'pull_request' - env: - 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 }} && - python .github/workflows/root-ci-config/build_root.py - --buildtype ${{ matrix.config }} - --platform windows10 - --incremental $INCREMENTAL - --base_ref ${{ github.base_ref }} - --sha ${{ github.sha }} - --pull_repository ${{ github.event.pull_request.head.repo.clone_url }} - --head_ref refs/pull/${{ github.event.pull_request.number }}/head:${{ github.event.pull_request.head.ref }} - --head_sha ${{ github.event.pull_request.head.sha }} - --repository ${{ github.server_url }}/${{ github.repository }} - --architecture ${{ matrix.target_arch }}" - - - name: Workflow dispatch/call - if: github.event_name == 'workflow_dispatch' - shell: cmd - run: "C:\\setenv.bat ${{ matrix.target_arch }} && - python .github/workflows/root-ci-config/build_root.py - --buildtype ${{ matrix.config }} - --platform windows10 - --incremental ${{ inputs.incremental }} - --base_ref ${{ inputs.base_ref }} - --head_ref ${{ inputs.head_ref }} - --binaries ${{ inputs.binaries }} - --repository ${{ github.server_url }}/${{ github.repository }} - --architecture ${{ matrix.target_arch }}" - - - name: Nightly build - if: github.event_name == 'schedule' - shell: cmd - run: "C:\\setenv.bat ${{ matrix.target_arch }} && - python .github/workflows/root-ci-config/build_root.py - --buildtype ${{ matrix.config }} - --platform windows10 - --incremental false - --binaries true - --base_ref ${{ inputs.ref_name }} - --repository ${{ github.server_url }}/${{ github.repository }} - --architecture ${{ matrix.target_arch }}" - - - name: Update build cache after push to release branch - if: github.event_name == 'push' - shell: cmd - run: "C:\\setenv.bat ${{ matrix.target_arch }} && - python .github/workflows/root-ci-config/build_root.py - --buildtype ${{ matrix.config }} - --platform windows10 - --incremental false - --base_ref ${{ github.ref_name }} - --binaries ${{ startsWith(github.ref, 'refs/tags/') }} - --repository ${{ github.server_url }}/${{ github.repository }} - --architecture ${{ matrix.target_arch }}" - - - name: Upload test results - if: ${{ !cancelled() }} - uses: actions/upload-artifact@v4 - with: - name: Test Results Windows ${{ matrix.target_arch }} ${{ matrix.config }} - path: C:/ROOT-CI/build/TestResults.xml - - - name: Upload binaries - if: ${{ !cancelled() && (inputs.binaries || github.event_name == 'schedule' || startsWith(github.ref, 'refs/tags/')) }} - uses: actions/upload-artifact@v4 - with: - name: Binaries ${{ matrix.target_arch }} ${{ matrix.config }} - path: C:/ROOT-CI/packages/root_v* - if-no-files-found: error - - - build-linux: - # 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]'))) - - permissions: - contents: read - - strategy: - fail-fast: false - matrix: - # Specify image + (optional) build option overrides - # - # Available images: https://github.com/root-project/root-ci-images - # Common configs: {Release,Debug,RelWithDebInfo) - # Build options: https://root.cern/install/build_from_source/#all-build-options - include: - - image: fedora41 - - 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", "CMAKE_CXX_FLAGS=-Wsuggest-override"] - - 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: debian125 - overrides: ["CMAKE_CXX_STANDARD=20", "dev=ON"] - # 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: alma9-clang - is_special: true - property: "clang Ninja" - overrides: ["CMAKE_C_COMPILER=clang", "CMAKE_CXX_COMPILER=clang++"] - cmake_generator: Ninja - # Disable GPU builds until the DNS problem is solved - # - image: ubuntu2404-cuda - # is_special: true - # property: gpu - # extra-runs-on: gpu - - runs-on: - - self-hosted - - linux - - ${{ matrix.architecture == null && 'x64' || matrix.architecture }} - - ${{ matrix.extra-runs-on == null && 'cpu' || matrix.extra-runs-on }} - - name: | - ${{ matrix.image }} ${{ matrix.property }} - ${{ (github.event_name != 'schedule' && github.event_name != 'workflow_dispatch' && join( matrix.overrides, ', ' )) || '' }} - - container: - image: registry.cern.ch/root-ci/${{ matrix.image }}:buildready # KEEP IN SYNC WITH env key below - options: --security-opt label=disable --rm ${{ matrix.property == 'gpu' && '--device nvidia.com/gpu=all' || '' }} # KEEP IN SYNC WITH env key below - volumes: - - ${{ matrix.image }}_ccache_volume:/github/home/.cache/ccache - env: - 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 - - steps: - - name: Configure large ccache - if: ${{ matrix.is_special }} - run: | - ccache -o max_size=5G - ccache -p || true - ccache -s || true - - - name: Configure small ccache - if: ${{ !matrix.is_special }} - run: | - ccache -o max_size=1.5G - ccache -p || true - ccache -s || true - - - name: Set up Python Virtual Env - # if the `if` expr is false, `if` still has exit code 0. - # if the `if` block is entered, the block's exit code becomes the exit - # code of the `if`. - run: 'if [ -d /py-venv/ROOT-CI/bin/ ]; then . /py-venv/ROOT-CI/bin/activate && echo PATH=$PATH >> $GITHUB_ENV; fi' - - - 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" - - - name: Print debug info - run: 'printf "%s@%s\\n" "$(whoami)" "$(hostname)"; - ls -la - ' - - - name: Apply option overrides from matrix for this job for all builds except non-special nightlies and releases - 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' - shell: bash - run: | - set -x - - echo '' >> "$CONFIGFILE" - - for ENTRY in $GLOBAL_OVERRIDES $OVERRIDES; do - KEY=$( echo "$ENTRY" | cut -d '=' -f 1 ) - - # Add entry to file if not exists, otherwise replace - - if grep -q "$KEY=" "$CONFIGFILE"; then - sed -i "s/$KEY=.*\$/$ENTRY/" "$CONFIGFILE" - else - echo "$ENTRY" >> "$CONFIGFILE" - fi - done - - cat "$CONFIGFILE" || true - - - uses: root-project/gcc-problem-matcher-improved@main - with: - build-directory: /github/home/ROOT-CI/src/ - - - name: Pull Request Build - if: ${{ github.event_name == 'pull_request' }} - env: - 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 - --buildtype RelWithDebInfo - --platform ${{ matrix.image }} - --dockeropts \"$CONTAINER_OPTIONS\" - --incremental $INCREMENTAL - --base_ref ${{ github.base_ref }} - --sha ${{ github.sha }} - --pull_repository ${{ github.event.pull_request.head.repo.clone_url }} - --head_ref refs/pull/${{ github.event.pull_request.number }}/head:${{ github.event.pull_request.head.ref }} - --head_sha ${{ github.event.pull_request.head.sha }} - --repository ${{ github.server_url }}/${{ github.repository }} - " - - - name: Workflow dispatch - if: ${{ github.event_name == 'workflow_dispatch' && !matrix.is_special }} - run: ".github/workflows/root-ci-config/build_root.py - --buildtype ${{ inputs.buildtype }} - --platform ${{ matrix.image }} - --incremental ${{ inputs.incremental }} - --base_ref ${{ inputs.base_ref }} - --head_ref ${{ inputs.head_ref }} - --binaries ${{ inputs.binaries }} - --repository ${{ github.server_url }}/${{ github.repository }} - " - - - name: Nightly build - if: github.event_name == 'schedule' - run: ".github/workflows/root-ci-config/build_root.py - --buildtype Release - --platform ${{ matrix.image }} - --incremental false - --binaries true - --base_ref ${{ inputs.ref_name }} - --repository ${{ github.server_url }}/${{ github.repository }} - " - - - name: Update build cache after push to release branch - if: github.event_name == 'push' - run: ".github/workflows/root-ci-config/build_root.py - --buildtype RelWithDebInfo - --platform ${{ matrix.image }} - --incremental false - --base_ref ${{ github.ref_name }} - --binaries ${{ startsWith(github.ref, 'refs/tags/') }} - --repository ${{ github.server_url }}/${{ github.repository }} - " - - - name: Upload test results - if: ${{ !cancelled() }} - uses: actions/upload-artifact@v4 - with: - name: Test Results ${{ matrix.image }} ${{ matrix.property }} - path: /github/home/ROOT-CI/build/TestResults.xml - - - name: Upload binaries - if: ${{ !cancelled() && (inputs.binaries || github.event_name == 'schedule' || startsWith(github.ref, 'refs/tags/')) }} - uses: actions/upload-artifact@v4 - with: - name: Binaries ${{ matrix.image }} ${{ matrix.property }} - path: /github/home/ROOT-CI/packages/root_v* - if-no-files-found: error - - - name: ccache info (post) - run: | - ccache -s || true - event_file: # 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. diff --git a/misc/minicern/CMakeLists.txt b/misc/minicern/CMakeLists.txt index 66542f68ce3cb..ae784e32497fc 100644 --- a/misc/minicern/CMakeLists.txt +++ b/misc/minicern/CMakeLists.txt @@ -15,6 +15,6 @@ target_link_libraries(minicern ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}) # Disable optimization since it some cases was causing crashes. # Disable warnings, since what has worked for 40 years... # (see https://sft.its.cern.ch/jira/browse/ROOT-9179 for the warnings) -set_target_properties(minicern PROPERTIES COMPILE_FLAGS "-O0 -w") +set_target_properties(minicern PROPERTIES COMPILE_FLAGS "-w") # set_target_properties(minicern PROPERTIES COMPILE_FLAGS "-fsanitize=undefined -fsanitize=address") # target_link_options(minicern BEFORE PUBLIC -fsanitize=undefined PUBLIC -fsanitize=address) diff --git a/misc/minicern/src/cernlib.c b/misc/minicern/src/cernlib.c index 98f7282ce6034..aec4de3cf1f8e 100644 --- a/misc/minicern/src/cernlib.c +++ b/misc/minicern/src/cernlib.c @@ -72,16 +72,20 @@ unsigned int lshift_(unsigned int *arg, int *len) void vxinvb_(int *ixv, int *n) { int limit, jloop; - int in; + int out; + unsigned char *n1, *n2; + n2 = (unsigned char *) &out; limit = *n; for (jloop = 0; jloop < limit; jloop++) { - in = ixv[jloop]; - ixv[jloop] = - ((in >> 24) & 0x000000ff) | - ((in >> 8) & 0x0000ff00) | - ((in << 8) & 0x00ff0000) | - ((in << 24) & 0xff000000); + n1 = (unsigned char *) &ixv[jloop]; + n2[0] = n1[3]; + n2[1] = n1[2]; + n2[2] = n1[1]; + n2[3] = n1[0]; + ixv[jloop] = out; + //printf("%x ", ixv[jloop]); } + //printf("\n"); return; } @@ -90,15 +94,20 @@ void vxinvb_(int *ixv, int *n) void vxinvc_ (int *iv, int *ixv, int *n) { int limit, jloop; - int in; + int out; + unsigned char *n1, *n2; + n2 = (unsigned char *) &out; limit = *n; for (jloop = 0; jloop < limit; jloop++) { - in = iv[jloop]; - ixv[jloop] = - ((in >> 24) & 0x000000ff) | - ((in >> 8) & 0x0000ff00) | - ((in << 8) & 0x00ff0000) | ((in << 24) & 0xff000000); + n1 = (unsigned char *) &iv[jloop]; + n2[0] = n1[3]; + n2[1] = n1[2]; + n2[2] = n1[1]; + n2[3] = n1[0]; + ixv[jloop] = out; + //printf("%x ", ixv[jloop]); } + //printf("\n"); return; } diff --git a/misc/minicern/src/hbook.f b/misc/minicern/src/hbook.f index 522c731686169..a061c108920c3 100644 --- a/misc/minicern/src/hbook.f +++ b/misc/minicern/src/hbook.f @@ -249,6 +249,9 @@ SUBROUTINE HROPEN(LUN,CHDIR,CFNAME,CHOPTT,LRECL,ISTAT) CHARACTER*(*) CFNAME,CHDIR,CHOPTT CHARACTER*8 CHOPT CHOPT=CHOPTT + DO 11 I=LEN(CHOPTT)+1,8 + CHOPT(I:I) = ' ' + 11 CONTINUE CALL CLTOU(CHOPT) DO 10 I=1,NCHTOP IF(CFNAME.EQ.HFNAME(I))THEN @@ -305,11 +308,13 @@ SUBROUTINE HRFILE(LUN,CHDIR,CHOPT) DIMENSION IOPT(6) EQUIVALENCE (IOPTN,IOPT(1)),(IOPTG,IOPT(2)),(IOPTQ,IOPT(3)) EQUIVALENCE (IOPTM,IOPT(4)),(IOPTO,IOPT(5)),(IOPTE,IOPT(6)) + print*, LUN,':',CHDIR,':',CHOPT IF(NCHTOP.GE.MXFILES)THEN print*, 'Too many open files','HRFILE',LUN GO TO 99 ENDIF CALL HUOPTC(CHOPT,'NGQMOE',IOPT) + print*, LUN,':',CHDIR,':',CHOPT IF(IOPTM.NE.0)IOPTG=1 IQUEST(1)=0 IF(IOPTG.EQ.0)THEN @@ -2018,6 +2023,7 @@ SUBROUTINE HCDIR(CHPATH,CHOPT) GO TO 99 ENDIF IQUEST(1)=0 + print*, 'HCDIR',CHPATH,':',CHOPT IF(CHPATH(1:1).EQ.'.')THEN CALL HPATH(' ') ELSE @@ -2460,6 +2466,9 @@ SUBROUTINE HUOPTC(CCHOPT,CSTR,IOPT) CHARACTER*12 CHOPT DIMENSION IOPT(1) CHOPT = CCHOPT + DO 12 I=LEN(CCHOPT)+1,12 + CHOPT(I:I) = ' ' + 12 CONTINUE CALL CLTOU(CHOPT) CALL UOPTC(CHOPT,CSTR,IOPT) RETURN