Skip to content

Commit

Permalink
Merge pull request acts-project#818 from niermann999/ref-CI-build
Browse files Browse the repository at this point in the history
Turn off non essential components in the CI builds:

    No host builds in device CI runs
    Remove the old continuous benchmark build and scripts
    Don't build Vc and SMatrix plugins in device CI jobs (they cannot be used in device code anyway)
    Build dependencies only if requested (e.g. don't build Vc in Algebra-Plugins, unless the Vc plugin is turned on)

Also switched the CUDA ci-bridge image to be fetched from gitlab
  • Loading branch information
niermann999 authored Sep 20, 2024
2 parents 9e25aab + 5d9961d commit 91c0667
Show file tree
Hide file tree
Showing 16 changed files with 52 additions and 145 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,6 @@ jobs:
cd build
source ${GITHUB_WORKSPACE}/.github/ci_setup.sh ${{ matrix.PLATFORM.NAME }}
ctest --output-on-failure
# Run the Benchmarks(s) only for Release build type
- name: Benchmark
if: "matrix.BUILD_TYPE == 'Release'"
run: |
source ${GITHUB_WORKSPACE}/tests/scripts/run_benchmarks.sh
# Containerised build jobs.
device-container:
Expand All @@ -132,11 +127,11 @@ jobs:
- NAME: "CUDA"
CXX_STANDARD: "20"
CONTAINER: "ghcr.io/acts-project/ubuntu2404_cuda:56"
OPTIONS: -DDETRAY_EIGEN_PLUGIN=ON -DDETRAY_SMATRIX_PLUGIN=ON -DDETRAY_VC_PLUGIN=ON
OPTIONS: -DDETRAY_EIGEN_PLUGIN=ON -DDETRAY_SMATRIX_PLUGIN=OFF -DDETRAY_VC_PLUGIN=OFF
- NAME: "SYCL"
CXX_STANDARD: "20"
CONTAINER: "ghcr.io/acts-project/ubuntu2404_oneapi:56"
OPTIONS: -DDETRAY_BUILD_CUDA=OFF -DDETRAY_BUILD_SYCL=ON -DDETRAY_EIGEN_PLUGIN=ON -DDETRAY_SMATRIX_PLUGIN=ON -DDETRAY_VC_PLUGIN=ON
OPTIONS: -DDETRAY_BUILD_CUDA=OFF -DDETRAY_BUILD_SYCL=ON -DDETRAY_EIGEN_PLUGIN=ON -DDETRAY_SMATRIX_PLUGIN=OFF -DDETRAY_VC_PLUGIN=OFF

# The system to run on.
runs-on: ubuntu-latest
Expand Down Expand Up @@ -164,6 +159,7 @@ jobs:
-DDETRAY_BUILD_INTEGRATIONTESTS=ON \
-DDETRAY_BUILD_BENCHMARKS=ON \
-DDETRAY_BUILD_TUTORIALS=ON \
-DDETRAY_BUILD_HOST=OFF \
-DDETRAY_FAIL_ON_WARNINGS=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \
-DDETRAY_CUSTOM_SCALARTYPE=${{ matrix.SCALAR_TYPE }} \
Expand Down
10 changes: 9 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ stages:
build_cuda:
tags: [docker]
stage: build
image: ghcr.io/acts-project/ubuntu2204_cuda:56
image: gitlab-registry.cern.ch/acts/machines/ubuntu2204_cuda:latest
artifacts:
paths:
- build
Expand All @@ -22,11 +22,15 @@ build_cuda:
- >
cmake --preset cuda -S src -B build
-DCMAKE_BUILD_TYPE=Release
-DDETRAY_EIGEN_PLUGIN=ON
-DDETRAY_VC_PLUGIN=OFF
-DDETRAY_SMATRIX_PLUGIN=OFF
-DBUILD_TESTING=ON
-DDETRAY_BUILD_UNITTESTS=ON
-DDETRAY_BUILD_INTEGRATIONTESTS=ON
-DDETRAY_BUILD_BENCHMARKS=ON
-DDETRAY_BUILD_TUTORIALS=ON
-DDETRAY_BUILD_HOST=OFF
-DDETRAY_FAIL_ON_WARNINGS=ON
- cmake --build build

Expand Down Expand Up @@ -64,11 +68,15 @@ build_sycl:
- >
cmake --preset sycl -S src -B build
-DCMAKE_BUILD_TYPE=Release
-DDETRAY_EIGEN_PLUGIN=ON
-DDETRAY_VC_PLUGIN=OFF
-DDETRAY_SMATRIX_PLUGIN=OFF
-DBUILD_TESTING=ON
-DDETRAY_BUILD_UNITTESTS=OFF
-DDETRAY_BUILD_INTEGRATIONTESTS=ON
-DDETRAY_BUILD_BENCHMARKS=OFF
-DDETRAY_BUILD_TUTORIALS=OFF
-DDETRAY_BUILD_HOST=OFF
-DDETRAY_FAIL_ON_WARNINGS=ON
- cmake --build build

Expand Down
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ option( DETRAY_SVG_DISPLAY "Build ActSVG display module" OFF)
option( DETRAY_BUILD_SYCL "Build the SYCL sources included in detray" OFF )
option( DETRAY_BUILD_CUDA "Build the CUDA sources included in detray"
${DETRAY_BUILD_CUDA_DEFAULT} )
cmake_dependent_option(DETRAY_BUILD_HOST "Build the host sources included in detray" ON "DETRAY_BUILD_CUDA OR DETRAY_BUILD_SYCL" ON)
option( DETRAY_BUILD_TEST_UTILS "Build the test utility library of Detray" OFF )
option( DETRAY_BUILD_UNITTESTS "Build the unit tests of Detray" OFF )
option( DETRAY_BUILD_INTEGRATIONTESTS "Build the integration tests of Detray"
Expand Down Expand Up @@ -128,7 +129,7 @@ endif()

# Set up ACTSVG for displaying
option( DETRAY_SETUP_ACTSVG
"Set up the actsvg target(s) explicitly" TRUE )
"Set up the actsvg target(s) explicitly" ${DETRAY_SVG_DISPLAY} )
option( DETRAY_USE_SYSTEM_ACTSVG
"Pick up an existing installation of actsvg from the build environment"
${DETRAY_USE_SYSTEM_LIBS} )
Expand Down Expand Up @@ -170,7 +171,7 @@ endif()

# Set up GoogleTest.
option( DETRAY_SETUP_GOOGLETEST
"Set up the GoogleTest target(s) explicitly" TRUE )
"Set up the GoogleTest target(s) explicitly" ${DETRAY_BUILD_TESTING} )
option( DETRAY_USE_SYSTEM_GOOGLETEST
"Pick up an existing installation of GoogleTest from the build environment"
${DETRAY_USE_SYSTEM_LIBS} )
Expand All @@ -184,7 +185,7 @@ endif()

# Set up Google Benchmark.
option( DETRAY_SETUP_BENCHMARK
"Set up the Google Benchmark target(s) explicitly" TRUE )
"Set up the Google Benchmark target(s) explicitly" ${DETRAY_BUILD_BENCHMARKS} )
option( DETRAY_USE_SYSTEM_BENCHMARK
"Pick up an existing installation of Google Benchmark from the build environment"
${DETRAY_USE_SYSTEM_LIBS} )
Expand Down
8 changes: 4 additions & 4 deletions extern/algebra-plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ FetchContent_Declare(AlgebraPlugins ${DETRAY_ALGEBRA_PLUGINS_SOURCE_FULL})
# Options used in the build of Algebra Plugins.
set(ALGEBRA_PLUGINS_BUILD_TESTING FALSE CACHE BOOL
"Turn off the build of the Algebra Plugins unit tests")
set(ALGEBRA_PLUGINS_INCLUDE_EIGEN TRUE CACHE BOOL
set(ALGEBRA_PLUGINS_INCLUDE_EIGEN ${DETRAY_EIGEN_PLUGIN} CACHE BOOL
"Turn on the build of algebra::eigen")
set(ALGEBRA_PLUGINS_INCLUDE_VC TRUE CACHE BOOL
set(ALGEBRA_PLUGINS_INCLUDE_VC ${DETRAY_VC_PLUGIN} CACHE BOOL
"Turn on the build of algebra::vc_array")
set(ALGEBRA_PLUGINS_INCLUDE_VECMEM TRUE CACHE BOOL
"Turn on the build of algebra::vecmem_array")
Expand All @@ -47,11 +47,11 @@ set(ALGEBRA_PLUGINS_INCLUDE_VECMEM TRUE CACHE BOOL
set(ALGEBRA_PLUGINS_INCLUDE_SMATRIX ${DETRAY_SMATRIX_PLUGIN}
CACHE BOOL "Turn on/off the build of algebra::smatrix")

set(ALGEBRA_PLUGINS_SETUP_EIGEN3 TRUE CACHE BOOL
set(ALGEBRA_PLUGINS_SETUP_EIGEN3 ${DETRAY_EIGEN_PLUGIN} CACHE BOOL
"Have Algebra Plugins set up Eigen3 for itself")
set(ALGEBRA_PLUGINS_USE_SYSTEM_EIGEN3 FALSE CACHE BOOL
"Have Algebra Plugins pick up Eigen3 from the system")
set(ALGEBRA_PLUGINS_SETUP_VC TRUE CACHE BOOL
set(ALGEBRA_PLUGINS_SETUP_VC ${DETRAY_VC_PLUGIN} CACHE BOOL
"Have Algebra Plugins set up Vc for itself")
set(ALGEBRA_PLUGINS_USE_SYSTEM_VC FALSE CACHE BOOL
"Have Algebra Plugins build Vc itself")
Expand Down
4 changes: 3 additions & 1 deletion tests/benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
# Mozilla Public License Version 2.0

# Set up the host/cpu benchmarks.
add_subdirectory( cpu )
if( DETRAY_BUILD_HOST )
add_subdirectory( cpu )
endif()

# Set up all of the "device" benchmarks.
if( DETRAY_BUILD_CUDA )
Expand Down
10 changes: 6 additions & 4 deletions tests/integration_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
#
# Mozilla Public License Version 2.0

message(STATUS "Building detray host integration tests")

# Set up all of the "host" tests.
add_subdirectory( cpu )
add_subdirectory( io )
if( DETRAY_BUILD_HOST )
message(STATUS "Building detray host integration tests")

add_subdirectory( cpu )
add_subdirectory( io )
endif()

# Set up all of the "device" tests.
if( DETRAY_BUILD_CUDA OR DETRAY_BUILD_SYCL )
Expand Down
24 changes: 0 additions & 24 deletions tests/scripts/analyze_benchmarks.py

This file was deleted.

90 changes: 0 additions & 90 deletions tests/scripts/run_benchmarks.sh

This file was deleted.

2 changes: 0 additions & 2 deletions tests/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
#
# Mozilla Public License Version 2.0

message(STATUS "Building detray command line tools")

include( CMakeFindDependencyMacro )

find_dependency( Boost COMPONENTS program_options )
Expand Down
4 changes: 3 additions & 1 deletion tests/tools/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
#
# Mozilla Public License Version 2.0

add_subdirectory( cpu )
if( DETRAY_BUILD_HOST )
add_subdirectory( cpu )
endif()

if( DETRAY_BUILD_CUDA )
add_subdirectory( cuda )
Expand Down
2 changes: 2 additions & 0 deletions tests/tools/src/cpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#
#Mozilla Public License Version 2.0

message(STATUS "Building detray host command line tools")

include( CMakeFindDependencyMacro )

find_dependency( Boost COMPONENTS program_options )
Expand Down
2 changes: 2 additions & 0 deletions tests/tools/src/cuda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#
#Mozilla Public License Version 2.0

message(STATUS "Building detray device command line tools")

# Enable CUDA as a language.
enable_language(CUDA)

Expand Down
14 changes: 8 additions & 6 deletions tests/unit_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
#
# Mozilla Public License Version 2.0

message(STATUS "Building detray host unit tests")

# Set up all of the "host" tests.
add_subdirectory( covfie )
add_subdirectory( cpu )
add_subdirectory( io )
add_subdirectory( svgtools )
if( DETRAY_BUILD_HOST )
message(STATUS "Building detray host unit tests")

add_subdirectory( covfie )
add_subdirectory( cpu )
add_subdirectory( io )
add_subdirectory( svgtools )
endif()

# Set up all of the "device" tests.
if( DETRAY_BUILD_CUDA OR DETRAY_BUILD_SYCL )
Expand Down
6 changes: 4 additions & 2 deletions tutorials/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Detray library, part of the ACTS project (R&D line)
#
# (c) 2023 CERN for the benefit of the ACTS project
# (c) 2023-2024 CERN for the benefit of the ACTS project
#
# Mozilla Public License Version 2.0

# Set up all of the "host" tutorials.
add_subdirectory( cpu )
if( DETRAY_BUILD_HOST )
add_subdirectory( cpu )
endif()

# Set up all of the "device" tutorials.
if( DETRAY_BUILD_CUDA OR DETRAY_BUILD_SYCL )
Expand Down
2 changes: 2 additions & 0 deletions tutorials/src/cpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#
# Mozilla Public License Version 2.0

message(STATUS "Building detray host tutorials")

# Set up the tutorial(s) that are algebra agnostic.
detray_add_tutorial( define_an_actor
"propagation/define_an_actor.cpp"
Expand Down
2 changes: 2 additions & 0 deletions tutorials/src/device/cuda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#
# Mozilla Public License Version 2.0

message(STATUS "Building detray CUDA tutorials")

# C++17 support for CUDA requires CMake 3.18.
cmake_minimum_required(VERSION 3.18)

Expand Down

0 comments on commit 91c0667

Please sign in to comment.