Skip to content

Commit d068c90

Browse files
authored
Merge pull request #18 from pariterre/master
Travis for Biorbd!
2 parents e2b8cba + 8c32962 commit d068c90

File tree

2 files changed

+71
-1
lines changed

2 files changed

+71
-1
lines changed

.travis.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
language: cpp
2+
matrix:
3+
include:
4+
- os: linux
5+
dist: trusty
6+
compiler: gcc
7+
env:
8+
- COMPILER=g++-7
9+
- os: osx
10+
osx_image: xcode7.2
11+
compiler: gcc
12+
env:
13+
- COMPILER=g++-7
14+
- os: windows
15+
16+
addons:
17+
apt:
18+
packages: [g++, valgrind, python-yaml, lcov, cmake]
19+
20+
21+
before_install:
22+
# Combine global build options with OS/compiler-dependent options
23+
- export CMAKE_OPTIONS=${CMAKE_OPTIONS}" "${ENV_CMAKE_OPTIONS}
24+
- export CXX_FLAGS=${CXX_FLAGS}" "${ENV_CXX_FLAGS}
25+
26+
# Add stuff for Python3 tests as well
27+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
28+
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
29+
bash miniconda.sh -b -p $HOME/miniconda;
30+
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
31+
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
32+
bash miniconda.sh -b -p $HOME/miniconda;
33+
elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
34+
choco install miniconda3 --params="'/AddToPath:1'";
35+
export PATH="/c/tools/miniconda3/scripts:/c/tools/miniconda3/:$PATH";
36+
fi
37+
- export PATH="$HOME/miniconda/bin:$PATH"
38+
- hash -r
39+
- conda config --set always_yes yes --set changeps1 no
40+
- conda config --set auto_update_conda no
41+
- if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then conda update -q conda; fi
42+
- source activate
43+
44+
install:
45+
# Install test packages for Python3
46+
- conda install python pytest numpy swig
47+
- conda install boost eigen
48+
- conda install dlib rbdl -cpyomeca
49+
50+
script:
51+
############################################################################
52+
# Build main and tests
53+
############################################################################
54+
# Download, compile and test core
55+
- mkdir -p build
56+
- cd build
57+
# Test if biorbd can be compile with the python binder
58+
- if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then
59+
cmake ${CMAKE_OPTIONS} -DCMAKE_INSTALL_PREFIX=$HOME/miniconda/ -DCMAKE_CXX_FLAGS=${CXX_FLAGS} -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DBUILD_DOC=OFF -DBUILD_EXAMPLE=OFF -DBINDER_PYTHON3=ON ..;
60+
make install;
61+
else
62+
cmake -G"Visual Studio 15 2017 Win64" -DCMAKE_INSTALL_PREFIX=$ToolsDir/miniconda3/ -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DBUILD_DOC=OFF -DBUILD_EXAMPLE=OFF -DBINDER_PYTHON3=ON ..;
63+
cmake --build ./ --config Release --target install;
64+
fi
65+
66+
notifications:
67+
email:
68+
on_success: never
69+
on_failure: always
70+

binding/matlab/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRU
4747

4848
# Linker and instalation
4949
target_link_libraries(${PROJECT_NAME} ${MASTER_PROJECT_NAME} ${Matlab_MX_LIBRARY} ${Matlab_MEX_LIBRARY})
50-
set(Matlab_${MASTER_PROJECT_NAME}_INSTALL_DIR ${Matlab_ROOT_DIR}/toolbox CACHE FILEPATH "Toolbox path to install, please note that the default directory may require administrator access")
50+
set(Matlab_${MASTER_PROJECT_NAME}_INSTALL_DIR ${Matlab_ROOT_DIR}/toolbox CACHE PATH "Toolbox path to install, please note that the default directory may require administrator access")
5151
install(TARGETS ${PROJECT_NAME} DESTINATION ${Matlab_${MASTER_PROJECT_NAME}_INSTALL_DIR}/${PROJECT_NAME})
5252

5353

0 commit comments

Comments
 (0)