|
| 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 | + |
0 commit comments