From 50937a095f78fe722999940bf19fce1921101a24 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Mon, 13 Jan 2025 09:35:01 +0100 Subject: [PATCH 1/4] Switch to central Key4hep build workflows --- .github/workflows/key4hep.yaml | 47 +++++++++++++++------------------- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/.github/workflows/key4hep.yaml b/.github/workflows/key4hep.yaml index 2aeaf77..aaf8f75 100644 --- a/.github/workflows/key4hep.yaml +++ b/.github/workflows/key4hep.yaml @@ -1,34 +1,27 @@ -name: key4hep +name: Key4hep build -on: [push, pull_request] +on: + push: + branches: + - master + pull_request: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: - linux: - runs-on: ubuntu-latest + build: strategy: - fail-fast: false matrix: - include: - - release: "sw.hsf.org/key4hep" - CXX_STANDARD: 17 - - release: "sw-nightlies.hsf.org/key4hep" - CXX_STANDARD: 20 + build_type: ["release", "nightly"] + image: ["alma9", "ubuntu22"] + fail-fast: false + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: cvmfs-contrib/github-action-cvmfs@v3 - - uses: aidasoft/run-lcg-view@v4 + - uses: actions/checkout@v4 + - uses: key4hep/key4hep-actions/key4hep-build@main with: - container: centos7 - view-path: /cvmfs/${{ matrix.release }} - run: | - mkdir build install - cd build - cmake -DCMAKE_CXX_STANDARD=${{ matrix.CXX_STANDARD }} \ - -DCMAKE_CXX_FLAGS="-fdiagnostics-color=always " \ - -DCMAKE_INSTALL_PREFIX=../install \ - -DINSTALL_DOC=ON \ - -GNinja \ - .. - ninja -k0 - ctest --output-on-failure - ninja install + build_type: ${{ matrix.build_type }} + image: ${{ matrix.image }} From 66e9e77f51c5e062cf98283f0164212abd923d4a Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Mon, 13 Jan 2025 09:36:17 +0100 Subject: [PATCH 2/4] Remove the clicdp nightlies based workflows --- .github/workflows/linux.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .github/workflows/linux.yml diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml deleted file mode 100644 index 46f04b4..0000000 --- a/.github/workflows/linux.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: linux -on: [push, pull_request] - -jobs: - centos7: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - COMPILER: [gcc11] - LCG: [104] - steps: - - uses: actions/checkout@v3 - - uses: cvmfs-contrib/github-action-cvmfs@v3 - - uses: aidasoft/run-lcg-view@v4 - with: - view-path: "/cvmfs/clicdp.cern.ch/iLCSoft/lcg/${{ matrix.LCG }}/nightly/x86_64-centos7-${{ matrix.COMPILER }}-opt" - setup-script: "init_ilcsoft.sh" - run: | - mkdir build - cd build - cmake -GNinja -C ${ILCSOFT}/ILCSoft.cmake -DCMAKE_CXX_FLAGS=" -fdiagnostics-color=always " -DINSTALL_DOC=ON .. - ninja -k0 - ctest --output-on-failure - ninja install From 6aba39bac2795e8cec22f2b77b94351704463520 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Mon, 13 Jan 2025 09:37:20 +0100 Subject: [PATCH 3/4] Update README batch --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e1fa4aa..891515f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # GEAR -[![linux](https://github.com/iLCSoft/GEAR/actions/workflows/linux.yml/badge.svg)](https://github.com/iLCSoft/GEAR/actions/workflows/linux.yml) +[![Key4hep build](https://github.com/iLCSoft/GEAR/actions/workflows/key4hep.yml/badge.svg?branch=master)](https://github.com/iLCSoft/GEAR/actions/workflows/key4hep.yml) [![Coverity Scan Build Status](https://scan.coverity.com/projects/12369/badge.svg)](https://scan.coverity.com/projects/ilcsoft-gear) GEAR: GEometry Api for Reconstruction From 486ebcd52f0c8ec21195ed4cbfed0cddb785fc2d Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Mon, 13 Jan 2025 09:39:51 +0100 Subject: [PATCH 4/4] Fix warnings to build warning free --- src/gearimpl/TPCModuleImpl.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gearimpl/TPCModuleImpl.cc b/src/gearimpl/TPCModuleImpl.cc index 8faca1e..0c07290 100644 --- a/src/gearimpl/TPCModuleImpl.cc +++ b/src/gearimpl/TPCModuleImpl.cc @@ -4,6 +4,7 @@ #include #include #include +#include namespace gear { /* Transforms a point from the global coordinates to Layout2D coordinates.*/ @@ -464,7 +465,8 @@ namespace gear { // first check if the two origins are identical (to avoid divide by zero) if (_offset[0]==0) // r is 0, no offset { - double phiMin, phiMax; + double phiMin = std::numeric_limits::max(); + double phiMax = std::numeric_limits::min(); if ( _zPosition > 0 ) { @@ -649,7 +651,8 @@ namespace gear { // phiMin and phiMax - double phiMin, phiMax; + double phiMin = std::numeric_limits::max(); + double phiMax = std::numeric_limits::min(); // r > rMax // If the global origin is outside of local rMax, the tangents on the rMax-circle are