This repository has been archived by the owner on Aug 3, 2023. It is now read-only.
forked from galeone/tfgo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
45 lines (44 loc) · 1.68 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
34
35
36
37
38
39
40
41
42
43
44
45
language: go
dist: trusty
sudo: true
env:
global:
- TF_VERSION_MAJOR=1
- TF_VERSION_MINOR=14
- TF_VERSION_PATCH=0
before_install:
# Install Python 3.6
- sudo add-apt-repository -y ppa:deadsnakes/ppa
- sudo apt-get update -qq
- sudo apt-get install -qq python3.6-dev python3.6
- sudo update-alternatives --install /usr/bin/python3 python3.6 /usr/bin/python3.6 0
# Install python-pip
- mkdir /tmp/pip && pushd /tmp/pip
- wget https://bootstrap.pypa.io/get-pip.py
- sudo python3 get-pip.py
- popd
# Install TensorFlow
- sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-"$TF_VERSION_MAJOR"."$TF_VERSION_MINOR"."$TF_VERSION_PATCH"-cp36-cp36m-linux_x86_64.whl
- sudo pip3 install protobuf
- sudo pip3 install -r test_models/requirements.txt
# Install TensorFlow system library
- curl -L "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
- git clone https://github.com/tensorflow/tensorflow $GOPATH/src/github.com/tensorflow/tensorflow/
- pushd $GOPATH/src/github.com/tensorflow/tensorflow/tensorflow/go
- git checkout r"$TF_VERSION_MAJOR"."$TF_VERSION_MINOR"
- go build
- popd
# Install Goveralls
- go get github.com/mattn/goveralls
# Build models - used in tests
- pushd test_models
- sudo python3 create.py
- sudo python3 estimator.py
- sudo bash freeze_graph.sh
- sudo mv output/1pb/*/* output/1pb/
- sudo mv output/2pb/*/* output/2pb/
- popd
script:
- $GOPATH/bin/goveralls -service=travis-ci