Try Cython cI action
parent
7e2f6ccfb4
commit
cf0b32cd45
|
@ -31,3 +31,11 @@ jobs:
|
|||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- run: cd examples/matlab/; octave runme.m
|
||||
|
||||
Run_CYthon_example:
|
||||
runs-on: ubuntu-latest
|
||||
container: mmontanari/devenv:buildenv-ubuntu
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- run: cd examples/cython/; python3 setup.py build_ext --inplace; python3 test.py
|
||||
|
|
|
@ -1,38 +1,30 @@
|
|||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
||||
# ##### # # # #
|
||||
# #### ##### ###### # # # # # # # #
|
||||
# # # # # # ## # # # # # #
|
||||
# # # # # ##### # # # # #### # ### #
|
||||
# # # ##### # # # # # # # # # # #
|
||||
# # # # # # ## # # # # # # #
|
||||
# #### # ###### # # ##### ##### # # #
|
||||
# #
|
||||
# This file is part of openGJK. #
|
||||
# #
|
||||
# OpenGJK is free software: you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation, either version 3 of the License, or #
|
||||
# any later version. #
|
||||
# #
|
||||
# OpenGJK is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See The #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with OpenGJK. If not, see <https://www.gnu.org/licenses/>. #
|
||||
# #
|
||||
# openGJK: open-source Gilbert-Johnson-Keerthi algorithm #
|
||||
# Copyright (C) Mattia Montanari 2018 - 2020 #
|
||||
# http://iel.eng.ox.ac.uk/?page_id=504 #
|
||||
# #
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
||||
# _____ _ _ __ #
|
||||
# / ____| | | |/ / #
|
||||
# ___ _ __ ___ _ __ | | __ | | ' / #
|
||||
# / _ \| '_ \ / _ \ '_ \| | |_ |_ | | < #
|
||||
# | (_) | |_) | __/ | | | |__| | |__| | . \ #
|
||||
# \___/| .__/ \___|_| |_|\_____|\____/|_|\_\ #
|
||||
# | | #
|
||||
# |_| #
|
||||
# #
|
||||
# Copyright 2022 Mattia Montanari, University of Oxford #
|
||||
# #
|
||||
# This program is free software: you can redistribute it and/or modify it under #
|
||||
# the terms of the GNU General Public License as published by the Free Software #
|
||||
# Foundation, either version 3 of the License. You should have received a copy #
|
||||
# of the GNU General Public License along with this program. If not, visit #
|
||||
# #
|
||||
# https://www.gnu.org/licenses/ #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
|
||||
# FOR A PARTICULAR PURPOSE. See GNU General Public License for details. #
|
||||
|
||||
import numpy as np
|
||||
import openGJK_cython as opengjk
|
||||
|
||||
a = np.array([[1.,1.,1.],[1.,1.,1.]])
|
||||
b = np.array([[11.,1.,1.],[1.,1.,1.]])
|
||||
a = np.array([[1.0,1.0,1.0],[1.0,1.0,1.0]])
|
||||
b = np.array([[-1.,-1.,-1.],[-1.,-1.,-1.]])
|
||||
d = opengjk.pygjk(a,b)
|
||||
|
||||
print(d)
|
||||
print("Distance is:" , d)
|
|
@ -34,8 +34,7 @@ from Cython.Build import cythonize
|
|||
exts = Extension(
|
||||
"openGJK_cython",
|
||||
sources = ["openGJK_cython.pyx"],
|
||||
extra_compile_args=['-I../../include/','-fopenmp'],
|
||||
extra_link_args=['-fopenmp'],
|
||||
extra_compile_args=['-I../../include/']
|
||||
)
|
||||
|
||||
setup(
|
||||
|
|
Loading…
Reference in New Issue