Skip to content

Commit a914eef

Browse files
committed
Merge python + c++
1 parent c5fddd1 commit a914eef

File tree

3 files changed

+23
-5
lines changed

3 files changed

+23
-5
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/workflows/coverage.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ jobs:
5959
- name: Setup Ninja
6060
uses: seanmiddleditch/gha-setup-ninja@master
6161

62+
- name: Setup and install python
63+
uses: actions/setup-python@v5
64+
with:
65+
python-version: "3.11"
66+
6267
- name: Install Dependencies
6368
run: sudo apt-get update && sudo apt-get install -y ${INSTALL_DEPS}
6469

@@ -79,22 +84,34 @@ jobs:
7984
working-directory: ${{ runner.workspace }}/build
8085
run: cmake --build . --target coverage_clean
8186

82-
- name: Run Tests
87+
- name: Run C++ Tests
8388
working-directory: ${{ runner.workspace }}/build/tests/Debug
8489
run: ./yup_tests --gtest_output=xml:test_results.xml
8590

91+
- name: Build Python Wheels and Run Python Tests
92+
uses: pypa/[email protected]
93+
env:
94+
CIBW_ARCHS: x86_64
95+
CIBW_BUILD: cp311-manylinux_x86_64
96+
CIBW_TEST_SKIP: "*manylinux*"
97+
CIBW_DEBUG_TRACEBACK: TRUE
98+
CIBW_ENVIRONMENT: CIBW_DEBUG_TRACEBACK=TRUE YUP_ENABLE_COVERAGE=1
99+
with:
100+
package-dir: python
101+
86102
- name: Generate Combined Coverage Report
87103
working-directory: ${{ runner.workspace }}/build
88104
run: |
89-
lcov --directory . --capture --output-file coverage/coverage.info --ignore-errors mismatch,gcov,source,negative,unused,empty
90-
lcov --remove coverage/coverage.info \
105+
lcov --directory . --capture --output-file coverage/coverage.info --ignore-errors ${IGNORE_ERRORS}
106+
lcov -r coverage/coverage.info \
91107
"*/thirdparty/*" \
92108
"*/build/*" \
93109
"*/tests/*" \
94110
"*/usr/*" \
95111
"*/opt/*" \
96112
"*/CMakeFiles/*" \
97-
--output-file coverage/coverage_final.info --ignore-errors mismatch,gcov,source,negative,unused,empty
113+
-o coverage/cpp.info --ignore-errors ${IGNORE_ERRORS}
114+
lcov -a ../python/wheelhouse/lcov.info "*" -a coverage/cpp.info "*" -o coverage/coverage_final.info --ignore-errors ${IGNORE_ERRORS}
98115
lcov --list coverage/coverage_final.info
99116
100117
- name: Upload Overall Coverage to Codecov

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ cmake-build*
4141
out/*
4242

4343
# Ides
44-
.vscode/
44+
.vscode
4545
.idea
4646
.vs

0 commit comments

Comments
 (0)