Skip to content

Commit

Permalink
Merge pull request #26 from RTradeLtd/mod
Browse files Browse the repository at this point in the history
mod: add go.mod
  • Loading branch information
bobheadxi authored Apr 26, 2019
2 parents a067b1d + 403b182 commit 50cba36
Show file tree
Hide file tree
Showing 36 changed files with 718 additions and 1,006 deletions.
19 changes: 9 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
language: go
go:
- "1.11"
- "1.12"
services:
- docker
compiler:
- gcc
env:
- TF_VERSION=linux-x86_64-1.12.0 LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
global:
- TF_VERSION=linux-x86_64-1.12.0 LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
- GO111MODULE=on

install:
# tesseract
- bash setup/scripts/tesseract_install.sh
# tensorflow
- bash setup/scripts/tensorflow_install.sh
# golang dependencies
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- go get -u golang.org/x/lint/golint
- go get -u -v -tags nopie github.com/gen2brain/go-fitz # https://github.com/gen2brain/go-fitz#build-tags
- dep ensure -v
# golang dependencies - run separately, to make sure we get the right tags
# see https://github.com/gen2brain/go-fitz#build-tags
- go get -u -v -tags nopie github.com/gen2brain/go-fitz

before_script:
- go vet -tags nopie ./...
Expand All @@ -27,9 +27,8 @@ before_script:

script:
- go fmt ./...
- golint $(go list ./... | grep -v /vendor/) # golint doesn't ignore vendor
#- go test -tags nopie -race -short -coverprofile=coverage.txt ./...
- go test -tags nopie -short -coverprofile=coverage.txt ./...
- go run golang.org/x/lint/golint $(go list ./... | grep -v /vendor/) # golint doesn't ignore vendor
- go test -tags nopie -race -short -coverprofile=coverage.txt ./...

after_success:
- bash <(curl -s https://codecov.io/bash)
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARG LENSVERSION
ARG TENSORFLOW_DIST

# Mount source code
ENV BUILD_HOME=/go/src/github.com/RTradeLtd/Lens
ENV BUILD_HOME=/go/src/github.com/RTradeLtd/Lens GO111MODULE=on
ADD . ${BUILD_HOME}
WORKDIR ${BUILD_HOME}

Expand All @@ -19,8 +19,7 @@ ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
## Tesseract
RUN bash setup/scripts/tesseract_install.sh
## Golang dependencies
RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
RUN dep ensure -v
RUN go mod vendor
## Go-fitz
RUN go get -u -tags gcc7 github.com/gen2brain/go-fitz

Expand Down
Loading

0 comments on commit 50cba36

Please sign in to comment.