diff --git a/tooling/scripts/build_and_test_all.sh b/tooling/scripts/build_and_test_all.sh index 0318b80ae..84c4707f0 100755 --- a/tooling/scripts/build_and_test_all.sh +++ b/tooling/scripts/build_and_test_all.sh @@ -7,11 +7,16 @@ if [ "$CI" ]; then flags="--no-status --force-color" fi +# Enter wavemap's home directory +pushd "$(dirname "$0")/../../" >> /dev/null || exit 1 + +# Build all ROS1 packages, including the ROS examples # shellcheck disable=SC2086 catkin build wavemap_all $flags # shellcheck disable=SC2086 catkin build wavemap_all $flags --no-deps --catkin-make-args tests +# Run all ROS1 tests, which indirectly also runs the C++ API's tests pushd "$(catkin locate --devel wavemap)/../.." >> /dev/null || exit 1 all_tests_passed=1 for f in lib/wavemap*/test_*; do @@ -23,3 +28,12 @@ if [ $all_tests_passed -ne 1 ]; then echo "Not all tests passed!" exit 1 fi + +# Build and test the Python API +python3 -m pip install -v ./library/python/ +pytest -rAv ./library/python/ + +# Build the C++ examples +pushd examples/cpp >> /dev/null || exit 1 +cmake -S . -B build -DCMAKE_BUILD_TYPE=Release +cmake --build build --parallel