-
-
Notifications
You must be signed in to change notification settings - Fork 155
/
.travis.yml
33 lines (32 loc) · 1.34 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
language: go
os: linux
dist: focal
env:
global:
- TF_VERSION_MAJOR=2
- TF_VERSION_MINOR=9
- TF_VERSION_PATCH=1
before_install:
# Install TensorFlow
- sudo pip3 install --progress-bar off tensorflow=="$TF_VERSION_MAJOR"."$TF_VERSION_MINOR"."$TF_VERSION_PATCH"
- sudo pip3 install --progress-bar off protobuf
- sudo pip3 install --progress-bar off -r test_models/requirements.txt
# Install TensorFlow system library
- curl -L --silent "https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-""$TF_VERSION_MAJOR"."$TF_VERSION_MINOR"."$TF_VERSION_PATCH"".tar.gz" | sudo tar -C /usr/local -xz
- sudo ldconfig
# Get and install TensorFlow Go bindings: we also need other packages not automatically downloaded (like proto)
- go get github.com/golang/protobuf/proto
# NOTE: we use our own fork with the Go package fixed and go-gettable and usable
- git clone https://github.com/galeone/tensorflow $GOPATH/src/github.com/galeone/tensorflow/
- pushd $GOPATH/src/github.com/galeone/tensorflow/tensorflow/go
- git checkout r"$TF_VERSION_MAJOR"."$TF_VERSION_MINOR"-go
- go build
- popd
# Install Goveralls
- go get github.com/mattn/goveralls
# Build models - used in tests
- pushd test_models
- sudo python3 create.py
- popd
script:
- $GOPATH/bin/goveralls -service=travis-ci