forked from someone1/zfsbackup-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
64 lines (55 loc) · 2.11 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
language: go
sudo: required
dist: bionic
cache:
directories:
- $HOME/.ccache
- $HOME/zfs
services:
- docker
go:
- 1.13.x
- 1.14.x
env:
global:
- AZURE_CUSTOM_ENDPOINT=http://127.0.0.1:10000/devstoreaccount1
- AWS_S3_CUSTOM_ENDPOINT=http://127.0.0.1:9000
- AWS_REGION=us-east-1
- AWS_ACCESS_KEY_ID=minioadmin
- AWS_SECRET_ACCESS_KEY=minioadmin
- GCS_FAKE_SERVER="https://localhost:4443"
matrix:
- rel=0.7.13
# - rel=0.8.3 # some feature preventing zpool creation (encryption)?
before_install:
- export MAKEFLAGS=-j$(($(grep -c '^processor' /proc/cpuinfo) * 2 + 1))
- export GOPATH=$HOME/go
- export PATH=/usr/lib/ccache:$GOPATH/bin:$PATH
- sudo apt-get -qq update
- sudo apt-get install -y linux-headers-`uname -r` tree uuid-dev libattr1-dev libblkid-dev jq gnupg2 xz-utils gzip
- mkdir -p $HOME/zfs
- cd $HOME/zfs
- "[[ -d spl-$rel.tar.gz ]] || curl -L https://github.com/openzfs/zfs/releases/download/zfs-$rel/spl-$rel.tar.gz | tar xz || true"
- "[[ -d zfs-$rel.tar.gz ]] || curl -L https://github.com/openzfs/zfs/releases/download/zfs-$rel/zfs-$rel.tar.gz | tar xz"
- (cd spl-$rel && ./configure --prefix=/usr && make && sudo make install) || true
- (cd zfs-$rel && ./configure --prefix=/usr && make && sudo make install)
- sudo modprobe zfs
- cd $TRAVIS_BUILD_DIR
- mkdir temp
- export TMPDIR=$PWD/temp
- export VDEV=$(mktemp)
- chmod +x ./travis-setup.sh && ./travis-setup.sh
install:
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $GOPATH/bin v1.24.0
- GO111MODULE=off go get github.com/mattn/goveralls
- GO111MODULE=off go get github.com/mitchellh/gox
- make get
script:
- make build
- chmod +x ./integration_test.sh && ./integration_test.sh
- sudo -E TMPDIR=$TMPDIR $(which go) test -race -v -coverprofile=coverage.out -covermode=atomic -coverpkg=$(go list ./... | grep -v '/vendor/' | paste -sd, -) ./...
- make lint
after_success:
- sudo -E $GOPATH/bin/goveralls -coverprofile=coverage.out -service=travis-ci
after_script:
- chmod +x ./travis-teardown.sh && ./travis-teardown.sh