forked from rojkov/intel-device-plugins-for-kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
56 lines (49 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
46
47
48
49
50
51
52
53
54
55
56
language: go
dist: xenial
go:
- 1.11.x
env:
global:
- RUNC_VERSION=v1.0.0-rc6
- CRIO_VERSION=v1.11.5
- OSTREE_VERSION=v2018.8
- BUILDAH_VERSION=v1.4
sudo: required
before_install:
## checkers
- go get -v golang.org/x/lint/golint
- go get -v github.com/fzipp/gocyclo
## hack for building on forks
- repo=`basename $PWD`; src=`dirname $PWD`; dest="`dirname $src`/intel"
- if [[ "$src" != "$dest" ]]; then mv "$src" "$dest"; cd ../../intel/$repo; export TRAVIS_BUILD_DIR=`dirname $TRAVIS_BUILD_DIR`/$repo; fi
## install buildah build deps
- cdir=$(pwd)
- sudo apt-get -y install e2fslibs-dev libfuse-dev libgpgme11-dev libdevmapper-dev libglib2.0-dev libprotobuf-dev
# build buildah
- mkdir -p $GOPATH/src/github.com/containers
- cd $GOPATH/src/github.com/containers
- git clone --single-branch --depth 1 -b $BUILDAH_VERSION https://github.com/containers/buildah
- cd buildah
- make buildah TAGS=""
- sudo cp buildah /usr/local/bin
# configure buildah
- sudo mkdir -p /etc/containers
- echo -e '[registries.search]\nregistries = ["docker.io"]\n\n' | sudo tee /etc/containers/registries.conf
- sudo curl https://raw.githubusercontent.com/kubernetes-sigs/cri-o/$CRIO_VERSION/test/policy.json -o /etc/containers/policy.json
# install runc
- sudo curl -L https://github.com/opencontainers/runc/releases/download/$RUNC_VERSION/runc.amd64 -o /usr/bin/runc
- sudo chmod +x /usr/bin/runc
- cd $cdir
script:
- make format
- make lint
- make
- make vet
- make cyclomatic-check
- make test
- make images
- make images BUILDER=buildah
- make demos
- make demos BUILDER=buildah
after_success:
- bash <(curl -s https://codecov.io/bash)