feat: add FDM grid infrastructure bindings (meshers, layout, iterator… #47
This file contains hidden or 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
| # PyQuantLib: Python bindings for QuantLib | |
| # Copyright (c) 2025 Yassine Idyiahia | |
| # | |
| # QuantLib is Copyright (c) 2000-2025 The QuantLib Authors | |
| # QuantLib is free software under a modified BSD license. | |
| # See http://quantlib.org/ for more information. | |
| # | |
| # Source: https://github.com/quantales/pyquantlib | |
| # Licensed under the BSD 3-Clause License. See LICENSE file for details. | |
| name: macOS build | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "src/**" | |
| - "include/**" | |
| - "CMakeLists.txt" | |
| - "pyproject.toml" | |
| - ".github/workflows/macos.yml" | |
| pull_request: | |
| paths: | |
| - "src/**" | |
| - "include/**" | |
| - "CMakeLists.txt" | |
| - "pyproject.toml" | |
| - ".github/workflows/macos.yml" | |
| env: | |
| QUANTLIB_VERSION: "1.40" | |
| jobs: | |
| build: | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install system dependencies | |
| run: | | |
| brew install boost ninja | |
| - name: Cache QuantLib | |
| id: cache-quantlib | |
| uses: actions/cache@v4 | |
| with: | |
| path: /Users/runner/quantlib-install | |
| key: quantlib-${{ env.QUANTLIB_VERSION }}-static-macos-latest-v1 | |
| restore-keys: | | |
| quantlib-${{ env.QUANTLIB_VERSION }}-static-macos-latest- | |
| - name: Build QuantLib from source | |
| if: steps.cache-quantlib.outputs.cache-hit != 'true' | |
| run: | | |
| curl -L -o QuantLib.tar.gz https://github.com/lballabio/QuantLib/releases/download/v${{ env.QUANTLIB_VERSION }}/QuantLib-${{ env.QUANTLIB_VERSION }}.tar.gz | |
| tar xzf QuantLib.tar.gz | |
| cd QuantLib-${{ env.QUANTLIB_VERSION }} | |
| mkdir -p build && cd build | |
| cmake .. -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DCMAKE_INSTALL_PREFIX=/Users/runner/quantlib-install \ | |
| -DBUILD_SHARED_LIBS=OFF \ | |
| -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ | |
| -DQL_USE_STD_SHARED_PTR=ON \ | |
| -DQL_USE_STD_OPTIONAL=ON \ | |
| -DQL_USE_STD_ANY=ON \ | |
| -DQL_BUILD_EXAMPLES=OFF \ | |
| -DQL_BUILD_TEST_SUITE=OFF \ | |
| -DQL_BUILD_BENCHMARK=OFF | |
| ninja | |
| ninja install | |
| - name: Verify QuantLib configuration | |
| run: | | |
| echo "Checking QuantLib config.hpp for std:: flags..." | |
| grep -E "QL_USE_STD_(SHARED_PTR|OPTIONAL|ANY)" /Users/runner/quantlib-install/include/ql/config.hpp || echo "Flags not found in config.hpp" | |
| - name: Install Python build dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| - name: Build package with dev dependencies | |
| run: | | |
| pip install -e .[dev] -v | |
| env: | |
| QuantLib_ROOT: /Users/runner/quantlib-install | |
| - name: Run tests | |
| run: | | |
| pytest -v |