Skip to content

Commit

Permalink
Merge branch 'main' into docs/release
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Jul 8, 2022
2 parents 2c42e70 + 0955220 commit 66cbfa0
Show file tree
Hide file tree
Showing 50 changed files with 2,111 additions and 77 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ env:
jobs:
build_debug:
runs-on: ubuntu-latest
container: ghcr.io/acts-project/ubuntu2004:v22
container: ghcr.io/acts-project/ubuntu2004:v26
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:

build_performance:
runs-on: ubuntu-latest
container: ghcr.io/acts-project/ubuntu2004:v22
container: ghcr.io/acts-project/ubuntu2004:v26
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
Expand Down
32 changes: 15 additions & 17 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:
jobs:
lcg:
runs-on: ubuntu-latest
container: ghcr.io/acts-project/${{ matrix.image }}:v22
container: ghcr.io/acts-project/${{ matrix.image }}:v26
strategy:
matrix:
image:
Expand Down Expand Up @@ -91,10 +91,9 @@ jobs:
- name: Downstream run
run: ${SETUP} && ./build-downstream/bin/ShowActsVersion


linux_ubuntu:
runs-on: ubuntu-latest
container: ghcr.io/acts-project/ubuntu2004:v22
container: ghcr.io/acts-project/ubuntu2004:v26
env:
INSTALL_DIR: ${{ github.workspace }}/install
ACTS_LOG_FAILURE_THRESHOLD: WARNING
Expand All @@ -115,7 +114,6 @@ jobs:
restore-keys: |
${{ runner.os }}-ccache-linux_ubuntu_${{ env.CCACHE_KEY_SUFFIX }}_
- name: Configure
# setting CMAKE_CXX_STANDARD=17 is a workaround for a bug in the
# dd4hep CMake configuration that gets triggered on recent CMake
Expand All @@ -132,6 +130,7 @@ jobs:
-DACTS_BUILD_EVERYTHING=ON
-DACTS_BUILD_ODD=ON
-DACTS_BUILD_EXAMPLES_PYTHON_BINDINGS=ON
-DACTS_BUILD_EXAMPLES_EDM4HEP=ON
-DACTS_FORCE_ASSERTIONS=ON
-DACTS_BUILD_ANALYSIS_APPS=ON
Expand Down Expand Up @@ -172,9 +171,8 @@ jobs:

linux_examples_test:
runs-on: ubuntu-latest
container: ghcr.io/acts-project/ubuntu2004:v22
container: ghcr.io/acts-project/ubuntu2004:v26
needs: [linux_ubuntu]

steps:
- name: Install git lfs
run: apt-get install -y git-lfs
Expand Down Expand Up @@ -206,11 +204,11 @@ jobs:
&& source build/python/setup.sh
&& export LD_LIBRARY_PATH=$PWD/build/thirdparty/OpenDataDetector/factory:$LD_LIBRARY_PATH
&& pip3 install -r Examples/Python/tests/requirements.txt
&& pytest -rFs
&& pytest -rFsv
linux_physmon:
runs-on: ubuntu-latest
container: ghcr.io/acts-project/ubuntu2004:v22
container: ghcr.io/acts-project/ubuntu2004:v26
needs: [linux_ubuntu]

steps:
Expand Down Expand Up @@ -285,7 +283,6 @@ jobs:
restore-keys: |
${{ runner.os }}-ccache-linux-nodeps_${{ env.CCACHE_KEY_SUFFIX }}_
- name: Configure
run: >
cmake -B build -S .
Expand Down Expand Up @@ -373,7 +370,6 @@ jobs:
restore-keys: |
${{ runner.os }}-ccache_${{ env.CCACHE_KEY_SUFFIX }}_
- name: Configure
# setting CMAKE_CXX_STANDARD=17 is a workaround for a bug in the
# dd4hep CMake configuration that gets triggered on recent CMake
Expand All @@ -391,6 +387,7 @@ jobs:
-DACTS_BUILD_ODD=ON
-DACTS_LOG_FAILURE_THRESHOLD=WARNING
-DACTS_FORCE_ASSERTIONS=ON
-DACTS_BUILD_EXAMPLES_EDM4HEP=ON
- name: Build
run: cmake --build build --
- name: Unit tests
Expand All @@ -415,9 +412,10 @@ jobs:
run: cmake --build build-downstream --
- name: Downstream run
run: ./build-downstream/bin/ShowActsVersion

cuda:
runs-on: ubuntu-latest
container: ghcr.io/acts-project/ubuntu1804_cuda:v22
container: ghcr.io/acts-project/ubuntu1804_cuda:v26
steps:
- uses: actions/checkout@v2

Expand All @@ -429,7 +427,6 @@ jobs:
restore-keys: |
${{ runner.os }}-ccache-cuda_${{ env.CCACHE_KEY_SUFFIX }}_
- name: Configure
run: >
cmake -B build -S .
Expand All @@ -442,9 +439,10 @@ jobs:
-DACTS_BUILD_UNITTESTS=ON
- name: Build
run: cmake --build build --

exatrkx:
runs-on: ubuntu-latest
container: ghcr.io/acts-project/ubuntu2004_exatrkx:v22
container: ghcr.io/acts-project/ubuntu2004_exatrkx:v26
steps:
- uses: actions/checkout@v2

Expand All @@ -456,7 +454,6 @@ jobs:
restore-keys: |
${{ runner.os }}-ccache-exatrkx_${{ env.CCACHE_KEY_SUFFIX }}_
- name: Configure
run: >
cmake -B build -S .
Expand All @@ -469,9 +466,10 @@ jobs:
-DACTS_BUILD_EXAMPLES_PYTHON_BINDINGS=ON
- name: Build
run: cmake --build build --

sycl:
runs-on: ubuntu-latest
container: ghcr.io/acts-project/ubuntu2004_oneapi:v22
container: ghcr.io/acts-project/ubuntu2004_oneapi:v26
defaults:
run:
shell: bash
Expand All @@ -486,7 +484,6 @@ jobs:
restore-keys: |
${{ runner.os }}-ccache-sycl_${{ env.CCACHE_KEY_SUFFIX }}_
- name: Configure
run: >
source /opt/intel/oneapi/setvars.sh
Expand All @@ -503,9 +500,10 @@ jobs:
run: >
source /opt/intel/oneapi/setvars.sh
&& cmake --build build --
docs:
runs-on: ubuntu-latest
container: ghcr.io/acts-project/ubuntu2004:v22
container: ghcr.io/acts-project/ubuntu2004:v26
env:
DOXYGEN_WARN_AS_ERROR: YES
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
format:
runs-on: ubuntu-latest
container: ghcr.io/acts-project/format10:v22
container: ghcr.io/acts-project/format10:v26
steps:
- uses: actions/checkout@v3
- name: Check
Expand Down
8 changes: 3 additions & 5 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
clang_tidy:
stage: build
image: ghcr.io/acts-project/ubuntu2004:v21
image: ghcr.io/acts-project/ubuntu2004:v26
artifacts:
paths:
- src/clang-tidy/
Expand Down Expand Up @@ -37,7 +37,7 @@ clang_tidy:

build:
stage: build
image: ghcr.io/acts-project/ubuntu2004_exatrkx:v22
image: ghcr.io/acts-project/ubuntu2004_exatrkx:v26
tags:
- docker
variables:
Expand Down Expand Up @@ -82,12 +82,11 @@ build:
-DACTS_BUILD_EXAMPLES_PYTHON_BINDINGS=ON
- cmake --build build --


test:
stage: test
dependencies:
- build
image: ghcr.io/acts-project/ubuntu2004_exatrkx:v23
image: ghcr.io/acts-project/ubuntu2004_exatrkx:v26
tags:
- docker-gpu-nvidia
script:
Expand All @@ -98,4 +97,3 @@ test:
- source build/python/setup.sh
- nvidia-smi
- python3 src/Examples/Scripts/Python/exatrkx.py

10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ option(ACTS_BUILD_ALIGNMENT "Build Alignment package" OFF)
# examples related options
option(ACTS_BUILD_EXAMPLES "Build standalone examples" OFF)
option(ACTS_BUILD_EXAMPLES_DD4HEP "Build DD4hep-based code in the examples" OFF)
option(ACTS_BUILD_EXAMPLES_EDM4HEP "Build EDM4hep-based code in the examples" OFF)
option(ACTS_BUILD_EXAMPLES_EXATRKX "Build the Exa.TrkX example code" OFF)
option(ACTS_BUILD_EXAMPLES_GEANT4 "Build Geant4-based code in the examples" OFF)
option(ACTS_BUILD_EXAMPLES_HEPMC3 "Build HepMC3-based code in the examples" OFF)
Expand Down Expand Up @@ -94,6 +95,7 @@ set_option_if(ACTS_BUILD_ALIGNMENT ACTS_BUILD_EVERYTHING)
set_option_if(
ACTS_BUILD_EXAMPLES
ACTS_BUILD_EXAMPLES_DD4HEP
OR ACTS_BUILD_EXAMPLES_EDM4HEP
OR ACTS_BUILD_EXAMPLES_GEANT4
OR ACTS_BUILD_EXAMPLES_HEPMC3
OR ACTS_BUILD_EXAMPLES_PYTHIA8
Expand All @@ -102,7 +104,8 @@ set_option_if(
# core plugins might be required by examples or depend on each other
set_option_if(
ACTS_BUILD_PLUGIN_DD4HEP
ACTS_BUILD_EXAMPLES_DD4HEP OR ACTS_BUILD_EVERYTHING)
ACTS_BUILD_EXAMPLES_DD4HEP OR ACTS_BUILD_EVERYTHING OR
ACTS_BUILD_EXAMPLES_EDM4HEP)
set_option_if(
ACTS_BUILD_PLUGIN_TGEO
ACTS_BUILD_PLUGIN_DD4HEP OR ACTS_BUILD_EXAMPLES OR ACTS_BUILD_EVERYTHING)
Expand Down Expand Up @@ -156,6 +159,7 @@ set(_acts_autodiff_version 0.6)
set(_acts_boost_version 1.71.0)
set(_acts_dd4hep_version 1.11)
set(_acts_actsdd4hep_version 1.0.0)
set(_acts_edm4hep_version v00-04-01)
set(_acts_doxygen_version 1.8.15)
set(_acts_eigen3_version 3.3.7)
set(_acts_hepmc3_version 3.2.1)
Expand Down Expand Up @@ -249,7 +253,6 @@ if(ACTS_BUILD_PLUGIN_DD4HEP)
else()
add_subdirectory(thirdparty/actsdd4hep)
endif()

endif()
if(ACTS_BUILD_PLUGIN_JSON)
if(ACTS_USE_SYSTEM_NLOHMANN_JSON)
Expand Down Expand Up @@ -300,6 +303,9 @@ if(ACTS_BUILD_EXAMPLES_DD4HEP AND ACTS_BUILD_EXAMPLES_GEANT4)
elseif(ACTS_BUILD_EXAMPLES_DD4HEP)
find_package(DD4hep ${_acts_dd4hep_version} REQUIRED CONFIG COMPONENTS DDCore DDDetectors)
endif()
if(ACTS_BUILD_EXAMPLES_EDM4HEP)
find_package(EDM4HEP REQUIRED CONFIG)
endif()
if(ACTS_BUILD_EXAMPLES_GEANT4)
find_package(Geant4 REQUIRED CONFIG COMPONENTS gdml)
endif()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,23 @@
#include <memory>
#include <vector>

struct DD4hepDetector : public ActsExamples::IBaseDetector {
namespace ActsExamples {
namespace DD4hep {

struct DD4hepDetector : public IBaseDetector {
std::shared_ptr<DD4hepGeometryService> geometryService;

void addOptions(
boost::program_options::options_description& opt) const override;

std::pair<ActsExamples::IBaseDetector::TrackingGeometryPtr, ContextDecorators>
finalize(const boost::program_options::variables_map& vm,
std::shared_ptr<const Acts::IMaterialDecorator> mdecorator) override;
std::pair<IBaseDetector::TrackingGeometryPtr, ContextDecorators> finalize(
const boost::program_options::variables_map& vm,
std::shared_ptr<const Acts::IMaterialDecorator> mdecorator) override;

std::pair<ActsExamples::IBaseDetector::TrackingGeometryPtr, ContextDecorators>
finalize(ActsExamples::DD4hep::DD4hepGeometryService::Config cfg,
std::shared_ptr<const Acts::IMaterialDecorator> mdecorator);
std::pair<IBaseDetector::TrackingGeometryPtr, ContextDecorators> finalize(
DD4hepGeometryService::Config cfg,
std::shared_ptr<const Acts::IMaterialDecorator> mdecorator);
};

} // namespace DD4hep
} // namespace ActsExamples
10 changes: 8 additions & 2 deletions Examples/Detectors/DD4hepDetector/src/DD4hepDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

#include <boost/program_options.hpp>

namespace ActsExamples {
namespace DD4hep {

void DD4hepDetector::addOptions(
boost::program_options::options_description& opt) const {
ActsExamples::Options::addDD4hepOptions(opt);
Expand All @@ -37,10 +40,10 @@ auto DD4hepDetector::finalize(
-> std::pair<TrackingGeometryPtr, ContextDecorators> {
Acts::GeometryContext dd4HepContext;
config.matDecorator = mdecorator;
auto geometrySvc =
geometryService =
std::make_shared<ActsExamples::DD4hep::DD4hepGeometryService>(config);
TrackingGeometryPtr dd4tGeometry =
geometrySvc->trackingGeometry(dd4HepContext);
geometryService->trackingGeometry(dd4HepContext);
if (!dd4tGeometry) {
throw std::runtime_error{
"Did not receive tracking geometry from DD4hep geometry service"};
Expand All @@ -50,3 +53,6 @@ auto DD4hepDetector::finalize(
return std::make_pair<TrackingGeometryPtr, ContextDecorators>(
std::move(dd4tGeometry), std::move(dd4ContextDeocrators));
}

} // namespace DD4hep
} // namespace ActsExamples
1 change: 1 addition & 0 deletions Examples/Io/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
add_subdirectory(Csv)
add_subdirectory_if(EDM4hep ACTS_BUILD_EXAMPLES_EDM4HEP)
add_subdirectory_if(HepMC3 ACTS_BUILD_EXAMPLES_HEPMC3)
add_subdirectory(Json)
add_subdirectory(NuclearInteractions)
Expand Down
2 changes: 1 addition & 1 deletion Examples/Io/Csv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ add_library(
src/CsvSpacePointReader.cpp
src/CsvTrackingGeometryWriter.cpp
src/CsvMultiTrajectoryWriter.cpp
src/CsvSpacepointWriter.cpp)
src/CsvSpacePointWriter.cpp)
target_include_directories(
ActsExamplesIoCsv
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
Expand Down
File renamed without changes.
27 changes: 27 additions & 0 deletions Examples/Io/EDM4hep/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
add_library(
ActsExamplesIoEDM4hep SHARED
src/EDM4hepMeasurementReader.cpp
src/EDM4hepMeasurementWriter.cpp
src/EDM4hepMultiTrajectoryWriter.cpp
src/EDM4hepParticleReader.cpp
src/EDM4hepParticleWriter.cpp
src/EDM4hepSimHitReader.cpp
src/EDM4hepSimHitWriter.cpp
src/EDM4hepUtil.cpp)
target_include_directories(
ActsExamplesIoEDM4hep
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
target_link_libraries(
ActsExamplesIoEDM4hep
PUBLIC
EDM4HEP::edm4hep
podio::podioRootIO
ActsCore
ActsFatras
ActsExamplesFramework
ActsExamplesDigitization
ActsExamplesDetectorDD4hep)

install(
TARGETS ActsExamplesIoEDM4hep
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
Loading

0 comments on commit 66cbfa0

Please sign in to comment.