Skip to content

Commit

Permalink
Merge pull request #12 from dcbw/multi-network
Browse files Browse the repository at this point in the history
Add support for multiple pod networks
  • Loading branch information
Mrunal Patel authored Jul 12, 2018
2 parents 84aa158 + 2d3ce46 commit 0df475a
Show file tree
Hide file tree
Showing 127 changed files with 10,832 additions and 289 deletions.
47 changes: 47 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
language: go
dist: trusty

go:
- 1.9.x
- 1.10.x

env:
matrix:
- TARGET=amd64
- TARGET=arm
- TARGET=arm64
- TARGET=ppc64le
- TARGET=s390x

matrix:
fast_finish: true

# Ubuntu 14.04 (trusty) doesn't have a new enough util-linux for nsenter,
# so we have to build it ourselves.
before_install:
-
- wget https://www.kernel.org/pub/linux/utils/util-linux/v2.24/util-linux-2.24.1.tar.gz -qO - | tar -xz -C .
- sudo apt-get update
- sudo apt-get install -y libncurses5-dev libslang2-dev gettext zlib1g-dev libselinux1-dev debhelper lsb-release pkg-config po-debconf autoconf automake autopoint libtool
- pushd util-linux-2.24.1
- ./autogen.sh
- ./configure
- make
- sudo cp ./nsenter /usr/bin
- popd
- rm -rf util-linux-2.24.1

install:
- go get golang.org/x/tools/cmd/cover
- go get github.com/modocache/gover
- go get github.com/mattn/goveralls
- go get -t ./...

script:
- make check

notifications:
email: false

git:
depth: 9999999
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,16 @@ binaries: ocicnitool
ocicnitool: .gopathok $(shell hack/find-godeps.sh $(GOPKGDIR) tools/ocicnitool $(PROJECT))
$(GO) build $(LDFLAGS) -tags "$(BUILDTAGS)" -o $@ $(PROJECT)/tools/ocicnitool

check: .gopathok
@./hack/test-go.sh $(GOPKGDIR)
@./hack/verify-gofmt.sh

clean:
ifneq ($(GOPATH),)
rm -f "$(GOPATH)/.gopathok"
endif
rm -rf _output

.PHONY: .gitvalidation
# When this is running in travis, it will only check the travis commit range
.gitvalidation: .gopathok
ifeq ($(TRAVIS),true)
Expand All @@ -59,8 +62,6 @@ else
GIT_CHECK_EXCLUDE="./vendor ./_output" $(GOPATH)/bin/git-validation -v -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..HEAD
endif

.PHONY: install.tools

install.tools: .install.gitvalidation

.install.gitvalidation: .gopathok
Expand All @@ -73,5 +74,7 @@ install.tools: .install.gitvalidation
clean \
default \
gofmt \
help

help \
check \
install.tools \
.gitvalidation
25 changes: 25 additions & 0 deletions hack/test-go.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
set -e

cd $1

echo -n "Running tests "
function testrun {
bash -c "umask 0; PATH=$PATH go test $@"
}
if [ ! -z "${COVERALLS:-""}" ]; then
# coverage profile only works per-package
PKGS="$(go list ./... | xargs echo)"
echo "with coverage profile generation..."
i=0
for t in ${PKGS}; do
testrun "-covermode set -coverprofile ${i}.coverprofile ${t}"
i=$((i+1))
done
gover
goveralls -service=travis-ci -coverprofile=gover.coverprofile
else
echo "without coverage profile generation..."
testrun "./..."
fi

Loading

0 comments on commit 0df475a

Please sign in to comment.