Skip to content

feat: generic plugin #654

feat: generic plugin

feat: generic plugin #654

Workflow file for this run

# Algebra plugins 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
name: Builds
on:
push:
pull_request:
branches:
- main
- 'release/**'
# Cancel existing jobs on new pushes.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
# All the different build/test jobs.
jobs:
# Native build jobs.
native:
# The different build modes to test.
strategy:
matrix:
BUILD_TYPE: ["Release", "Debug"]
PLATFORM:
- OS: "ubuntu-latest"
GENERATOR: "Unix Makefiles"
- OS: "macos-latest"
GENERATOR: "Xcode"
- OS: "windows-latest"
GENERATOR: "Visual Studio 17 2022"
# The system to run on.
runs-on: ${{ matrix.PLATFORM.OS }}
# The build/test steps to execute.
steps:
# Use a standard checkout of the code.
- uses: actions/checkout@v4
# Run the CMake configuration.
- name: Configure
run: cmake --preset default-x86-64
-DALGEBRA_PLUGINS_INCLUDE_FASTOR=${{ (matrix.PLATFORM.OS == 'macos-latest') && 'OFF' || 'ON' }}
-DALGEBRA_PLUGINS_INCLUDE_VC=${{ (matrix.PLATFORM.OS == 'windows-latest') && 'OFF' || 'ON' }}
-DALGEBRA_PLUGINS_SETUP_VC=${{ (matrix.PLATFORM.OS == 'windows-latest') && 'OFF' || 'ON' }}
-S ${{ github.workspace }} -B build
-G "${{ matrix.PLATFORM.GENERATOR }}"
# Perform the build.
- name: Build
run: cmake --build build --config ${{ matrix.BUILD_TYPE }}
# Run the unit test(s).
- name: Test
run: |
cd build
ctest --output-on-failure -C ${{ matrix.BUILD_TYPE }}
# Containerised build jobs.
container:
# The different build modes to test.
strategy:
matrix:
BUILD_TYPE: ["Release", "Debug"]
PLATFORM:
- NAME: "HOST"
CONTAINER: "ghcr.io/acts-project/ubuntu2404:56"
OPTIONS: --preset eigen -DALGEBRA_PLUGINS_USE_SYSTEM_EIGEN3=TRUE
RUN_TESTS: true
- NAME: "HOST"
CONTAINER: "ghcr.io/acts-project/ubuntu2404:56"
OPTIONS: --preset eigen
RUN_TESTS: true
- NAME: "HOST"
CONTAINER: "ghcr.io/acts-project/ubuntu2404:56"
OPTIONS: -DALGEBRA_PLUGINS_INCLUDE_SMATRIX=TRUE
RUN_TESTS: true
- NAME: "HOST"
CONTAINER: "ghcr.io/acts-project/ubuntu2404:56"
OPTIONS: --preset vc
RUN_TESTS: true
- NAME: "HOST"
CONTAINER: "ghcr.io/acts-project/ubuntu2404:56"
OPTIONS: --preset vecmem
RUN_TESTS: true
- NAME: "HOST"
CONTAINER: "ghcr.io/acts-project/ubuntu2404:56"
OPTIONS: --preset fastor
RUN_TESTS: true
- NAME: "CUDA"
CONTAINER: "ghcr.io/acts-project/ubuntu2404_cuda:67"
OPTIONS: --preset cuda
RUN_TESTS: false
- NAME: "SYCL HOST"
CONTAINER: "ghcr.io/acts-project/ubuntu2404_oneapi:56"
OPTIONS: --preset sycl
RUN_TESTS: false
# The system to run on.
runs-on: ubuntu-latest
container: ${{ matrix.PLATFORM.CONTAINER }}
# Use BASH as the shell from the image.
defaults:
run:
shell: bash
# The build/test steps to execute.
steps:
# Use a standard checkout of the code.
- uses: actions/checkout@v4
# Run the CMake configuration.
- name: Configure
run: |
source ${GITHUB_WORKSPACE}/.github/ci_setup.sh ${{ matrix.PLATFORM.NAME }}
cmake ${{ matrix.PLATFORM.OPTIONS }} -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} -S ${GITHUB_WORKSPACE} -B build
# Perform the build.
- name: Build
run: |
source ${GITHUB_WORKSPACE}/.github/ci_setup.sh ${{ matrix.PLATFORM.NAME }}
cmake --build build
# Run the unit test(s).
- name: Test
if: "matrix.PLATFORM.RUN_TESTS"
run: |
cd build
source ${GITHUB_WORKSPACE}/.github/ci_setup.sh ${{ matrix.PLATFORM.NAME }}
ctest --output-on-failure