From 92e6d51bb33831a633c6074ddbe1fabe249fedf8 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Tue, 7 Jan 2025 10:16:46 +0100 Subject: [PATCH 1/4] Switch to central Key4hep workflow --- .github/workflows/key4hep.yml | 46 ++++++++++++++++------------------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/.github/workflows/key4hep.yml b/.github/workflows/key4hep.yml index bb4e45b..aaf8f75 100644 --- a/.github/workflows/key4hep.yml +++ b/.github/workflows/key4hep.yml @@ -1,31 +1,27 @@ -name: keyh4ep -on: [push, pull_request] +name: Key4hep build + +on: + push: + branches: + - master + pull_request: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: - build-and-test: - runs-on: ubuntu-latest + build: strategy: + matrix: + 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/sw-nightlies.hsf.org/key4hep - run: | - mkdir build - cd build - echo "::group::Run CMake" - cmake -GNinja \ - -DCMAKE_CXX_FLAGS=" -fdiagnostics-color=always " \ - -DCMAKE_CXX_STANDARD=17 \ - -DCMAKE_INSTALL_PREFIX=../install \ - .. - echo "::endgroup::" && echo "::group::Build" - ninja -k0 - echo "::endgroup::" && echo "::group::Run Tests" - ctest --output-on-failure - echo "::endgroup::" && echo "::group::Install" - ninja install + build_type: ${{ matrix.build_type }} + image: ${{ matrix.image }} From db99e3de88443d562c5e24caa652c35eb266e7ff Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Tue, 7 Jan 2025 10:20:00 +0100 Subject: [PATCH 2/4] Remove clicdp based nightlies for CI No longer really updated and things should be covered by Key4hep builds --- .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 d6dba42..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: [gcc10, clang11] - - 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/100/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" .. - ninja -k0 - ctest --output-on-failure - ninja install From 5bd272f0fcb315301bfc6327ca892677e1280a95 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Tue, 7 Jan 2025 10:28:37 +0100 Subject: [PATCH 3/4] Fix catch-value warning --- WWZZSeparation/processor/src/WWZZProcessor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WWZZSeparation/processor/src/WWZZProcessor.cc b/WWZZSeparation/processor/src/WWZZProcessor.cc index aa09d95..25ac070 100644 --- a/WWZZSeparation/processor/src/WWZZProcessor.cc +++ b/WWZZSeparation/processor/src/WWZZProcessor.cc @@ -124,7 +124,7 @@ void WWZZProcessor::processEvent( LCEvent * evt ) { try{ colIsoleps = evt->getCollection( _colIsoleps ); } - catch( lcio::DataNotAvailableException e ) + catch( lcio::DataNotAvailableException& e ) { streamlog_out(WARNING) << _colIsoleps << " collection not available" << std::endl; colIsoleps = NULL; From ba87d41935ab9e21cee8d9a464f4e20276ddbb74 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Tue, 7 Jan 2025 10:29:09 +0100 Subject: [PATCH 4/4] Re-format macro to fix warning This reformatting keeps the existing behavior, but I don't think this was the intended behavior (judging by how the macro is used). --- tracking/src/DDDiagnostics.cc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tracking/src/DDDiagnostics.cc b/tracking/src/DDDiagnostics.cc index 84baad1..634d336 100644 --- a/tracking/src/DDDiagnostics.cc +++ b/tracking/src/DDDiagnostics.cc @@ -17,12 +17,15 @@ struct invWSort { // sort track segments wtr to higher inverse relative weight //====================================================================================================== // -#define APPLY_CUT( LEVEL, Cut, Exp ) if( (Exp) == false ) { if ( Cut ) \ - streamlog_out( LEVEL ) << " ***** failed cut: [ " << #Exp \ - << " ] in evt: " << evt->getEventNumber() \ - << " run: " << evt->getRunNumber() << std::endl ; \ - Cut = false ; } - +#define APPLY_CUT(LEVEL, Cut, Exp) \ + if ((Exp) == false) { \ + if (Cut) { \ + streamlog_out(LEVEL) << " ***** failed cut: [ " << #Exp \ + << " ] in evt: " << evt->getEventNumber() \ + << " run: " << evt->getRunNumber() << std::endl; \ + } \ + Cut = false; \ + } //====================================================================================================== DDDiagnostics aDDDiagnostics ;