From 8d7e9013c4d6db04373e6bf626868c101b4d94c6 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Sun, 5 Nov 2023 18:48:46 +0100 Subject: [PATCH 01/16] Add a BUILD_INTERFACE and INSTALL_INTERFACE for edm4hep --- CMakeLists.txt | 5 ----- edm4hep/CMakeLists.txt | 7 +++++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d2e5c2ee2..ab341ae5f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,11 +104,6 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/NOTICE DESTINATION ${CMAKE_INSTALL_DOCDIR}) - -install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/edm4hep/ - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/edm4hep - FILES_MATCHING PATTERN "*.h") - find_package(nlohmann_json 3.10.5) add_subdirectory(edm4hep) diff --git a/edm4hep/CMakeLists.txt b/edm4hep/CMakeLists.txt index 1f91f0b17..2283287e5 100644 --- a/edm4hep/CMakeLists.txt +++ b/edm4hep/CMakeLists.txt @@ -7,6 +7,12 @@ PODIO_ADD_DATAMODEL_CORE_LIB(edm4hep "${headers}" "${sources}") add_library(EDM4HEP::edm4hep ALIAS edm4hep) set_target_properties(edm4hep PROPERTIES ALIAS_GLOBAL true) +file(GLOB_RECURSE top_headers ${PROJECT_SOURCE_DIR}/include/*.h) +target_sources(edm4hep PUBLIC FILE_SET headers TYPE HEADERS BASE_DIRS ${PROJECT_SOURCE_DIR}/include FILES ${top_headers}) +target_include_directories(edm4hep PUBLIC + $ + $) + if (nlohmann_json_FOUND) target_compile_definitions(edm4hep PUBLIC PODIO_JSON_OUTPUT) target_link_libraries(edm4hep PUBLIC nlohmann_json::nlohmann_json) @@ -29,6 +35,7 @@ install(TARGETS ${EDM4HEP_INSTALL_LIBS} RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/edm4hep" + FILE_SET headers DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" COMPONENT dev) install(FILES From 99fc5d5787b5351df920efe5247782d4a9a2d767 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Sun, 5 Nov 2023 18:49:19 +0100 Subject: [PATCH 02/16] Simplify cmake --- CMakeLists.txt | 7 ------- edm4hep/CMakeLists.txt | 5 +---- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ab341ae5f..4fd3636e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,14 +9,7 @@ SET( ${PROJECT_NAME}_VERSION_PATCH 1 ) SET( ${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}" ) - -#--- Run the podio class generator and link library ------- - find_package(podio REQUIRED HINTS $ENV{PODIO}) - -#--- Declare ROOT dependency --------------------------------------------------- -list(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS}) -set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) find_package(ROOT REQUIRED COMPONENTS RIO Tree Physics) #--- Define basic build settings ----------------------------------------------- diff --git a/edm4hep/CMakeLists.txt b/edm4hep/CMakeLists.txt index 2283287e5..eec88e4e5 100644 --- a/edm4hep/CMakeLists.txt +++ b/edm4hep/CMakeLists.txt @@ -40,12 +40,9 @@ install(TARGETS ${EDM4HEP_INSTALL_LIBS} install(FILES "${PROJECT_BINARY_DIR}/edm4hep/edm4hepDictDict.rootmap" + "${PROJECT_BINARY_DIR}/edm4hep/libedm4hepDict_rdict.pcm" DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT dev) install(FILES ../edm4hep.yaml DESTINATION "${CMAKE_INSTALL_DATADIR}/edm4hep" COMPONENT dev) - -install(FILES - "${PROJECT_BINARY_DIR}/edm4hep/libedm4hepDict_rdict.pcm" - DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT dev) From 750dfcd1f06de492f72788a8873f7b09e62ba451 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Sun, 5 Nov 2023 19:03:22 +0100 Subject: [PATCH 03/16] Bump the minimum version --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4fd3636e1..05abdf9a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.16) +cmake_minimum_required(VERSION 3.23) project(EDM4HEP LANGUAGES CXX) From 2dd8314626fcea1b209d97988330500a1ad0148b Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Tue, 14 Nov 2023 09:16:51 +0100 Subject: [PATCH 04/16] Remove the centos7-clang12 workflow and bump to LCG_104 --- .github/workflows/lcg_linux_with_podio.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/lcg_linux_with_podio.yml b/.github/workflows/lcg_linux_with_podio.yml index d01a41684..e811fab2f 100644 --- a/.github/workflows/lcg_linux_with_podio.yml +++ b/.github/workflows/lcg_linux_with_podio.yml @@ -14,9 +14,7 @@ jobs: include: - LCG: "dev4/x86_64-centos7-gcc11-opt" CXX_STANDARD: 17 - - LCG: "LCG_102/x86_64-centos7-clang12-opt" - CXX_STANDARD: 17 - - LCG: "LCG_102/x86_64-centos8-gcc11-opt" + - LCG: "LCG_104/x86_64-centos8-gcc11-opt" CXX_STANDARD: 17 steps: - uses: actions/checkout@v3 From 6f3c00f10e60ed803d7ffd291a6204b4eaf2af19 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Tue, 14 Nov 2023 10:32:11 +0100 Subject: [PATCH 05/16] Change pre-commit to LCG_104 --- .github/workflows/pre-commit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 80d1c3e31..231d98584 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -10,7 +10,7 @@ jobs: - uses: cvmfs-contrib/github-action-cvmfs@v3 - uses: aidasoft/run-lcg-view@v4 with: - release-platform: LCG_99/x86_64-centos7-clang10-opt + release-platform: LCG_104/x86_64-centos7-gcc12-opt run: | STARTDIR=$(pwd) echo "::group::Build podio" From c7478ab7ff1b484f3280affd5d2ddfdb6d27828d Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Tue, 14 Nov 2023 13:35:26 +0100 Subject: [PATCH 06/16] Change image to use clang and remove target_include_directories --- .github/workflows/pre-commit.yml | 2 +- edm4hep/CMakeLists.txt | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 231d98584..58ed9d59e 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -10,7 +10,7 @@ jobs: - uses: cvmfs-contrib/github-action-cvmfs@v3 - uses: aidasoft/run-lcg-view@v4 with: - release-platform: LCG_104/x86_64-centos7-gcc12-opt + release-platform: LCG_103/x86_64-centos7-clang12-opt run: | STARTDIR=$(pwd) echo "::group::Build podio" diff --git a/edm4hep/CMakeLists.txt b/edm4hep/CMakeLists.txt index eec88e4e5..16b6c10d2 100644 --- a/edm4hep/CMakeLists.txt +++ b/edm4hep/CMakeLists.txt @@ -9,9 +9,6 @@ set_target_properties(edm4hep PROPERTIES ALIAS_GLOBAL true) file(GLOB_RECURSE top_headers ${PROJECT_SOURCE_DIR}/include/*.h) target_sources(edm4hep PUBLIC FILE_SET headers TYPE HEADERS BASE_DIRS ${PROJECT_SOURCE_DIR}/include FILES ${top_headers}) -target_include_directories(edm4hep PUBLIC - $ - $) if (nlohmann_json_FOUND) target_compile_definitions(edm4hep PUBLIC PODIO_JSON_OUTPUT) From 128783e848baebdb18e7d0511bd742a17a88c7d2 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Wed, 15 Nov 2023 08:57:50 +0100 Subject: [PATCH 07/16] Change to gcc for pre-commit --- .github/workflows/pre-commit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 58ed9d59e..231d98584 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -10,7 +10,7 @@ jobs: - uses: cvmfs-contrib/github-action-cvmfs@v3 - uses: aidasoft/run-lcg-view@v4 with: - release-platform: LCG_103/x86_64-centos7-clang12-opt + release-platform: LCG_104/x86_64-centos7-gcc12-opt run: | STARTDIR=$(pwd) echo "::group::Build podio" From 8dab425af57aad79387cc58d085e5fc8fa273f2a Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Wed, 15 Nov 2023 09:13:06 +0100 Subject: [PATCH 08/16] Change to clang15 --- .github/workflows/pre-commit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 231d98584..4dca24a4c 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -10,7 +10,7 @@ jobs: - uses: cvmfs-contrib/github-action-cvmfs@v3 - uses: aidasoft/run-lcg-view@v4 with: - release-platform: LCG_104/x86_64-centos7-gcc12-opt + release-platform: LCG_103/x86_64-centos7-clang15-opt run: | STARTDIR=$(pwd) echo "::group::Build podio" From 5a8dfe9b968655dfe7200b3ed2a5b5f26474835c Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Wed, 15 Nov 2023 11:39:48 +0100 Subject: [PATCH 09/16] Don't install pre-commit --- .github/workflows/pre-commit.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 4dca24a4c..abfa7464b 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -37,7 +37,6 @@ jobs: export PYTHONPATH=$(python -m site --user-site):$PYTHONPATH export PATH=/root/.local/bin:$PATH pip install argparse --user - pip install pre-commit --user mkdir build cd build cmake .. -DENABLE_SIO=ON \ From 22524dd4d061425f7fc3506a47f4635ee84aaf0f Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Wed, 15 Nov 2023 13:47:12 +0100 Subject: [PATCH 10/16] Try this --- .github/workflows/pre-commit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index abfa7464b..0ad738ed2 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -10,7 +10,7 @@ jobs: - uses: cvmfs-contrib/github-action-cvmfs@v3 - uses: aidasoft/run-lcg-view@v4 with: - release-platform: LCG_103/x86_64-centos7-clang15-opt + release-platform: LCG_104/x86_64-el9-clang16-opt run: | STARTDIR=$(pwd) echo "::group::Build podio" From 711e9d621f681e941d4ee2ca2bbf1ce779dd1d96 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Tue, 21 Nov 2023 08:46:52 +0100 Subject: [PATCH 11/16] Change to key4hep nightlies --- .github/workflows/pre-commit.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 0ad738ed2..0ef3bd6a3 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -10,7 +10,8 @@ jobs: - uses: cvmfs-contrib/github-action-cvmfs@v3 - uses: aidasoft/run-lcg-view@v4 with: - release-platform: LCG_104/x86_64-el9-clang16-opt + container: centos7 + view-path: /cvmfs/sw-nightlies.hsf.org/key4hep run: | STARTDIR=$(pwd) echo "::group::Build podio" From 35de38a009afef63d4233b5243eb9d6a2d81956d Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Tue, 5 Dec 2023 10:57:24 +0100 Subject: [PATCH 12/16] Change to alma9 --- .github/workflows/pre-commit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 0ef3bd6a3..65caf18e1 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -10,7 +10,7 @@ jobs: - uses: cvmfs-contrib/github-action-cvmfs@v3 - uses: aidasoft/run-lcg-view@v4 with: - container: centos7 + container: almalinux9 view-path: /cvmfs/sw-nightlies.hsf.org/key4hep run: | STARTDIR=$(pwd) From 47faf79559fa92a54ffd74467c9fe3b01867ca1a Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Tue, 5 Dec 2023 10:59:59 +0100 Subject: [PATCH 13/16] Use a key4hep image --- .github/workflows/pre-commit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 65caf18e1..a268d7325 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -10,7 +10,7 @@ jobs: - uses: cvmfs-contrib/github-action-cvmfs@v3 - uses: aidasoft/run-lcg-view@v4 with: - container: almalinux9 + container: ghcr.io/key4hep/key4hep-images/alma9 view-path: /cvmfs/sw-nightlies.hsf.org/key4hep run: | STARTDIR=$(pwd) From d4a2f7dc000a206b91e58798f0c1de93050654ba Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Tue, 5 Dec 2023 11:03:01 +0100 Subject: [PATCH 14/16] Go back to centos7 --- .github/workflows/pre-commit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index a268d7325..0ef3bd6a3 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -10,7 +10,7 @@ jobs: - uses: cvmfs-contrib/github-action-cvmfs@v3 - uses: aidasoft/run-lcg-view@v4 with: - container: ghcr.io/key4hep/key4hep-images/alma9 + container: centos7 view-path: /cvmfs/sw-nightlies.hsf.org/key4hep run: | STARTDIR=$(pwd) From 9e3844dd3a933154cf8dafc7e69a69f946ed1f03 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Tue, 5 Dec 2023 11:16:27 +0100 Subject: [PATCH 15/16] Try install pre-commit --- .github/workflows/pre-commit.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 0ef3bd6a3..e18409083 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -47,6 +47,7 @@ jobs: -DUSE_EXTERNAL_CATCH2=OFF ln -s $(pwd)/compile_commands.json ../ cd .. + pip install pre-commit --user pre-commit run --show-diff-on-failure \ --color=always \ --all-files From 79669d3610e3012206635cedbd796da3fb88c117 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Tue, 5 Dec 2023 11:29:19 +0100 Subject: [PATCH 16/16] Try with LCG_104 --- .github/workflows/pre-commit.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index e18409083..11ee0a715 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -10,8 +10,7 @@ jobs: - uses: cvmfs-contrib/github-action-cvmfs@v3 - uses: aidasoft/run-lcg-view@v4 with: - container: centos7 - view-path: /cvmfs/sw-nightlies.hsf.org/key4hep + release-platform: LCG_104/x86_64-el9-clang16-opt run: | STARTDIR=$(pwd) echo "::group::Build podio"