Unverified Commit 275fd43a authored by Justin Carpentier's avatar Justin Carpentier Committed by GitHub
Browse files

Merge pull request #228 from jcarpent/devel

Add CI for OSX
parents 503d7d6e c3e322eb
Pipeline #14073 passed with stage
in 12 minutes and 31 seconds
name: CI - EigenPy for Mac OS X/Linux via Conda
on: [push,pull_request]
jobs:
eigenpy-conda:
name: CI - EigenPy on ${{ matrix.os }} via Conda
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
steps:
- uses: actions/checkout@v2
- name: Checkout submodules
run: |
git submodule update --init
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: eigenpy
auto-update-conda: true
environment-file: .github/workflows/conda/environment.yml
python-version: 3.8
- name: Install cmake and update conda
shell: bash -l {0}
run: |
conda activate eigenpy
conda install cmake -c main
- name: Build EigenPy
shell: bash -l {0}
run: |
conda activate eigenpy
echo $CONDA_PREFIX
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$(which python3)
make
make build_tests
export CTEST_OUTPUT_ON_FAILURE=1
make test
make install
- name: Uninstall EigenPy
shell: bash -l {0}
run: |
cd build
make uninstall
Subproject commit ef309d5a23037324b48749ab8faf30846dc0e7f0
Subproject commit 3a52692a40839b10f38352c1b06ccfebc0b53f36
......@@ -21,10 +21,10 @@
#if defined _WIN32 || defined __CYGWIN__
#define EIGENPY_GET_PY_ARRAY_TYPE(array) \
call_PyArray_ObjectType(reinterpret_cast<PyObject *>(array), 0)
call_PyArray_MinScalarType(array)->type_num
#else
#define EIGENPY_GET_PY_ARRAY_TYPE(array) \
PyArray_ObjectType(reinterpret_cast<PyObject *>(array), 0)
PyArray_MinScalarType(array)->type_num
#endif
namespace eigenpy
......@@ -51,6 +51,10 @@ namespace eigenpy
EIGENPY_DLLAPI void call_PyArray_InitArrFuncs(PyArray_ArrFuncs * funcs);
EIGENPY_DLLAPI int call_PyArray_RegisterDataType(PyArray_Descr * dtype);
EIGENPY_DLLAPI int call_PyArray_RegisterCanCast(PyArray_Descr *descr, int totype, NPY_SCALARKIND scalar);
EIGENPY_DLLAPI PyArray_Descr * call_PyArray_MinScalarType(PyArrayObject *arr);
}
#else
#define call_PyArray_Check(py_obj) PyArray_Check(py_obj)
......@@ -59,8 +63,10 @@ namespace eigenpy
PyArray_New(py_type_ptr,nd,shape,np_type,NULL,data_ptr,0,options,NULL)
#define getPyArrayType() &PyArray_Type
#define call_PyArray_DescrFromType(typenum) PyArray_DescrFromType(typenum)
#define call_PyArray_MinScalarType(py_arr) PyArray_MinScalarType(py_arr)
#define call_PyArray_InitArrFuncs(funcs) PyArray_InitArrFuncs(funcs)
#define call_PyArray_RegisterDataType(dtype) PyArray_RegisterDataType(dtype)
#define call_PyArray_RegisterDataType(dtype) PyArray_RegisterDataType(dtype)
#define call_PyArray_RegisterCanCast(descr,totype,scalar) PyArray_RegisterCanCast(descr,totype,scalar)
#endif
#endif // ifndef __eigenpy_numpy_hpp__
......@@ -198,6 +198,9 @@ namespace eigenpy
copyswap, copyswapn,
dotfunc);
call_PyArray_RegisterCanCast(call_PyArray_DescrFromType(NPY_OBJECT),
code, NPY_NOSCALAR);
return code;
}
......
......@@ -58,6 +58,16 @@ namespace eigenpy
{
return PyArray_RegisterDataType(dtype);
}
PyArray_Descr * call_PyArray_MinScalarType(PyArrayObject * arr)
{
return PyArray_MinScalarType(arr);
}
int call_PyArray_RegisterCanCast(PyArray_Descr *descr, int totype, NPY_SCALARKIND scalar)
{
return PyArray_RegisterCanCast(descr,totype,scalar);
}
#endif
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment