travis
This commit is contained in:
parent
41c1d91a64
commit
84c19a32ec
32
.travis.yml
32
.travis.yml
|
@ -13,24 +13,34 @@ branches:
|
|||
dist: bionic
|
||||
|
||||
before_install:
|
||||
- ls -la
|
||||
- sudo apt-get install clang-tools-9
|
||||
- GOTCH="./"
|
||||
- export LIBTORCH_VERSION="${LIBTORCH_VER:-1.5.1}"
|
||||
- export LIBTORCH="$GOTCH/libtch/libtorch"
|
||||
- export LIBRARY_PATH="$LIBTORCH/lib"
|
||||
- export CPATH="$LIBTORCH/lib:$LIBTORCH/include:$LIBTORCH/include/torch/csrc:$LIBTORCH/include/torch/csrc/api/include"
|
||||
- export LD_LIBRARY_PATH="$LIBTORCH/lib"
|
||||
- GOTCH=${HOME}/sugarme/gotch
|
||||
- export LIBTORCH_VERSION=${LIBTORCH_VER:-1.5.1}
|
||||
- export LIBTORCH=${GOTCH}/libtch/libtorch
|
||||
- export LIBRARY_PATH=${LIBTORCH}/lib
|
||||
- export CPATH=${LIBTORCH}/lib:${LIBTORCH}/include:${LIBTORCH}/include/torch/csrc:${LIBTORCH}/include/torch/csrc/api/include
|
||||
- export LD_LIBRARY_PATH=${LIBTORCH}/lib
|
||||
|
||||
# Precompiled libtorch
|
||||
- sudo rm -rf $LIBTORCH
|
||||
- sudo mkdir -p $LIBTORCH
|
||||
- wget -O /tmp/libtorch-cxx11-abi-shared-with-deps-${LIBTORCH_VERSION}+cpu.zip https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-${LIBTORCH_VERSION}%2Bcpu.zip
|
||||
- sudo unzip /tmp/libtorch-cxx11-abi-shared-with-deps-${LIBTORCH_VERSION}+cpu.zip -d $GOTCH/libtch
|
||||
- sudo rm $GOTCH/libtch/lib.go
|
||||
- sudo cp $GOTCH/libtch/lib.go.cpu $GOTCH/libtch/lib.go
|
||||
- sudo mv $GOTCH/libtch/dummy_cuda_dependency.cpp $GOTCH/libtch/dummy_cuda_dependency.cpp.gpu
|
||||
- sudo mv $GOTCH/libtch/fake_cuda_dependency.cpp.cpu $GOTCH/libtch/fake_cuda_dependency.cpp
|
||||
- sudo unzip /tmp/libtorch-cxx11-abi-shared-with-deps-${LIBTORCH_VERSION}+cpu.zip -d ${GOTCH}/libtch
|
||||
- sudo rm ${GOTCH}/libtch/lib.go
|
||||
- sudo cp ${GOTCH}/libtch/lib.go.cpu ${GOTCH}/libtch/lib.go
|
||||
- sudo mv ${GOTCH}/libtch/dummy_cuda_dependency.cpp ${GOTCH}/libtch/dummy_cuda_dependency.cpp.gpu
|
||||
- sudo mv ${GOTCH}/libtch/fake_cuda_dependency.cpp.cpu ${GOTCH}/libtch/fake_cuda_dependency.cpp
|
||||
- cd $GOTCH
|
||||
- go install
|
||||
script:
|
||||
- printenv
|
||||
- GOTCH=${HOME}/sugarme/gotch
|
||||
- export LIBTORCH_VERSION=${LIBTORCH_VER:-1.5.1}
|
||||
- export LIBTORCH=${GOTCH}/libtch/libtorch
|
||||
- export LIBRARY_PATH=${LIBTORCH}/lib
|
||||
- export CPATH=${LIBTORCH}/lib:${LIBTORCH}/include:${LIBTORCH}/include/torch/csrc:${LIBTORCH}/include/torch/csrc/api/include
|
||||
- export LD_LIBRARY_PATH=${LIBTORCH}/lib
|
||||
- go test -v github.com/sugarme/gotch/tensor
|
||||
- go test -v github.com/sugarme/gotch/nn
|
||||
- go test -v github.com/sugarme/gotch/vision
|
||||
|
|
Loading…
Reference in New Issue
Block a user