Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI workflow (build nb ext., still misses run/test from Python).
Browse files Browse the repository at this point in the history
iglesias committed May 19, 2024
1 parent 5a1e35d commit 1f18383
Showing 2 changed files with 34 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/nanobind.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Nanobind

on:
# TODO probably change/add main later. Ah, perhaps this wf can be part of linux.yml?
push:
branches: [ "nanobind" ]
# pull_request:
# branches: [ ]

jobs:
build:
name: "Build Python interface"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Python setup
uses: actions/setup-python@v5
with:
python-version: '3.11.9'

- name: Install dependencies
run: |
sudo apt-get install -y libarpack2-dev libcxxopts-dev libeigen3-dev libfmt-dev python3.11-dev
python -m pip install nanobind
- name: Configure
run: cmake -B ${{github.workspace}}/build -DBUILD_NANOBIND=ON

- name: Build
# TODO there are A LOT of warnings in the logs from nanobind (-pedantic, -Wshadow).
run: cmake --build ${{github.workspace}}/build
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -177,7 +177,7 @@ option(BUILD_NANOBIND "Build nanobind Python extension" OFF)
# BUILD_CLI, or so, maybe if there's a CMake command to
# configure not building tapkee inside the if BUILD_NANOBIND.
if (BUILD_NANOBIND)
message(STATUS "Detecting and configuring nanobind")
message(STATUS "Detecting and configuring nanobind")
find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
# Detect the installed nanobind package and import it into CMake
execute_process(

0 comments on commit 1f18383

Please sign in to comment.