Skip to content

Commit

Permalink
Move Windows tests to Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Moss authored and benmoss committed Dec 10, 2018
1 parent 3fb4647 commit 34b1b70
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 38 deletions.
29 changes: 0 additions & 29 deletions .appveyor.yml

This file was deleted.

10 changes: 8 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,22 @@ env:

matrix:
fast_finish: true
include:
- os: windows
env: TARGET=amd64
go: 1.10.x
- os: windows
env: TARGET=amd64
go: 1.11.x

install:
- sudo apt-get install gcc-multilib gcc-mingw-w64 -y
- go get github.com/onsi/ginkgo/ginkgo
- go get github.com/containernetworking/cni/cnitool

script:
- |
if [ "${TARGET}" == "amd64" ]; then
GOARCH="${TARGET}" ./test.sh
GOARCH="${TARGET}" ./test_${TRAVIS_OS_NAME}.sh
else
GOARCH="${TARGET}" ./build_linux.sh
fi
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[![Linux Build Status](https://travis-ci.org/containernetworking/plugins.svg?branch=master)](https://travis-ci.org/containernetworking/plugins)
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/kcuubx0chr76ev86/branch/master?svg=true)](https://ci.appveyor.com/project/cni-bot/plugins/branch/master)
[![Build Status](https://travis-ci.org/containernetworking/plugins.svg?branch=master)](https://travis-ci.org/containernetworking/plugins)

# plugins
Some CNI network plugins, maintained by the containernetworking team. For more information, see the individual READMEs.
Expand Down
9 changes: 4 additions & 5 deletions build_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ cd $(dirname "$0")
ORG_PATH="github.com/containernetworking"
export REPO_PATH="${ORG_PATH}/plugins"

if [ ! -h gopath/src/${REPO_PATH} ]; then
mkdir -p gopath/src/${ORG_PATH}
ln -s ../../../.. gopath/src/${REPO_PATH} || exit 255
fi
export GOPATH=$(mktemp -d)
mkdir -p ${GOPATH}/src/${ORG_PATH}
trap "{ rm -rf $GOPATH; }" EXIT
ln -s ${PWD} ${GOPATH}/src/${REPO_PATH} || exit 255

export GOPATH=${PWD}/gopath
export GO="${GO:-go}"
export GOOS=windows

Expand Down
File renamed without changes.
14 changes: 14 additions & 0 deletions test_windows.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
#
# Run CNI plugin tests.
#
set -e

source ./build_windows.sh

echo "Running tests"

PLUGINS=$(cat plugins/windows_only.txt | tr '\n' ' ')
GINKGO_FLAGS="-p -r --randomizeAllSpecs --randomizeSuites --failOnPending --progress pkg/hns $PLUGINS"

bash -c "cd ${GOPATH}/src/${REPO_PATH}; PATH='${GOROOT}/bin:$(pwd)/bin:${PATH}' ginkgo ${GINKGO_FLAGS}"

0 comments on commit 34b1b70

Please sign in to comment.