This repository has been archived by the owner on Nov 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
/
.travis.yml
60 lines (60 loc) · 1.77 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
sudo: false
language: c
compiler:
- gcc
env:
- TORCH_LUA_VERSION=LUAJIT21
- TORCH_LUA_VERSION=LUA51
- TORCH_LUA_VERSION=LUA52
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- cmake
- gfortran
- gcc-multilib
- gfortran-multilib
- liblapack-dev
- build-essential
- gcc-4.8
- g++-4.8
- clang
- curl
- cmake
- libreadline-dev
- git-core
- libjpeg-dev
- libpng-dev
- ncurses-dev
- imagemagick
- libzmq3-dev
- gfortran
- unzip
- gnuplot
- gnuplot-x11
before_script:
- export ROOT_TRAVIS_DIR=$(pwd)
- export INSTALL_PREFIX=~/torch/install
- cd /tmp/
- git clone https://github.com/xianyi/OpenBLAS.git -b master
- cd OpenBLAS
- make clean
- make USE_THREAD=0 USE_THREADS=0 USE_OPENMP=0 NO_AFFINITY=1 -j$(getconf _NPROCESSORS_ONLN)
- make PREFIX=$HOME/OpenBlasInstall install
- if [ "$CC" = "gcc" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
- 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
- git clone https://github.com/torch/xlua && cd xlua && ${INSTALL_PREFIX}/bin/luarocks make xlua-1.1-0.rockspec
- if [[ $TORCH_LUA_VERSION != 'LUAJIT21' && $TORCH_LUA_VERSION != 'LUAJIT20' ]]; then ${INSTALL_PREFIX}/bin/luarocks install luaffi; fi
- cd $ROOT_TRAVIS_DIR
- export LD_LIBRARY_PATH=${INSTALL_PREFIX}/lib:$LD_LIBRARY_PATH
script:
- ${INSTALL_PREFIX}/bin/luarocks make
- export PATH=${INSTALL_PREFIX}/bin:$PATH
- export OMP_NUM_THREADS=1
- th test/test.lua