From 4ec333955e0afc9f9fea6bc0acf78b7182d1f4b1 Mon Sep 17 00:00:00 2001 From: Max Lantas Date: Thu, 26 Sep 2024 17:57:53 -0700 Subject: [PATCH] Build nanobind bindings in CI Signed-off-by: Max Lantas --- .github/workflows/ci_workflow.yml | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.github/workflows/ci_workflow.yml b/.github/workflows/ci_workflow.yml index 25a81594..a40210d7 100644 --- a/.github/workflows/ci_workflow.yml +++ b/.github/workflows/ci_workflow.yml @@ -217,6 +217,36 @@ jobs: pybind11: 'ON' python-desc: python3.11 vfx-cy: 2024 + + # ------------------------------------------------------------------- + # nanobind and python together + # ------------------------------------------------------------------- + - build: 10 + build-type: Release + build-shared: 'ON' + cxx-standard: 17 + cxx-compiler: g++ + cc-compiler: gcc + compiler-desc: gcc11.2.1 + python: 'ON' + nanobind: 'ON' + python-desc: python3.11 + vfx-cy: 2024 + + # ------------------------------------------------------------------- + # nanobind w/o python + # ------------------------------------------------------------------- + - build: 11 + build-type: Release + build-shared: 'ON' + cxx-standard: 17 + cxx-compiler: g++ + cc-compiler: gcc + compiler-desc: gcc11.2.1 + python: 'OFF' + nanobind: 'ON' + python-desc: python3.11 + vfx-cy: 2024 env: CXX: ${{ matrix.cxx-compiler }} CC: ${{ matrix.cc-compiler }} @@ -241,6 +271,7 @@ jobs: -DBUILD_SHARED_LIBS=${{ matrix.build-shared }} \ -DPYTHON=${{ matrix.python }} \ -DPYBIND11=${{ matrix.pybind11 }} \ + -DNANOBIND=${{ matrix.nanobind }} \ -DUSE_PYTHON2=${{ matrix.use-python2 }} working-directory: _build - name: Build @@ -289,6 +320,10 @@ jobs: export PYTHONPATH=`find ../_install -name 'pybindimath.*.so' | xargs dirname` python -c "import pybindimath;print(pybindimath.__version__)" fi + if [[ "${{ matrix.nanobind }}" == "ON" ]]; then + export PYTHONPATH=`find ../_install -name 'nanobindimath.*.so' | xargs dirname` + python -c "import nanobindimath;print(nanobindimath.__version__)" + fi shell: bash working-directory: _build - name: Test