intel-device-plugins-for-ku.../.travis.yml
Mikko Ylinen d3354d0522 travis: Use vendored code for container builds
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2019-11-01 14:32:26 +02:00

62 lines
1.6 KiB
YAML

language: go
dist: xenial
go:
- 1.12.x
cache:
directories:
- $GOPATH/pkg/mod
env:
global:
- RUNC_VERSION=v1.0.0-rc8
- CRIO_VERSION=v1.14.6
- BUILDAH_VERSION=v1.10.0
- GO111MODULE=on
sudo: required
before_install:
## checkers
- go get -v golang.org/x/lint/golint
- go get -v github.com/fzipp/gocyclo
- go get -v golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
## install buildah build deps
- cdir=$(pwd)
- sudo apt-get update
- 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 BUILDTAGS=kerneldrv
- make vet
- make cyclomatic-check
- make test BUILDTAGS=kerneldrv
- make -e vendor
- make pre-pull
- make -j4 images
- make images BUILDER=buildah
- make demos
- make demos BUILDER=buildah
after_success:
- bash <(curl -s https://codecov.io/bash)