Skip to content

Commit

Permalink
Merge pull request #9 from traversaro/traversaro-patch-1
Browse files Browse the repository at this point in the history
Enable tests on Linux, macOS and Windows
  • Loading branch information
traversaro authored Apr 3, 2021
2 parents c461e7c + 88d94b0 commit d02beed
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
4 changes: 4 additions & 0 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cmake -G "Ninja" ^
-DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
-DDART_MSVC_DEFAULT_OPTIONS=ON ^
-DDART_VERBOSE=ON ^
-DBUILD_TESTING:BOOL=ON ^
%SRC_DIR%

echo "Print CMakeOutput:"
Expand All @@ -19,3 +20,6 @@ if errorlevel 1 exit 1

ninja install
if errorlevel 1 exit 1

ctest --output-on-failure
if errorlevel 1 exit 1
24 changes: 20 additions & 4 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,28 @@

mkdir build && cd build

if [ ${target_platform} == "linux-ppc64le" ]; then
# Disable tests
CMAKE_TEST_CMD=-DBUILD_TESTING:BOOL=OFF
NUM_PARALLEL=-j1
else
CMAKE_TEST_CMD=-DBUILD_TESTING:BOOL=ON
NUM_PARALLEL=-j${CPU_COUNT}
fi

cmake -DCMAKE_INSTALL_PREFIX=$PREFIX \


cmake $SRC_DIR \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_PREFIX_PATH=$PREFIX \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_LIBDIR=lib \
$SRC_DIR
${CMAKE_TEST_CMD}

make ${NUM_PARALLEL}
make ${NUM_PARALLEL} install

make -j${CPU_COUNT}
make install
if [ ${target_platform} != "linux-ppc64le" ]; then
make ${NUM_PARALLEL} tests
ctest --output-on-failure -E "test_Collision"
fi
2 changes: 1 addition & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ source:
- ode-required.patch

build:
number: 4
number: 5
run_exports:
- {{ pin_subpackage(name, max_pin='x.x') }}

Expand Down

0 comments on commit d02beed

Please sign in to comment.