-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
language: bash | ||
services: docker | ||
|
||
before_deploy: | ||
- export GO_VERSION=$(echo $TRAVIS_TAG | cut -c 2-); | ||
- make build | ||
- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" | ||
|
||
deploy: | ||
- provider: script | ||
script: make push | ||
skip_cleanup: true | ||
on: | ||
tags: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
ARG GO_VERSION | ||
FROM golang:$GO_VERSION | ||
RUN \ | ||
apt-get update && \ | ||
apt-get install -y libc6-dev-i386 | ||
|
||
ENV CGO_ENABLED=1 | ||
ENV GOOS=linux | ||
ENV GOARCH=386 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
ARG GO_VERSION | ||
FROM golang:$GO_VERSION | ||
|
||
ENV CGO_ENABLED=1 | ||
ENV GOOS=linux | ||
ENV GOARCH=amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
ARG GO_VERSION | ||
FROM golang:$GO_VERSION | ||
RUN \ | ||
apt-get update && \ | ||
apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf | ||
|
||
ENV CGO_ENABLED=1 | ||
ENV CC=arm-linux-gnueabihf-gcc | ||
ENV CXX=arm-linux-gnueabihf-g++ | ||
ENV GOOS=linux | ||
ENV GOARCH=arm | ||
ENV GOARM=7 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ARG GO_VERSION | ||
FROM golang:$GO_VERSION | ||
RUN \ | ||
apt-get update && \ | ||
apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu | ||
|
||
ENV CGO_ENABLED=1 | ||
ENV CC=aarch64-linux-gnu-gcc | ||
ENV CXX=aarch64-linux-gnu-g++ | ||
ENV GOOS=linux | ||
ENV GOARCH=arm64 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ARG GO_VERSION | ||
FROM golang:$GO_VERSION | ||
RUN \ | ||
apt-get update && \ | ||
apt-get install -y mingw-w64 | ||
|
||
ENV CGO_ENABLED=1 | ||
ENV CC=i686-w64-mingw32-gcc | ||
ENV CXX=i686-w64-mingw32-g++ | ||
ENV GOOS=windows | ||
ENV GOARCH=386 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ARG GO_VERSION | ||
FROM golang:$GO_VERSION | ||
RUN \ | ||
apt-get update && \ | ||
apt-get install -y mingw-w64 | ||
|
||
ENV CGO_ENABLED=1 | ||
ENV CC=x86_64-w64-mingw32-gcc | ||
ENV CXX=x86_64-w64-mingw32-g++ | ||
ENV GOOS=windows | ||
ENV GOARCH=amd64 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
PROJECT=traggo/build | ||
|
||
build-windows-amd64: | ||
docker build --build-arg GO_VERSION=${GO_VERSION} -t ${PROJECT}:${GO_VERSION}-windows-amd64 -f Dockerfile.windows-amd64 . | ||
|
||
push-windows-amd64: | ||
docker push ${PROJECT}:${GO_VERSION}-windows-amd64 | ||
|
||
build-windows-386: | ||
docker build --build-arg GO_VERSION=${GO_VERSION} -t ${PROJECT}:${GO_VERSION}-windows-386 -f Dockerfile.windows-386 . | ||
|
||
push-windows-386: | ||
docker push ${PROJECT}:${GO_VERSION}-windows-386 | ||
|
||
build-linux-amd64: | ||
docker build --build-arg GO_VERSION=${GO_VERSION} -t ${PROJECT}:${GO_VERSION}-linux-amd64 -f Dockerfile.linux-amd64 . | ||
|
||
push-linux-amd64: | ||
docker push ${PROJECT}:${GO_VERSION}-linux-amd64 | ||
|
||
build-linux-386: | ||
docker build --build-arg GO_VERSION=${GO_VERSION} -t ${PROJECT}:${GO_VERSION}-linux-386 -f Dockerfile.linux-386 . | ||
|
||
push-linux-386: | ||
docker push ${PROJECT}:${GO_VERSION}-linux-386 | ||
|
||
build-linux-arm-7: | ||
docker build --build-arg GO_VERSION=${GO_VERSION} -t ${PROJECT}:${GO_VERSION}-linux-arm-7 -f Dockerfile.linux-arm-7 . | ||
|
||
push-linux-arm-7: | ||
docker push ${PROJECT}:${GO_VERSION}-linux-arm-7 | ||
|
||
build-linux-arm64: | ||
docker build --build-arg GO_VERSION=${GO_VERSION} -t ${PROJECT}:${GO_VERSION}-linux-arm64 -f Dockerfile.linux-arm64 . | ||
|
||
push-linux-arm64: | ||
docker push ${PROJECT}:${GO_VERSION}-linux-arm64 | ||
|
||
build: build-linux-amd64 build-linux-arm-7 build-linux-arm64 build-linux-386 build-windows-amd64 build-windows-386 | ||
push: push-linux-amd64 push-linux-arm-7 push-linux-arm64 push-linux-386 push-windows-amd64 push-windows-386 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# traggo/build |