build(deps): bump pypa/cibuildwheel from 2.21.3 to 2.22.0 (#6) #670
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: macOS | |
on: [push, pull_request] | |
jobs: | |
build-native: | |
name: ${{matrix.os}}-AppleClang-${{matrix.build_type}} | |
runs-on: ${{matrix.os}} | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: true | |
matrix: | |
os: | |
- macos-13 | |
- macos-14 | |
- macos-15 | |
build_type: | |
- Release | |
- Debug | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Dependencies | |
run: | | |
brew install \ | |
boost \ | |
eigen \ | |
fmt \ | |
ninja \ | |
opencv \ | |
python | |
python -m venv .env/ | |
source .env/bin/activate | |
echo "PATH=$PATH" >> $GITHUB_ENV | |
pip install -r requirements.txt | |
- name: Setup Debug Environment | |
if: ${{matrix.build_type == 'Debug'}} | |
run: | | |
echo 'CXXFLAGS=--coverage' >> $GITHUB_ENV | |
echo 'LDFLAGS=--coverage' >> $GITHUB_ENV | |
- name: Setup Environment | |
run: | | |
echo "pybind11_ROOT=$(pybind11-config --cmakedir)" >> $GITHUB_ENV | |
- name: Configure | |
env: | |
CXXFLAGS: -Weverything -Wno-c++98-compat -Wno-padded -Wno-c++98-compat-pedantic -Wno-disabled-macro-expansion -Wno-shadow -Wno-used-but-marked-unused -Wno-global-constructors -Wno-shorten-64-to-32 -Wno-documentation -Wno-poison-system-directories -Werror ${{env.CXXFLAGS}} | |
Python_ROOT: ${{github.workspace}}/.env/ | |
run: | | |
cmake -S . -B build/ \ | |
-DCMAKE_REQUIRE_FIND_PACKAGE_pybind11=ON \ | |
-DCMAKE_REQUIRE_FIND_PACKAGE_Python=ON \ | |
-DCMAKE_REQUIRE_FIND_PACKAGE_Sphinx=ON \ | |
-G Xcode | |
- name: Build | |
run: | | |
cmake --build build/ \ | |
--config ${{matrix.build_type}} | |
- name: Test | |
run: | | |
ctest --test-dir build/ \ | |
--build-config ${{matrix.build_type}} \ | |
-j$(sysctl -n hw.ncpu) \ | |
--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: macos-15 | |
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 | |
run: | | |
brew install \ | |
eigen \ | |
fmt | |
- 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 'Eigen3_ROOT=${{github.workspace}}/eigen' >> $GITHUB_ENV | |
echo 'fmt_ROOT=${{github.workspace}}/fmt' >> $GITHUB_ENV | |
echo "pybind11_ROOT=$(pybind11-config --cmakedir)" >> $GITHUB_ENV | |
- name: Build | |
env: | |
CXXFLAGS: -Weverything -Wno-c++98-compat -Wno-padded -Wno-c++98-compat-pedantic -Wno-disabled-macro-expansion -Wno-shadow -Wno-used-but-marked-unused -Wno-global-constructors -Wno-shorten-64-to-32 -Wno-documentation -Wno-poison-system-directories -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 |