mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-17 03:24:40 -07:00
13
.travis.yml
13
.travis.yml
@@ -1,6 +1,15 @@
|
||||
language: go
|
||||
go:
|
||||
- 1.5
|
||||
- 1.6
|
||||
env:
|
||||
global:
|
||||
- BUILD_GOARCH=amd64
|
||||
- GO15VENDOREXPERIMENT=1
|
||||
matrix:
|
||||
- BUILD_GOOS=linux
|
||||
- BUILD_GOOS=darwin
|
||||
- BUILD_GOOS=windows
|
||||
install:
|
||||
- go get github.com/nats-io/nats
|
||||
- go get github.com/mattn/goveralls
|
||||
@@ -11,4 +20,6 @@ script:
|
||||
- go vet ./...
|
||||
- go test -i -race ./...
|
||||
- go test -v -race ./...
|
||||
- ./scripts/cov.sh TRAVIS
|
||||
after_script:
|
||||
- if [ "$TRAVIS_GO_VERSION" = "1.6" ] && [ "$BUILD_GOOS" = "linux" ]; then ./scripts/cov.sh TRAVIS; fi
|
||||
- if [ "$TRAVIS_GO_VERSION" = "1.6" ] && [ "$BUILD_GOOS" = "linux" ] && [ "$TRAVIS_TAG" != "" ]; then ./scripts/cross_compile.sh $TRAVIS_TAG; ghr --username nats-io --token $GITHUB_TOKEN --replace $TRAVIS_TAG pkg/; fi
|
||||
|
||||
@@ -3,14 +3,19 @@ go get github.com/mitchellh/gox
|
||||
go get github.com/tcnksm/ghr
|
||||
|
||||
export APPNAME="gnatsd"
|
||||
export OSARCH="linux/386 linux/amd64 linux/arm darwin/amd64 solaris/amd64 windows/386 windows/amd64"
|
||||
export DIRS="linux_386 linux_amd64 linux_arm darwin_amd64 solaris_amd64 windows_386 windows_amd64"
|
||||
export OSARCH="linux/386 linux/amd64 linux/arm darwin/amd64 windows/386 windows/amd64"
|
||||
export DIRS="linux-386 linux-amd64 linux-arm darwin-amd64 windows-386 windows-amd64"
|
||||
export OUTDIR="pkg"
|
||||
|
||||
gox -osarch="$OSARCH" -output "$OUTDIR/$APPNAME-{{.OS}}_{{.Arch}}/$APPNAME"
|
||||
# If we have an arg, assume its a version tag and rename as appropriate.
|
||||
if [[ -n $1 ]]; then
|
||||
export APPNAME=$APPNAME-$1
|
||||
fi
|
||||
|
||||
gox -osarch="$OSARCH" -ldflags="-s -w" -output "$OUTDIR/$APPNAME-{{.OS}}-{{.Arch}}/$APPNAME"
|
||||
for dir in $DIRS; do \
|
||||
(cp README.md $OUTDIR/$APPNAME-$dir/README.md) ;\
|
||||
(cp LICENSE $OUTDIR/$APPNAME-$dir/LICENSE) ;\
|
||||
(cd $OUTDIR && zip -q $APPNAME-$dir.zip -r $APPNAME-$dir) ;\
|
||||
echo "make $OUTDIR/$APPNAME-$dir.zip" ;\
|
||||
(cp README.md $OUTDIR/$APPNAME-$dir/README.md) ;\
|
||||
(cp LICENSE $OUTDIR/$APPNAME-$dir/LICENSE) ;\
|
||||
(cd $OUTDIR && zip -q $APPNAME-$dir.zip -r $APPNAME-$dir) ;\
|
||||
echo "make $OUTDIR/$APPNAME-$dir.zip" ;\
|
||||
done
|
||||
|
||||
@@ -45,7 +45,7 @@ func TestPSEmulation(t *testing.T) {
|
||||
if delta < 0 {
|
||||
delta = -delta
|
||||
}
|
||||
if delta > 200*1024 { // 200k
|
||||
if delta > 512*1024 { // 512k
|
||||
t.Fatalf("RSSs did not match close enough: %d vs %d", rss, psRss)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user