Skip to content

Commit 5a75d8f

Browse files
authored
Merge pull request #92 from vmarkovtsev/v3
Update the CI
2 parents 0d4a50a + 9d2e3fa commit 5a75d8f

File tree

3 files changed

+24
-14
lines changed

3 files changed

+24
-14
lines changed

.travis.yml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ go:
2222
- 1.9.x
2323
- 1.10.x
2424
- tip
25+
cache:
26+
directories:
27+
- $HOME/.cache/pip
28+
- $HOME/gopath/src
29+
before_cache:
30+
- cd $HOME/gopath
31+
- rm -rf $HOME/gopath/src/gopkg.in/src-d/hercules.v3
2532

2633
matrix:
2734
fast_finish: true
@@ -33,31 +40,36 @@ stages:
3340
- deploy
3441

3542
env:
36-
- PROTOC_VERSION=3.5.1 TENSORFLOW_VERSION=1.7.0
43+
- PROTOC_VERSION=3.6.0 TENSORFLOW_VERSION=1.8.0
3744

3845
before_install:
3946
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 90
4047
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 90
4148
- wget -O protoc.zip https://github.com/google/protobuf/releases/download/v$PROTOC_VERSION/protoc-$PROTOC_VERSION-linux-x86_64.zip
4249
- unzip -d ~/.local protoc.zip && rm protoc.zip
4350
- go get -v github.com/golang/lint/golint
44-
- git clone --depth 1 https://github.com/src-d/go-git $GOPATH/src/gopkg.in/src-d/go-git.v4
51+
- rm -rf $GOPATH/src/gopkg.in/src-d/go-git.v3
52+
- git clone --depth 1 https://github.com/src-d/go-git $GOPATH/src/gopkg.in/src-d/go-git.v3
4553
- wget https://bootstrap.pypa.io/get-pip.py && python3 get-pip.py --user && rm get-pip.py
4654
- export PATH=~/usr/bin:$PATH
4755
- make --version
4856
- pip3 --version
4957
- pip3 install --user --no-build-isolation -r requirements.txt tensorflow
5058
- docker run -d --privileged -p 9432:9432 --name bblfshd bblfsh/bblfshd
51-
- docker exec -it bblfshd bblfshctl driver install --all
59+
- docker exec -it bblfshd bblfshctl driver install python bblfsh/python-driver:latest
60+
- docker exec -it bblfshd bblfshctl driver install go bblfsh/go-driver:latest
61+
- docker exec -it bblfshd bblfshctl driver install java bblfsh/java-driver:latest
5262
- curl -L "https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-$(go env GOOS)-x86_64-$TENSORFLOW_VERSION.tar.gz" | sudo tar -C /usr/local -xz
5363
- sudo ldconfig
5464
install:
65+
- git clean -xfd
5566
- make
5667
script:
5768
- set -e
5869
- go vet -tags tensorflow ./...
5970
- golint -set_exit_status ./...
60-
- go test -tags tensorflow -v -cpu=1,2 -coverprofile=coverage.txt -covermode=count gopkg.in/src-d/hercules.v3
71+
- if [[ $TRAVIS_GO_VERSION != 1.9.* ]]; then go test -coverpkg=all -v -cpu=1,2 -coverprofile=coverage.txt -covermode=count gopkg.in/src-d/hercules.v3/... && sed -i '/cmd\/hercules\|core.go/d' coverage.txt; fi
72+
- if [[ $TRAVIS_GO_VERSION = 1.9.* ]]; then go test -v -cpu=1,2 gopkg.in/src-d/hercules.v3/...; fi
6173
- $GOPATH/bin/hercules version
6274
- $GOPATH/bin/hercules --burndown --couples --quiet --pb https://github.com/src-d/hercules > 1.pb
6375
- cp 1.pb 2.pb
@@ -77,6 +89,7 @@ jobs:
7789
os: osx
7890
osx_image: xcode9.3
7991
go: 1.10.x
92+
go_import_path: gopkg.in/src-d/hercules.v3
8093
before_install:
8194
- wget -O protoc.zip https://github.com/google/protobuf/releases/download/v$PROTOC_VERSION/protoc-$PROTOC_VERSION-osx-x86_64.zip
8295
- unzip -d ~/.local protoc.zip && rm protoc.zip
@@ -96,16 +109,15 @@ jobs:
96109
- stage: deploy
97110
os: linux
98111
go: 1.10.x
112+
go_import_path: gopkg.in/src-d/hercules.v3
99113
before_install:
100114
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 90
101115
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 90
102116
- wget -O protoc.zip https://github.com/google/protobuf/releases/download/v$PROTOC_VERSION/protoc-$PROTOC_VERSION-linux-x86_64.zip
103117
- unzip -d ~/.local protoc.zip && rm protoc.zip
104-
- curl -L "https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-$(go env GOOS)-x86_64-$TENSORFLOW_VERSION.tar.gz" | sudo tar -C /usr/local -xz
105-
- sudo ldconfig
106118
script: skip
107119
install:
108-
- make
120+
- DISABLE_TENSORFLOW=1 make
109121
after_success:
110122
- gzip -S .linux_amd64.gz $GOPATH/bin/hercules
111123
deploy:

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ pb/pb.pb.go: pb/pb.proto ${GOPATH}/bin/protoc-gen-gogo
2222
PATH=${PATH}:${GOPATH}/bin protoc --gogo_out=pb --proto_path=pb pb/pb.proto
2323
else
2424
pb/pb.pb.go: pb/pb.proto ${GOPATH}/bin/protoc-gen-gogo.exe
25-
set "PATH=${PATH};${GOPATH}\bin" && \
26-
call protoc --gogo_out=pb --proto_path=pb pb/pb.proto
25+
export PATH="${PATH};${GOPATH}\bin" && \
26+
protoc --gogo_out=pb --proto_path=pb pb/pb.proto
2727
endif
2828

2929
pb/pb_pb2.py: pb/pb.proto

appveyor.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,21 @@ environment:
88
GOPATH: c:\gopath
99

1010
install:
11-
- appveyor-retry choco install --allow-empty-checksums make
12-
- c:\msys64\usr\bin\pacman --noconfirm --needed -S mingw-w64-x86_64-toolchain
1311
- curl -SLko protoc.zip https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-win32.zip
1412
- 7z e protoc.zip
1513
- move protoc.exe C:\msys64\mingw64\bin
1614

1715
build_script:
16+
- set PATH=C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin;C:\msys64\usr\bin;C:\msys64\mingw64\bin;%PATH%
1817
- set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
19-
- set PATH=C:\msys64\mingw64\bin;%PATH%
2018
- cd %GOPATH%\src\gopkg.in\src-d\hercules.v3
2119
- set DISABLE_TENSORFLOW=1
2220
- make
2321
- 7z a c:\gopath\src\gopkg.in\src-d\hercules.v3\hercules.win64.zip %GOPATH%\bin\hercules.exe
2422

2523
test_script:
2624
- go get -v -t -d gopkg.in/src-d/hercules.v3/...
27-
- go test -v -tags disable_babelfish gopkg.in/src-d/hercules.v3
25+
- go test -v -tags disable_babelfish gopkg.in/src-d/hercules.v3/...
2826

2927
artifacts:
3028
- name: hercules.win64.zip
@@ -34,7 +32,7 @@ deploy:
3432
release: $(APPVEYOR_REPO_TAG_NAME)
3533
provider: GitHub
3634
auth_token:
37-
secure: 78zsH4q19DqcpdkwnYHQoe0BakBfv+LGu1W7mXuaBC9mS87+EuAj3+yTzJv4NEfI
35+
secure: 78zsH4q19DqcpdkwnYHQoe0BakBfv+LGu1W7mXuaBC9mS87+EuAj3+yTzJv3NEfI
3836
artifact: hercules.win64.zip
3937
on:
4038
branch: master

0 commit comments

Comments
 (0)