Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Commit

Permalink
feat: add build
Browse files Browse the repository at this point in the history
  • Loading branch information
5aaee9 committed Jun 2, 2019
1 parent 3e2b51a commit 3f778cb
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
workspace:
base: /go
path: src/github.com/Indexyz/go-torch

kind: pipeline
name: default

steps:
- name: build
image: golang:latest
environment:
GOPATH: /go
CGO_ENABLED: '0'
commands:
- go get -u github.com/golang/dep/cmd/dep
- dep ensure -v
- mkdir builds
- GOOS=linux GOARCH=amd64 go build -o builds/torch-linux-amd64
- GOOS=linux GOARCH=arm go build -o builds/torch-linux-arm
- GOOS=darwin GOARCH=amd64 go build -o builds/torch-darwin-amd64
- GOOS=freebsd GOARCH=amd64 go build -o builds/torch-freebsd-amd64
- GOOS=windows GOARCH=amd64 go build -o builds/torch-windows-amd64.exe

- name: github_release
image: plugins/github-release
when:
event: tag
settings:
files:
- builds/*
checksum:
- sha1
- sha256
api_key:
from_secret: github_token


- name: docker_release
image: plugins/docker
settings:
repo: indexyz/torch-go
auto_tag: true
username:
from_secret: docker_username
password:
from_secret: docker_password
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM alpine
COPY builds/torch-linux-amd64 /bin/torch
ENTRYPOINT ["/bin/torch"]

0 comments on commit 3f778cb

Please sign in to comment.