Przeglądaj źródła

Do not build with tensorflow by default

Signed-off-by: Vadim Markovtsev <vadim@sourced.tech>
Vadim Markovtsev 6 lat temu
rodzic
commit
6b3591e82e
4 zmienionych plików z 13 dodań i 10 usunięć
  1. 0 1
      .appveyor.yml
  2. 4 4
      .travis.yml
  3. 1 3
      Makefile
  4. 8 2
      README.md

+ 0 - 1
.appveyor.yml

@@ -18,7 +18,6 @@ build_script:
   - set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
   - set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
   - cd %GOPATH%\src\gopkg.in\src-d\hercules.v5
   - cd %GOPATH%\src\gopkg.in\src-d\hercules.v5
   - go get -v github.com/golang/dep/cmd/dep
   - go get -v github.com/golang/dep/cmd/dep
-  - set DISABLE_TENSORFLOW=1
   - make
   - make
   - 7z a c:\gopath\src\gopkg.in\src-d\hercules.v5\hercules.win64.zip %GOPATH%\bin\hercules.exe
   - 7z a c:\gopath\src\gopkg.in\src-d\hercules.v5\hercules.win64.zip %GOPATH%\bin\hercules.exe
 
 

+ 4 - 4
.travis.yml

@@ -38,7 +38,7 @@ stages:
     if: tag =~ .*
     if: tag =~ .*
 
 
 env:
 env:
-  - PROTOC_VERSION=3.6.0 TENSORFLOW_VERSION=1.8.0
+  - PROTOC_VERSION=3.6.0 TENSORFLOW_VERSION=1.11.0
 
 
 before_install:
 before_install:
   - wget -O protoc.zip https://github.com/google/protobuf/releases/download/v$PROTOC_VERSION/protoc-$PROTOC_VERSION-linux-x86_64.zip
   - wget -O protoc.zip https://github.com/google/protobuf/releases/download/v$PROTOC_VERSION/protoc-$PROTOC_VERSION-linux-x86_64.zip
@@ -58,7 +58,7 @@ before_install:
   - sudo ldconfig
   - sudo ldconfig
 install:
 install:
   - git clean -xfd
   - git clean -xfd
-  - make
+  - make TAGS=tensorflow
 script:
 script:
   - set -e
   - set -e
   - if [ $TRAVIS_GO_VERSION = "1.11.*" ]; then test -z "$(gofmt -s -l . | grep -v vendor/)"; fi
   - if [ $TRAVIS_GO_VERSION = "1.11.*" ]; then test -z "$(gofmt -s -l . | grep -v vendor/)"; fi
@@ -101,7 +101,7 @@ jobs:
         - gzip -S .darwin_amd64.gz $GOPATH/bin/hercules
         - gzip -S .darwin_amd64.gz $GOPATH/bin/hercules
       script: skip
       script: skip
       install:
       install:
-        - DISABLE_TENSORFLOW=1 make
+        - make
       deploy:
       deploy:
         provider: releases
         provider: releases
         api_key:
         api_key:
@@ -121,7 +121,7 @@ jobs:
         - export PATH=$GOPATH/bin:$PATH
         - export PATH=$GOPATH/bin:$PATH
       script: skip
       script: skip
       install:
       install:
-        - DISABLE_TENSORFLOW=1 make
+        - make
       after_success:
       after_success:
         - gzip -S .linux_amd64.gz $GOPATH/bin/hercules
         - gzip -S .linux_amd64.gz $GOPATH/bin/hercules
       deploy:
       deploy:

+ 1 - 3
Makefile

@@ -5,9 +5,7 @@ else
 EXE = .exe
 EXE = .exe
 endif
 endif
 PKG = $(shell go env GOOS)_$(shell go env GOARCH)
 PKG = $(shell go env GOOS)_$(shell go env GOARCH)
-ifneq (${DISABLE_TENSORFLOW},1)
-TAGS ?= tensorflow
-endif
+TAGS ?=
 BBLFSH_DEP =
 BBLFSH_DEP =
 
 
 all: ${GOPATH}/bin/hercules${EXE}
 all: ${GOPATH}/bin/hercules${EXE}

+ 8 - 2
README.md

@@ -65,8 +65,6 @@ make
 ```
 ```
 
 
 Replace `$GOPATH` with `%GOPATH%` on Windows.
 Replace `$GOPATH` with `%GOPATH%` on Windows.
-By default the build requires [`libtensorflow`](https://www.tensorflow.org/install/install_go).
-Disable the analyses which require Tensorflow with `DISABLE_TENSORFLOW=1 make`.
 
 
 ## Contributions
 ## Contributions
 
 
@@ -278,6 +276,14 @@ E.g. [`sadly, we need to hide the rect from the documentation finder for now`](h
 is positive. Don't expect too much though - as was written, the sentiment model is
 is positive. Don't expect too much though - as was written, the sentiment model is
 general purpose and the code comments have different nature, so there is no magic (for now).
 general purpose and the code comments have different nature, so there is no magic (for now).
 
 
+Hercules must be built with "tensorflow" tag - it is not by default:
+
+```
+make TAGS=tensorflow
+```
+
+Such a build requires [`libtensorflow`](https://www.tensorflow.org/install/install_go).
+
 #### Everything in a single pass
 #### Everything in a single pass
 
 
 ```
 ```