Skip to content

Commit

Permalink
ci: Add actsvg to major builds (#2165)
Browse files Browse the repository at this point in the history
In order to avoid potential problems in the future that have to be fixed
afterwards like in #2160

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
andiwand and kodiakhq[bot] committed May 31, 2023
1 parent d974ecf commit a355fb7
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 16 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ jobs:
-DACTS_BUILD_FATRAS=ON
-DACTS_BUILD_ALIGNMENT=ON
-DACTS_BUILD_ANALYSIS_APPS=ON
-DACTS_BUILD_PLUGIN_ACTSVG=ON
- name: Build
run: ${SETUP} && cmake --build build
Expand Down Expand Up @@ -167,6 +168,7 @@ jobs:
-DACTS_FORCE_ASSERTIONS=ON
-DACTS_BUILD_ANALYSIS_APPS=ON
-DACTS_BUILD_PLUGIN_ONNX=ON
-DACTS_BUILD_PLUGIN_ACTSVG=ON
- name: Build
run: cmake --build build
Expand Down Expand Up @@ -350,6 +352,7 @@ jobs:
-DACTS_BUILD_EXAMPLES_EDM4HEP=ON
-DACTS_FORCE_ASSERTIONS=ON
-DACTS_BUILD_ANALYSIS_APPS=ON
-DACTS_BUILD_PLUGIN_ACTSVG=ON
- name: Build
run: cmake --build build
Expand Down Expand Up @@ -528,6 +531,7 @@ jobs:
-DACTS_LOG_FAILURE_THRESHOLD=WARNING
-DACTS_FORCE_ASSERTIONS=ON
-DACTS_BUILD_EXAMPLES_EDM4HEP=ON
-DACTS_BUILD_PLUGIN_ACTSVG=ON
- name: Build
run: cmake --build build
- name: ccache stats
Expand Down
3 changes: 3 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ build_linux_ubuntu:
-DACTS_FORCE_ASSERTIONS=ON
-DACTS_BUILD_ANALYSIS_APPS=ON
-DACTS_BUILD_PLUGIN_ONNX=ON
-DACTS_BUILD_PLUGIN_ACTSVG=ON
- ccache -z
- cmake --build build --
Expand Down Expand Up @@ -240,6 +241,7 @@ linux_test_examples:
-DACTS_BUILD_EXAMPLES_EDM4HEP=ON
-DACTS_FORCE_ASSERTIONS=ON
-DACTS_BUILD_ANALYSIS_APPS=ON
-DACTS_BUILD_PLUGIN_ACTSVG=ON
- ccache -z
- cmake --build build --
Expand Down Expand Up @@ -356,6 +358,7 @@ linux_ubuntu_2204_clang:
-DACTS_BUILD_FATRAS=ON
-DACTS_BUILD_ALIGNMENT=ON
-DACTS_BUILD_ANALYSIS_APPS=ON
-DACTS_BUILD_PLUGIN_ACTSVG=ON
- ccache -z
- cmake --build build
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ endif()
if (ACTS_BUILD_PLUGIN_ACTSVG)
if(ACTS_USE_SYSTEM_ACTSVGN)
message(STATUS "Using system installation of actsvg")
find_package(actsvg ${_acts_nlohmanjson_version} REQUIRED CONFIG)
find_package(actsvg ${_acts_actsvg_version} REQUIRED CONFIG)
else()
add_subdirectory(thirdparty/actsvg)
endif()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Acts::Svg::IndexedSurfacesConverter::Options generateDrawOptions() {

isOptions.gridOptions = gridOptions;
return isOptions;
};
}

} // namespace

Expand Down
12 changes: 6 additions & 6 deletions Examples/Io/Svg/include/ActsExamples/Io/Svg/SvgDefaults.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ static inline Acts::Svg::Style layerStyle() {
lStyle.nSegments = 72u;

return lStyle;
};
}

static inline Acts::Svg::Style infoStyle() {
Acts::Svg::Style iStyle;
Expand All @@ -34,7 +34,7 @@ static inline Acts::Svg::Style infoStyle() {
iStyle.highlights = {};
iStyle.fontSize = 40.;
return iStyle;
};
}

static inline Acts::Svg::Style backgroundStyle() {
Acts::Svg::Style bgStyle;
Expand All @@ -45,7 +45,7 @@ static inline Acts::Svg::Style backgroundStyle() {
bgStyle.strokeWidth = 0.5;
bgStyle.nSegments = 72u;
return bgStyle;
};
}

static inline Acts::Svg::Style pointStyle() {
Acts::Svg::Style pStyle;
Expand All @@ -58,7 +58,7 @@ static inline Acts::Svg::Style pointStyle() {
pStyle.nSegments = 72u;

return pStyle;
};
}

static inline Acts::Svg::TrackingGeometryConverter::Options
trackingGeometryOptions() {
Expand All @@ -77,7 +77,7 @@ trackingGeometryOptions() {
{{geoID, lOptions}});

return tgOptions;
};
}

static inline Acts::Svg::TrackingGeometryConverter::Options
backgroundGeometryOptions() {
Expand All @@ -100,7 +100,7 @@ backgroundGeometryOptions() {
{{geoID, lOptions}});

return tgOptions;
};
}

} // namespace

Expand Down
11 changes: 8 additions & 3 deletions Plugins/ActSVG/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@ add_library(
src/SurfaceArraySvgConverter.cpp
src/SurfaceSvgConverter.cpp
src/TrackingGeometrySvgConverter.cpp)

target_include_directories(
ActsPluginActSVG
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/>
$<INSTALL_INTERFACE:include>)
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
target_link_libraries(
ActsPluginActSVG PUBLIC ActsCore actsvg::core actsvg::meta)
ActsPluginActSVG
PUBLIC
ActsCore
actsvg::core
actsvg::meta)

install(
TARGETS ActsPluginActSVG
Expand Down
6 changes: 3 additions & 3 deletions Plugins/EDM4hep/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ target_include_directories(
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
target_link_libraries(
ActsPluginEDM4hep
PUBLIC ActsCore)

target_link_libraries(ActsPluginEDM4hep PUBLIC EDM4HEP::edm4hep)
PUBLIC
ActsCore
EDM4HEP::edm4hep)

install(
TARGETS ActsPluginEDM4hep
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ IndexedSurfacesConverter::Options generateDrawOptions() {

isOptions.gridOptions = gridOptions;
return isOptions;
};
}

auto drawOptions = generateDrawOptions();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void runPlanarTests(const Acts::Surface& surface, const Acts::Svg::Style& style,
// As sheet
auto svgSheet = Acts::Svg::Sheet::xy(svgTemplate, identification + "_sheet");
Acts::Svg::toFile({svgSheet}, svgSheet._id + ".svg");
};
}

} // namespace

Expand Down
3 changes: 3 additions & 0 deletions cmake/ActsConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ endif()
if(PluginTGeo IN_LIST Acts_COMPONENTS)
find_dependency(ROOT @ROOT_VERSION@ CONFIG EXACT)
endif()
if(PluginActSVG IN_LIST Acts_COMPONENTS)
find_dependency(actsvg @actsvg_VERSION@ CONFIG EXACT)
endif()

# dependencies that we have built ourselves but cannot be
# straightforwardly handed to cmake
Expand Down

0 comments on commit a355fb7

Please sign in to comment.