Skip to content

Commit

Permalink
[ADDED] ARM64v8 Release build
Browse files Browse the repository at this point in the history
- Add linux/arm64 to cross compile script
- Update .travis.yml to push builds on Go 1.8.x version
- Update Dockerfile to Go 1.8.3
- Change Dockerfile.win64 to actually build all the builds that
  we would want to provide a Docker image for
  • Loading branch information
kozlovic committed Aug 25, 2017
1 parent f2854ee commit 0496750
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 18 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
language: go
go:
- 1.6.x
- 1.7.x
- 1.8.x
- 1.9
install:
- go get github.com/nats-io/go-nats
- go get github.com/mattn/goveralls
Expand All @@ -16,9 +16,9 @@ before_script:
- go vet $EXCLUDE_VENDOR
- misspell -error -locale US .
- megacheck $EXCLUDE_VENDOR
- if [[ "$TRAVIS_GO_VERSION" == 1.7.* ]]; then ./scripts/cross_compile.sh $TRAVIS_TAG; fi
- if [[ "$TRAVIS_GO_VERSION" == 1.8.* ]]; then ./scripts/cross_compile.sh $TRAVIS_TAG; fi
script:
- go test -i -race $EXCLUDE_VENDOR
- if [[ "$TRAVIS_GO_VERSION" == 1.7.* ]]; then ./scripts/cov.sh TRAVIS; else go test -v -race $EXCLUDE_VENDOR; fi
- if [[ "$TRAVIS_GO_VERSION" == 1.8.* ]]; then ./scripts/cov.sh TRAVIS; else go test -v -race $EXCLUDE_VENDOR; fi
after_success:
- if [[ "$TRAVIS_GO_VERSION" == 1.7.* ]] && [ "$TRAVIS_TAG" != "" ]; then ghr --owner nats-io --token $GITHUB_TOKEN --draft --replace $TRAVIS_TAG pkg/; fi
- if [[ "$TRAVIS_GO_VERSION" == 1.8.* ]] && [ "$TRAVIS_TAG" != "" ]; then ghr --owner nats-io --token $GITHUB_TOKEN --draft --replace $TRAVIS_TAG pkg/; fi
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.7.6
FROM golang:1.8.3

MAINTAINER Derek Collison <derek@apcera.com>

Expand Down
14 changes: 14 additions & 0 deletions Dockerfile.all
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM golang:1.8.3

MAINTAINER Ivan Kozlovic <ivan.kozlovic@apcera.com>

COPY . /go/src/github.com/nats-io/gnatsd
WORKDIR /go/src/github.com/nats-io/gnatsd

RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -a -tags netgo -installsuffix netgo -ldflags "-s -w -X github.com/nats-io/gnatsd/version.GITCOMMIT=`git rev-parse --short HEAD`" -o pkg/linux-amd64/gnatsd
RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 go build -v -a -tags netgo -installsuffix netgo -ldflags "-s -w -X github.com/nats-io/gnatsd/version.GITCOMMIT=`git rev-parse --short HEAD`" -o pkg/linux-arm7/gnatsd
RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -v -a -tags netgo -installsuffix netgo -ldflags "-s -w -X github.com/nats-io/gnatsd/version.GITCOMMIT=`git rev-parse --short HEAD`" -o pkg/linux-arm64/gnatsd
RUN CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -v -a -tags netgo -installsuffix netgo -ldflags "-s -w -X github.com/nats-io/gnatsd/version.GITCOMMIT=`git rev-parse --short HEAD`" -o pkg/win-amd64/gnatsd.exe

ENTRYPOINT ["go"]
CMD ["version"]
11 changes: 0 additions & 11 deletions Dockerfile.win64

This file was deleted.

4 changes: 2 additions & 2 deletions scripts/cross_compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ go get github.com/mitchellh/gox
go get github.com/tcnksm/ghr

export APPNAME="gnatsd"
export OSARCH="linux/386 linux/amd64 darwin/amd64 windows/386 windows/amd64"
export DIRS="linux-386 linux-amd64 linux-arm6 linux-arm7 darwin-amd64 windows-386 windows-amd64"
export OSARCH="linux/386 linux/amd64 linux/arm64 darwin/amd64 windows/386 windows/amd64"
export DIRS="linux-386 linux-amd64 linux-arm6 linux-arm7 linux-arm64 darwin-amd64 windows-386 windows-amd64"
export OUTDIR="pkg"

# If we have an arg, assume its a version tag and rename as appropriate.
Expand Down

0 comments on commit 0496750

Please sign in to comment.