This repository has been archived by the owner on Jul 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
.travis.yml
70 lines (67 loc) · 2.22 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
language: c
os: linux
compiler:
- gcc
cache:
directories:
- $HOME/OpenBlasInstall
sudo: false
env:
- TORCH_LUA_VERSION=LUA51
branches:
only:
- master
addons:
apt:
packages:
- cmake
- curl
- g++
- gcc
- gcc-multilib
- git-core
- libreadline-dev
- ncurses-dev
- unzip
- build-essential
- cmake
- curl
- g++
- gfortran
- gfortran-multilib
- git-core
- liblapack-dev
- libpng-dev
before_script:
- echo "==== Building OpenBlas ==== "
- export ROOT_TRAVIS_DIR=$(pwd)
- export INSTALL_PREFIX=~/torch/install
- ls $HOME/OpenBlasInstall/lib || (cd /tmp/ && git clone https://github.com/xianyi/OpenBLAS.git -b master && cd OpenBLAS && (make NO_AFFINITY=1 -j$(getconf _NPROCESSORS_ONLN) 2>/dev/null >/dev/null) && make PREFIX=$HOME/OpenBlasInstall install)
- echo "==== Building torch ===="
- git clone https://github.com/torch/distro.git ~/torch --recursive
- cd ~/torch && git submodule update --init --recursive
- mkdir build && cd build
- export CMAKE_LIBRARY_PATH=$HOME/OpenBlasInstall/include:$HOME/OpenBlasInstall/lib:$CMAKE_LIBRARY_PATH
- cmake .. -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" -DCMAKE_BUILD_TYPE=Release -DWITH_${TORCH_LUA_VERSION}=ON
- make && make install
- ${INSTALL_PREFIX}/bin/luarocks install logroll
- ${INSTALL_PREFIX}/bin/luarocks install lpeg
- ${INSTALL_PREFIX}/bin/luarocks install json
- ${INSTALL_PREFIX}/bin/luarocks install luasocket
- ${INSTALL_PREFIX}/bin/luarocks install dok
- ${INSTALL_PREFIX}/bin/luarocks install util
- ${INSTALL_PREFIX}/bin/luarocks install luaffi
- ${INSTALL_PREFIX}/bin/luarocks install luabitop
- ${INSTALL_PREFIX}/bin/luarocks install sundown
- cd $ROOT_TRAVIS_DIR
- export LD_LIBRARY_PATH=${INSTALL_PREFIX}/lib:$LD_LIBRARY_PATH
- export PATH=${INSTALL_PREFIX}/bin:$PATH
- echo "==== Building torch-dokx, using luarocks ===="
- ${INSTALL_PREFIX}/bin/luarocks make
- echo "==== Building torch-dokx with documentation, using doxk-luarocks ===="
- ${INSTALL_PREFIX}/bin/dokx-luarocks make
script: 'for x in tests/test*.lua ; do echo "==== $x ====" ; th $x ; done'
notifications:
email:
on_success: change
on_failure: always