build(deps): bump pypa/cibuildwheel from 2.21.3 to 2.22.0 (#6) #786
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linux | |
on: [push, pull_request] | |
jobs: | |
lint: | |
runs-on: ubuntu-24.04 | |
container: sergiud/hogpp:lint-18 | |
defaults: | |
run: | |
shell: bash -e -o pipefail {0} | |
strategy: | |
fail-fast: true | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check code style | |
run: | | |
fdfind -g '*.[ch]pp' -x clang-format-18 --dry-run --Werror | |
build-native: | |
name: ${{matrix.os}}-GCC-${{matrix.build_type}} | |
runs-on: ${{matrix.os}} | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: true | |
matrix: | |
build_type: | |
- Release | |
- Debug | |
os: | |
- ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Dependencies | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
--no-install-recommends --no-install-suggests \ | |
cmake \ | |
furo \ | |
g++ \ | |
gcovr \ | |
libboost-test-dev \ | |
libeigen3-dev \ | |
libfmt-dev \ | |
libopencv-dev \ | |
mold \ | |
ninja-build \ | |
python3-dev \ | |
python3-numpy \ | |
python3-pillow \ | |
python3-pybind11 \ | |
python3-pytest \ | |
python3-pytest-xdist \ | |
python3-sphinx \ | |
python3-sphinx-copybutton \ | |
python3-sphinxcontrib.bibtex | |
- name: Setup Debug Environment | |
if: ${{matrix.build_type == 'Debug'}} | |
run: | | |
echo 'CXXFLAGS=--coverage' >> $GITHUB_ENV | |
- name: Configure | |
env: | |
CXXFLAGS: -Wall -Wextra -Wpedantic -Wsign-conversion -Wtautological-compare -Wundef -Wfloat-equal -Wno-attributes -Werror ${{env.CXXFLAGS}} | |
Python_ROOT: ${{env.pythonLocation}} | |
run: | | |
cmake -S . -B build/ \ | |
-DCMAKE_REQUIRE_FIND_PACKAGE_pybind11=ON \ | |
-DCMAKE_REQUIRE_FIND_PACKAGE_Python=ON \ | |
-DCMAKE_REQUIRE_FIND_PACKAGE_Sphinx=ON \ | |
-G Ninja | |
- name: Build | |
run: | | |
cmake --build build/ \ | |
--config ${{matrix.build_type}} | |
- name: Test | |
run: | | |
ctest --test-dir build/ \ | |
--build-config ${{matrix.build_type}} \ | |
-j$(nproc) \ | |
--output-on-failure | |
- name: Generate Documentation | |
run: | | |
cmake --build build/ \ | |
--config ${{matrix.build_type}} \ | |
--target sphinx | |
- name: Generate Coverage | |
if: matrix.build_type == 'Debug' | |
run: | | |
cd build/ | |
gcovr -r .. . -s --cobertura coverage.xml | |
- name: Upload Coverage to Codecov | |
if: ${{matrix.build_type == 'Debug'}} | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: build/coverage.xml | |
fail_ci_if_error: true | |
verbose: true | |
build-wheel: | |
name: Python-${{matrix.python}}-${{matrix.build_type}}-wheel | |
runs-on: ubuntu-24.04 | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: true | |
matrix: | |
build_type: | |
- Release | |
- Debug | |
python: | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
- '3.12' | |
- '3.13' | |
- 'pypy3.10' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Dependencies | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
--no-install-recommends --no-install-suggests \ | |
cmake \ | |
g++ \ | |
libeigen3-dev \ | |
libfmt-dev \ | |
mold \ | |
ninja-build | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{matrix.python}} | |
cache: 'pip' | |
cache-dependency-path: requirements.txt | |
- name: Setup Dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Setup Environment | |
run: | | |
echo 'CXXFLAGS=-fuse-ld=mold' >> $GITHUB_ENV | |
echo "pybind11_ROOT=$(pybind11-config --cmakedir)" >> $GITHUB_ENV | |
- name: Build | |
env: | |
CXXFLAGS: -Wall -Wextra -Wpedantic -Wsign-conversion -Wtautological-compare -Wundef -Wfloat-equal -Wno-attributes -Werror ${{env.CXXFLAGS}} | |
run: | | |
pip install --no-build-isolation \ | |
--config-settings build-dir=build/ \ | |
--config-settings cmake.build-type=${{matrix.build_type}} \ | |
--verbose \ | |
--editable . | |
- name: Test | |
run: | | |
coverage run -m pytest --junit-xml=report.xml | |
- name: Generate Documentation | |
run: | | |
sphinx-build -M html docs/ docs/_build -W --keep-going | |
- name: Generate Coverage | |
run: | | |
coverage report | |
coverage xml | |
- name: Upload Coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: coverage.xml | |
fail_ci_if_error: true | |
verbose: true |