Skip to content

skip TOF backprojections along LOR where the sum over TOF is zero (#104) #370

skip TOF backprojections along LOR where the sum over TOF is zero (#104)

skip TOF backprojections along LOR where the sum over TOF is zero (#104) #370

# Workflow to build the parallelproj C/CUDA libs (incl. installation of CUDA)
name: Build C/python
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
- 'docs/**'
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ${{ matrix.os }}
env:
MPLBACKEND: Agg # https://github.com/orgs/community/discussions/26434
strategy:
matrix:
os: [ubuntu-latest, windows-latest] # not building on mac-os because there is no OpenMP
python-version: [3.9, 3.12]
test-env: [test-numpy-1, test-numpy-2]
steps:
- uses: actions/checkout@v4
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/libparallelproj_install -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build C/CUDA libs with CMake
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target install
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: ${{ matrix.python-version }}
- name: Show package version
run: |
pdm show --version
- name: Install dependencies and package
run: |
pdm install -d -G ${{ matrix.test-env }}
- if: matrix.os == 'ubuntu-latest'
name: Run Tests
run: |
pdm run -v pytest tests -v --cov-report term-missing --cov "src/parallelproj" --cov-fail-under=100
env:
PARALLELPROJ_C_LIB: ${{github.workspace}}/libparallelproj_install/lib/libparallelproj_c.so
- if: matrix.os == 'windows-latest'
name: Run Tests
run: |
pdm run -v pytest tests -v --cov-report term-missing --cov "src/parallelproj" --cov-fail-under=100
env:
PARALLELPROJ_C_LIB: ${{github.workspace}}\libparallelproj_install\bin\parallelproj_c.dll