Last active
August 29, 2015 13:57
-
-
Save tklein23/9730737 to your computer and use it in GitHub Desktop.
Small shell script that can be used to compile SHOGUN Machine Learning Toolbox http://www.shogun-toolbox.org/ before sending a pull request
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Taken from: https://gist.github.com/tklein23/9730737 | |
set -ex | |
NUM_CORES=$(grep '^processor\s*:\s*' /proc/cpuinfo |wc -l) | |
NUM_JOBS=$((NUM_CORES+3)) | |
BUILDDIR="$(pwd)/build-before-pr" | |
rm -rvf "$BUILDDIR/GoogleMock/" || : | |
rm -rv "$BUILDDIR" || : | |
mkdir "$BUILDDIR" | |
cd "$BUILDDIR" | |
cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTING=ON -DPythonModular=ON -DJavaModular=ON -DRModular=ON -DCmdLineStatic=ON -DPythonStatic=ON -DRStatic=ON -DCMAKE_INSTALL_PREFIX="$BUILDDIR/install" .. | |
rm -rvf ../third_party/libs/gmock/ | |
time make -j$NUM_JOBS GoogleMock shogun | |
time make -j$NUM_JOBS shogun-unit-test | |
echo -ne "\a" | |
time make -j$NUM_JOBS unit-tests | |
echo -ne "\a" | |
time make -j$NUM_JOBS all | |
time make -j$NUM_JOBS install | |
echo -ne "\a" | |
time make ARGS='--output-on-failure' -j$NUM_JOBS test | |
echo -ne "\a" | |
ls -la "$BUILDDIR"/src/shogun/libshogun.so.*.* "$BUILDDIR"/tests/unit/shogun-unit-test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment