-
Notifications
You must be signed in to change notification settings - Fork 35
/
.travis.yml
38 lines (33 loc) · 1007 Bytes
/
.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
# According to
# https://docs.travis-ci.com/user/languages/minimal-and-generic/#generic, the
# generic language includes Go.
language: go
go:
# We rely on github.com/stretchr/testify, which requires a recent Go version.
- 1.14
os: osx
# GoTorch, in particular, gotorch/vision/transforms, uses OpenCV for
# image data augmentation. In Travis CI macOS VMs, we need to install
# OpenCV and its many dependencies. The updating of Homebrew and
# installation of OpenCV would take about 20 minutes. To shrink the
# time cost, we make Travis CI to cache the /usr/local directory,
# where Homebrew installs software packages.
cache:
directories:
- /usr/local
addons:
homebrew:
packages:
- opencv
- pkgconfig
update: true
branches:
only:
- develop
install:
- go get -v -t -d ./...
script:
- export LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/cgotorch/libtorch/lib
- go generate ./...
- go install ./...
- go test -coverprofile=coverage.txt -covermode=atomic -v -race ./...