Skip to content

Commit 8d0ffcc

Browse files
authored
Merge pull request #3 from Simple-Robotics/proyan-patch-1
CI for compile checking
2 parents dc9ee46 + df532b2 commit 8d0ffcc

File tree

7 files changed

+59
-71
lines changed

7 files changed

+59
-71
lines changed

.github/workflows/cmake.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: PyCppAD CI compilation
2+
3+
on: [push,pull_request]
4+
5+
env:
6+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
7+
BUILD_TYPE: Release
8+
9+
jobs:
10+
build:
11+
# The CMake configure and build commands are platform agnostic and should work equally
12+
# well on Windows or Mac. You can convert this to a matrix build if you need
13+
# cross-platform coverage.
14+
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
20+
- name: Install Dependencies
21+
run: |
22+
sudo apt install libboost-all-dev libeigen3-dev
23+
. /etc/os-release
24+
sudo tee /etc/apt/sources.list.d/robotpkg.list <<EOF
25+
deb [arch=amd64] http://robotpkg.openrobots.org/wip/packages/debian/pub $UBUNTU_CODENAME robotpkg
26+
deb [arch=amd64] http://robotpkg.openrobots.org/packages/debian/pub $UBUNTU_CODENAME robotpkg
27+
EOF
28+
curl http://robotpkg.openrobots.org/packages/debian/robotpkg.key | sudo apt-key add -
29+
sudo apt update
30+
sudo apt install robotpkg-cppad robotpkg-py38-eigenpy
31+
32+
- name: Configure CMake
33+
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
34+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
35+
run: |
36+
git submodule update --init
37+
export PATH=$PATH:/opt/openrobots/bin
38+
export PYTHONPATH=$PYTHONPATH:/opt/openrobots/lib/python3/site-packages:/opt/openrobots/lib/python3/dist-packages
39+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/openrobots/lib64:/opt/openrobots/lib/x86_64-linux-gnu:/opt/openrobots/lib/plugin:/opt/openrobots/lib
40+
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/openrobots/lib/pkgconfig:/opt/openrobots/share/pkgconfig:/opt/openrobots/lib/x86_64-linux-gnu/pkgconfig:/opt/openrobots/lib64/pkgconfig
41+
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DPYTHON_EXECUTABLE=$(which python3) -DCMAKE_PREFIX_PATH=/opt/openrobots
42+
43+
- name: Build
44+
# Build your program with the given configuration
45+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
46+
47+
# - name: Test
48+
# working-directory: ${{github.workspace}}/build
49+
# Execute tests defined by the CMake configuration.
50+
# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
51+
# run: ctest -C ${{env.BUILD_TYPE}}
52+

.github/workflows/conda/environment.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/macos-linux-conda.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ EXPORT_BOOST_DEFAULT_OPTIONS()
4242

4343
ADD_PROJECT_DEPENDENCY(cppad 20180000.0 REQUIRED PKG_CONFIG_REQUIRES "cppad >= 20180000.0")
4444
ADD_PROJECT_DEPENDENCY(Eigen3 REQUIRED PKG_CONFIG_REQUIRES "eigen3 >= 3.0.5")
45-
ADD_PROJECT_DEPENDENCY(eigenpy 2.6.7 REQUIRED)
45+
ADD_PROJECT_DEPENDENCY(eigenpy 2.6.6 REQUIRED)
4646

4747
OPTION(BUILD_CODEGEN_BINDINGS "Build the python bindings for code generation (via CppADCodeGen)" OFF)
4848

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ PyCppAD — Python bindings for CppAD Automatic Differentiation library
77

88
**PyCppAD** is an open source framework which provides bindings for the CppAD Automatic Differentiation([CppAD](https://coin-or.github.io/CppAD/doc/cppad.htm)) C++ library in Python.
99
**PyCppAD** also includes support for the CppADCodeGen ([CppADCodeGen](https://github.com/joaoleal/CppADCodeGen)), C++ library, which exploits CppAD functionality to perform code generation.
10+
11+
## Acknowledgments
12+
13+
The development of **PyCppAD** is supported by the [Willow team](https://www.di.ens.fr/willow/) [@INRIA](http://www.inria.fr).

include/pycppad/ad_fun.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace pycppad
3434
cl
3535
.def("__init__",
3636
bp::make_constructor(&constructor,bp::default_call_policies(),bp::args("x","y")))
37-
.def("swap", &ADFun::swap, bp::args("self", "f"))
37+
//.def("swap", &ADFun::swap, bp::args("self", "f"))
3838
.def("from_json", &ADFun::from_json, bp::args("self", "json"))
3939
//.def("from_graph", &ADFun::from_graph, bp::args("self", "graph_obj"))
4040
.def("to_json", &ADFun::to_json, bp::arg("self"))

python/main.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212

1313
BOOST_PYTHON_MODULE(pycppad)
1414
{
15-
enum { Options = 0 };
1615

1716
eigenpy::enableEigenPy();
1817
pycppad::enablePyCppAD();
19-
};
18+
}

0 commit comments

Comments
 (0)