Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
check-path: "${{ matrix.path }}"
unit-tests:
name: "Build ${{ matrix.build_type }} with ${{ matrix.cxx }}"
needs: [ "codespell-check" , "format-check" ]
runs-on: ubuntu-22.04
strategy:
matrix:
Expand Down Expand Up @@ -87,6 +88,7 @@ jobs:
run: |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DENABLE_COVERAGE=${{ matrix.build_type == 'Debug' && 'ON' || 'OFF' }} \
-DBUILD_PYTHON_BINDINGS=OFF \
-G Ninja \
-B ../build \
-S ${GITHUB_WORKSPACE}
Expand Down Expand Up @@ -123,16 +125,16 @@ jobs:
retention-days: 1
if-no-files-found: error

# upload-to-codecov:
# name: "Codecov report upload"
# needs: [ "unit-tests" , "codespell-check" , "format-check" ]
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v4
# - name: "Download artifacts"
# uses: actions/download-artifact@v4
# - name: "Upload coverage to Codecov"
# uses: codecov/codecov-action@v4
# with:
# fail_ci_if_error: true
# token: ${{ secrets.CODECOV_TOKEN }}
upload-to-codecov:
name: "Codecov report upload"
needs: [ "unit-tests" ]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: "Download artifacts"
uses: actions/download-artifact@v4
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
41 changes: 39 additions & 2 deletions .github/workflows/python-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: "Test Python bindings"
strategy:
matrix:
on: [ 'ubuntu-24.04', 'macos-15-intel', 'macos-26' ]
on: [ 'ubuntu-22.04', 'ubuntu-24.04', 'macos-15-intel', 'macos-26' ]
python: [ '3.10', '3.11', '3.12', '3.13' ]

runs-on: ${{ matrix.on }}
Expand Down Expand Up @@ -48,11 +48,48 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install -r build-requirements.txt
python -m build

python -m build \
-Ccmake.define.ENABLE_COVERAGE=ON \
-Ccmake.build-type=Debug \
-Ccmake.define.CAPIO_CL_BUILD_TESTS=OFF

pip install dist/*.whl

# Run unit tests
- name: "Run Python tests"
run: |
python -m pip install -r test-requirements.txt
pytest -v tests/python/test_*

- name: "Generate coverage report"
if: ${{ startsWith(matrix.on, 'ubuntu-') }}
run: |
pip install --upgrade gcovr
gcovr \
--exclude-throw-branches \
--xml coverage.xml \
.

- name: "Upload coverage report"
if: ${{ startsWith(matrix.on, 'ubuntu-') }}
uses: actions/upload-artifact@v4
with:
name: ${{ format('{0}-{1}-tests', matrix.on, matrix.python) }}
path: ./coverage.xml
retention-days: 1
if-no-files-found: error

upload-to-codecov:
name: "Codecov report upload"
needs: [ "python-tests" ]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: "Download artifacts"
uses: actions/download-artifact@v4
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ if (NOT PROJECT_IS_TOP_LEVEL)
message(STATUS "CAPIO-CL included as subproject → tests disabled")
endif ()

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_compile_options(-O0 -g)
endif()

if(ENABLE_COVERAGE)
message(STATUS "Building with code coverage instrumentation")
add_compile_options(--coverage -O0 -g)
add_link_options(--coverage)
endif()

#####################################
# External projects
#####################################
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

[![CI](https://github.com/High-Performance-IO/CAPIO-CL/actions/workflows/ci-test.yml/badge.svg)](https://github.com/High-Performance-IO/CAPIO-CL/actions/workflows/ci-test.yml)
[![Python Bindings](https://github.com/High-Performance-IO/CAPIO-CL/actions/workflows/python-bindings.yml/badge.svg)](https://github.com/High-Performance-IO/CAPIO-CL/actions/workflows/python-bindings.yml)
[![codecov](https://codecov.io/gh/High-Performance-IO/CAPIO-CL/graph/badge.svg)](https://codecov.io/gh/High-Performance-IO/CAPIO-CL)

![CMake](https://img.shields.io/badge/CMake-%E2%89%A53.15-blue?logo=cmake&logoColor=white)
![C++](https://img.shields.io/badge/C%2B%2B-%E2%89%A517-blueviolet?logo=c%2B%2B&logoColor=white)
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Documentation = "https://capio.hpc4ai.it/docs/coord-language/"
Repository = "https://github.com/High-Performance-IO/CAPIO-CL"
Issues = "https://github.com/High-Performance-IO/CAPIO-CL/issues"


[tool.scikit-build.metadata.version]
provider = "scikit_build_core.metadata.regex"
input = "CMakeLists.txt"
Expand Down
Loading