forked from mlpack/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
119 lines (105 loc) · 2.89 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
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:
irc:
channels:
- "chat.freenode.net#mlpack"
on_success: change
on_failure: always