Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,30 @@ jobs:
echo "DISTUTILS_USE_SDK=1" >> $GITHUB_ENV
echo "MSSdk=1" >> $GITHUB_ENV

- name: Update vcpkg
run: |
cd C:\vcpkg
git pull
.\\bootstrap-vcpkg.bat
if: startsWith(matrix.os, 'win')

- name: Install library deps with vcpkg
run: |
vcpkg install eigen3:x64-windows
vcpkg integrate install
if: startsWith(matrix.os, 'win')

- name: Install library deps with brew
run: |
brew install -s eigen
if: startsWith(matrix.os, 'mac')

- name: Install library deps with apt
if: runner.os == 'Linux'
run: |
sudo apt-get -qq update
sudo apt-get install -y libeigen3-dev

- name: Build and install
run: pip install --verbose .

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ jobs:

- uses: actions/setup-python@v2

- name: Install library deps with apt
run: |
sudo apt-get -qq update
sudo apt-get install -y libeigen3-dev

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==1.6.3

Expand Down
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
cmake_minimum_required(VERSION 3.4...3.18)
project(cmake_example)

find_package(Eigen3 CONFIG REQUIRED)
find_package(Threads REQUIRED)

add_subdirectory(pybind11)
pybind11_add_module(cmake_example src/main.cpp)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# EXAMPLE_VERSION_INFO is defined by setup.py and passed into the C++ code as a
# define (VERSION_INFO) here.
target_compile_definitions(cmake_example PRIVATE VERSION_INFO=${EXAMPLE_VERSION_INFO})

target_compile_features(cmake_example INTERFACE cxx_std_11)
target_link_libraries(cmake_example PRIVATE Eigen3::Eigen)
33 changes: 33 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[tox]
envlist = py3{6,7,8,9}
skip_missing_interpreters = true

[tox:travis]
3.6 = py36
3.7 = py37
3.8 = py38
3.9 = py39

[testenv]
passenv = CI PYTHON CC CXX

deps =
pip>=19.0.1
wheel

commands =
pip install .
python tests/test.py
#py.test . --cov --cov-report term-missing
# codecov

[testenv:deploy]
passenv = CI PYTHON CC CXX

deps =
pip>=19.0.1
wheel

commands =
python setup.py sdist
python setup.py bdist_wheel