Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use binary sources for CI #71

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
43 changes: 17 additions & 26 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-16.04, ubuntu-18.04, macos-latest, windows-latest]
os: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, macos-latest, windows-latest]
build-type: [Debug, RelWithDebInfo]
compiler: [gcc, clang]
exclude:
Expand All @@ -44,47 +44,38 @@ jobs:

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Cleanup windows environment
shell: bash
run: |
set -x
rm -rf /c/hostedtoolcache/windows/Boost/1.72.0/lib/cmake/Boost-1.72.0
if: matrix.os == 'windows-latest'
- name: Install dependencies
uses: jrl-umi3218/github-actions/install-dependencies@master
with:
compiler: ${{ matrix.compiler }}
build-type: ${{ matrix.build-type }}
ubuntu: |
apt: cython cython3 python-nose python3-nose python-numpy python3-numpy python-coverage python3-coverage python-setuptools python3-setuptools libeigen3-dev doxygen doxygen-latex libboost-all-dev libtinyxml2-dev libyaml-cpp-dev
apt: cython cython3 python-nose python3-nose python-numpy python3-numpy python-coverage python3-coverage python-setuptools python3-setuptools doxygen doxygen-latex libboost-all-dev libeigen-qld-dev libsch-core-dev librbdyn-dev python-eigen-qld python3-eigen-qld python-sch-core python3-sch-core python-rbdyn python3-rbdyn
apt-mirrors:
multi-contact:
mirror: https://dl.bintray.com/gergondet/multi-contact-head
key: 892EA6EE273707C6495A6FB6220D644C64666806
macos: |
cask: gfortran
brew: eigen boost tinyxml2 yaml-cpp
pip: Cython coverage nose numpy
vcpkg:
repo: jrl-umi3218/vcpkg
user: ${{ github.actor }}
token: ${{ github.token }}
windows: |
pip: Cython coverage nose numpy
github:
- path: eigenteam/eigen-git-mirror
ref: 3.3.7
- path: leethomason/tinyxml2
ref: 7.1.0
- path: jbeder/yaml-cpp
ref: 29dcf92f870ee51cce8d68f8fcfe228942e8dfe1
github: |
- path: jrl-umi3218/Eigen3ToPython
- path: jrl-umi3218/SpaceVecAlg
- path: jrl-umi3218/sch-core
- path: jrl-umi3218/eigen-qld
- path: jrl-umi3218/sch-core-python
- path: jrl-umi3218/RBDyn
vcpkg:
repo: jrl-umi3218/vcpkg
user: ${{ github.actor }}
token: ${{ github.token }}
- name: Build and test
uses: jrl-umi3218/github-actions/build-cmake-project@master
with:
compiler: ${{ matrix.compiler }}
build-type: ${{ matrix.build-type }}
windows-options: -DPYTHON_BINDING:BOOL=OFF
macos-options: -DPYTHON_BINDING:BOOL=OFF
- name: Upload documentation
# Only run on master branch and for one configuration
if: matrix.os == 'ubuntu-18.04' && matrix.build-type == 'RelWithDebInfo' && matrix.compiler == 'gcc' && github.ref == 'refs/heads/master'
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
types:
- package-master
- package-release
pull_request:
branches:
- "**"
push:
paths-ignore:
- doc/**
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/sources/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ name: Package Tasks
on:
repository_dispatch:
types: [package-master, package-release]
pull_request:
branches:
- "**"
push:
paths-ignore:
# Changes to those files don't mandate rebuilding a package
Expand Down
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ endif()
# of the main library when launching ctest with RUN_TESTS
if(MSVC)
set(CMAKE_MSVCIDE_RUN_PATH "\$(SolutionDir)/src/\$(Configuration)")
if(_VCPKG_INSTALLED_DIR)
set(VCPKG_INSTALL_PREFIX "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_PREFIX}")
# Only debug actually exists but we make sure it's first in that case
set(CMAKE_MSVCIDE_RUN_PATH "${VCPKG_INSTALL_PREFIX}/\$(Configuration)/bin;${VCPKG_INSTALL_PREFIX}/bin;${CMAKE_MSVCIDE_RUN_PATH}")
endif()
endif(MSVC)

add_subdirectory(src)
Expand Down
2 changes: 1 addition & 1 deletion src/QPContactConstr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void ContactConstr::ContactData::update(const std::vector<rbd::MultiBodyConfig>
auto X_b1_b2_current = X_0_b2 * X_0_b1.inv();
auto X_b2_cf_current = X_b1_cf * X_b1_b2_current.inv();
// Only apply the motion allowed by the DoF selection
auto error = revDof * sva::transformError(X_b2_cf_current.inv(), X_b2_cf.inv()).vector();
Eigen::Vector6d error = revDof * sva::transformError(X_b2_cf_current.inv(), X_b2_cf.inv()).vector();
auto offset = sva::PTransformd(sva::RotX(error(0)) * sva::RotY(error(1)) * sva::RotZ(error(2)),
Eigen::Vector3d(error(3), error(4), error(5)));
X_b2_cf = offset * X_b2_cf;
Expand Down
5 changes: 3 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
enable_testing()

find_package(Boost REQUIRED COMPONENTS unit_test_framework timer system)
add_definitions(-DBOOST_TEST_DYN_LINK)

set(HEADERS arms.h)

macro(addUnitTest name)
add_executable(${name} ${name}.cpp ${HEADERS})
target_link_libraries(${name} PRIVATE Tasks Boost::unit_test_framework)
target_compile_definitions(${name} PRIVATE -DBOOST_TEST_DYN_LINK)
if(NOT Boost_USE_STATIC_LIBS)
target_compile_definitions(${name} PRIVATE -DBOOST_ALL_DYN_LINK)
endif()
add_test(${name}Unit ${name})
# Adding a project configuration file (for MSVC only)
generate_msvc_dot_user_file(${name})
Expand Down
13 changes: 13 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "tasks",
"version-string": "1.3.0",
"homepage": "https://github.com/jrl-umi3218/Tasks",
"description": "Real time control of robots using constrained optimization",
"dependencies": [
"boost-test",
"boost-timer",
"eigen-qld",
"rbdyn",
"sch-core"
]
}