mlpack/examples:.travis.yml@04bb14f
sudo: required
dist: xenial
language: cpp
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq --no-install-recommends cmake binutils-dev libopenblas-dev liblapack-dev build-essential libboost-all-dev g++-multilib
- mkdir deps/
- cd deps/
# Install Armadillo 8.400.0 (the oldest supported version).
- curl -O http://www.ratml.org/misc/armadillo-8.400.0.tar.gz -o armadillo-8.400.0.tar.gz
- tar xvzf armadillo-8.400.0.tar.gz
- cd armadillo-8.400.0
- cmake -DCMAKE_INSTALL_PREFIX=/usr .
- make
- sudo make install
# Build and install the latest version of ensmallen.
- cd $TRAVIS_BUILD_DIR
- curl -O http://www.ensmallen.org/files/ensmallen-latest.tar.gz -o ensmallen-latest.tar.gz
- tar xvzf ensmallen-latest.tar.gz
- cd ensmallen-*/
- mkdir build
- cd build
- cmake -DBUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=/usr ../
- make
- sudo make install
- cd ../
# Install cereal.
- cd $TRAVIS_BUILD_DIR
- wget https://github.com/USCiLab/cereal/archive/v1.3.0.tar.gz
- tar -xvzpf v1.3.0.tar.gz
- cd cereal-1.3.0
- cmake -DCMAKE_INSTALL_PREFIX=/usr .
- make
- sudo make install
- cd $TRAVIS_BUILD_DIR
- sudo rm -rf cereal-1.3.0
# Build mlpack.
- cd $TRAVIS_BUILD_DIR
- git clone https://github.com/mlpack/mlpack.git --depth 1
- cd mlpack
- mkdir build
- cd build
- cmake -DCMAKE_INSTALL_PREFIX=/usr -DUSE_OPENMP=OFF -DBUILD_CLI_EXECUTABLES=OFF -DBUILD_JULIA_BINDINGS=OFF -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_MARKDOWN_BINDINGS=OFF -DBUILD_R_BINDINGS=OFF -DBUILD_TESTS=OFF ..
- make -j2
- sudo make install
- cd ../
# Leave deps/.
- cd ../
install:
# Download datasets.
- pwd
- pip install tqdm
- cd tools/
- ./download_data_set.py
- cd ../
- ls data/
script:
# Finally, build all the examples.
- pwd
- ls
- ls data/
- |
for f in */Makefile; do
dir=`dirname $f`;
# TODO: this takes too long right now.
if [ "$dir" == "mnist_cnn" ];
then
continue;
fi
# TODO: the dataset cannot be loaded.
if [ "$dir" == "mnist_vae_cnn" ];
then
continue;
fi
cd $dir;
target_name=`grep 'TARGET := ' Makefile | awk -F ' := ' '{ print $2 }'`;
echo "Make target $target_name in directory $dir.";
make;
# Filter out "epoch in progress" lines.
./$target_name | grep -v -- '\.] ';
if [ "${PIPESTATUS[0]}" != "0" ]; then
echo "Example failed: $dir"
echo "Example failed: $dir" >> ../faillog;
else
echo "Example succeeded; ${PIPESTATUS[0]}, ${PIPESTATUS[1]}";
fi
cd ../;
done
# Print any failures.
- ls
- |
if [ -f faillog ]; then
echo "Some examples failed!";
echo "";
cat faillog;
exit 1;
fi
notifications:
email:
- mlpack-git@lists.mlpack.org
irc:
channels:
- "chat.freenode.net#mlpack"
on_success: change
on_failure: always
Build Config
{
"os": [
"linux"
],
"env": {
"global": [
"COVERAGE=1"
],
"matrix": [
"INTEGRATION_SPECS=0",
"INTEGRATION_SPECS=1"
]
},
"rvm": [
"2.5.1"
],
"dist": "trusty",
"sudo": false,
"cache": {
"bundler": true,
"directories": [
"$HOME/.rvm"
]
},
"language": "ruby",
"services": [
"redis-server"
],
"before_script": [
"source .example.env"
],
"notifications": {
"email": {
"enabled": false
}
},
"before_install": [
"gem install bundler"
]
}