diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 9f73fae55..72ae5bb8a 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -37,10 +37,9 @@ jobs: - uses: actions/checkout@v2 # Run the CMake configuration. - name: Configure - run: cmake -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} - -DDETRAY_EIGEN_PLUGIN=ON - -DDETRAY_VC_PLUGIN=ON - -DDETRAY_BUILD_CUDA=FALSE + run: cmake --preset default-fp64 + -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} + -DDETRAY_FAIL_ON_WARNINGS=ON -S ${{ github.workspace }} -B build -G "${{ matrix.PLATFORM.GENERATOR }}" # Perform the build. @@ -86,7 +85,7 @@ jobs: - name: Configure run: | source ${GITHUB_WORKSPACE}/.github/ci_setup.sh ${{ matrix.PLATFORM.NAME }} - cmake -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} -DDETRAY_CUSTOM_SCALARTYPE=${{ matrix.SCALAR_TYPE }} ${{ matrix.PLATFORM.OPTIONS }} -S ${GITHUB_WORKSPACE} -B build + cmake -DDETRAY_FAIL_ON_WARNINGS=ON -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} -DDETRAY_CUSTOM_SCALARTYPE=${{ matrix.SCALAR_TYPE }} ${{ matrix.PLATFORM.OPTIONS }} -S ${GITHUB_WORKSPACE} -B build # Perform the build. - name: Build run: | @@ -139,7 +138,7 @@ jobs: - name: Configure run: | source ${GITHUB_WORKSPACE}/.github/ci_setup.sh ${{ matrix.PLATFORM.NAME }} - cmake -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} -DDETRAY_CUSTOM_SCALARTYPE=${{ matrix.SCALAR_TYPE }} ${{ matrix.PLATFORM.OPTIONS }} -S ${GITHUB_WORKSPACE} -B build + cmake -DDETRAY_FAIL_ON_WARNINGS=ON -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} -DDETRAY_CUSTOM_SCALARTYPE=${{ matrix.SCALAR_TYPE }} ${{ matrix.PLATFORM.OPTIONS }} -S ${GITHUB_WORKSPACE} -B build # Perform the build. - name: Build run: | diff --git a/.gitignore b/.gitignore index 653c32117..68f609b3d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ /bin /build /run +/out # python files **/__pycache__ @@ -16,4 +17,4 @@ **/*.so **/*C_ACLiC* **/thread_* -**/merged/ \ No newline at end of file +**/merged/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 53f45b343..b74f5e3da 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,9 @@ +# Detray library, part of the ACTS project (R&D line) +# +# (c) 2021-2024 CERN for the benefit of the ACTS project +# +# Mozilla Public License Version 2.0 + stages: - build - test @@ -14,15 +20,11 @@ build_cuda: - git clone $CLONE_URL src - git -C src checkout $HEAD_SHA - > - cmake -S src -B build + cmake --preset cuda -S src -B build -DCMAKE_BUILD_TYPE=Release - -DDETRAY_CUSTOM_SCALARTYPE=float -DBUILD_TESTING=ON -DDETRAY_BUILD_TESTING=ON - -DDETRAY_BUILD_CUDA=ON - -DDETRAY_VC_PLUGIN=OFF - -DDETRAY_SMATRIX_PLUGIN=OFF - -DDETRAY_EIGEN_PLUGIN=ON + -DDETRAY_FAIL_ON_WARNINGS=ON - cmake --build build @@ -57,16 +59,11 @@ build_sycl: - git -C src checkout $HEAD_SHA - source src/.github/ci_setup.sh SYCL - > - cmake -S src -B build + cmake --preset sycl -S src -B build -DCMAKE_BUILD_TYPE=Release - -DDETRAY_CUSTOM_SCALARTYPE=float - -DDETRAY_BUILD_CUDA=OFF - -DDETRAY_BUILD_SYCL=ON - -DBUILD_TESTING=ON + -DBUILD_TESTING=ON -DDETRAY_BUILD_TESTING=ON - -DDETRAY_VC_PLUGIN=OFF - -DDETRAY_SMATRIX_PLUGIN=OFF - -DDETRAY_EIGEN_PLUGIN=ON + -DDETRAY_FAIL_ON_WARNINGS=ON - cmake --build build diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 000000000..7872b4c76 --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,59 @@ +{ + "version" : 3, + "configurePresets": [ + { + "name" : "base", + "displayName" : "Base Developer Configuration", + "warnings": { + "deprecated": true + }, + "cacheVariables": { + "CMAKE_BUILD_TYPE" : "RelWithDebInfo" + } + }, + { + "name" : "default-fp64", + "displayName" : "FP64 Developer Configuration", + "inherits" : [ "base" ], + "cacheVariables" : { + "DETRAY_CUSTOM_SCALARTYPE" : "double" + } + }, + { + "name" : "default-fp32", + "displayName" : "FP32 Developer Configuration", + "inherits" : [ "base" ], + "cacheVariables" : { + "DETRAY_CUSTOM_SCALARTYPE" : "float" + } + }, + { + "name" : "cuda", + "displayName" : "CUDA Developer Configuration", + "inherits" : [ "default-fp32" ], + "cacheVariables" : { + "DETRAY_BUILD_CUDA" : "TRUE", + "DETRAY_VC_PLUGIN" : "FALSE", + "DETRAY_SMATRIX_PLUGIN" : "FALSE" + } + }, + { + "name" : "sycl", + "displayName" : "SYCL Developer Configuration", + "inherits" : [ "default-fp32" ], + "cacheVariables" : { + "DETRAY_BUILD_SYCL" : "TRUE", + "DETRAY_VC_PLUGIN" : "FALSE", + "DETRAY_SMATRIX_PLUGIN" : "FALSE" + } + }, + { + "name" : "smatrix", + "displayName" : "SMatrix Developer Configuration", + "inherits" : [ "default-fp64" ], + "cacheVariables" : { + "DETRAY_SMATRIX_PLUGIN" : "TRUE" + } + } + ] +}