Skip to content

Commit

Permalink
Travis builds
Browse files Browse the repository at this point in the history
  • Loading branch information
kayrus committed Dec 9, 2020
1 parent a693670 commit 6d78e8a
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 19 deletions.
47 changes: 29 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,37 @@
sudo: required

services:
- docker

before_install:
- |-
case $TRAVIS_OS_NAME in
windows)
export MAKE=mingw32-make
;;
*)
export MAKE=make
;;
esac
dist: focal
language: go
go:
- "1.13"

before_install:
- go get github.com/karalabe/xgo

install: go get -d ./...

script: make travisbuild

- 1.15.x
script:
- $MAKE
branches:
only:
- master
- "/v\\d+\\.\\d+\\.\\d+/"
matrix:
include:
- os: linux
- os: osx
- os: windows
before_deploy:
- $MAKE
deploy:
provider: releases
api_key:
secure: "gKUd0FGXESP45sNjHfqnTGcPNgKgIe41jt/qGG8C1zdKZduXm4PlfHOu5Mx91w4fi1dJt4M+S1z0xWFh/4K6E4Y6/Y0QbCu7Va6psQdwYV0h1twMpEp3VSUBUxLGCyup4E4h1k53GYqTEBB/um37g99YVVC8A0NgjDOxQtbQFkrk4WO9bj38P0sJtXORAITRsFEH+5x7P39O7h5EstJLxaqq4uaOq4DRjfVrqgUr5BhI+VgzN80ReRyo4IJjkBbRbyHp/TOHmxiGhQuxncvH719ZtuC53IXbCrEpJvmzGdanEon5FScr1ToLgx0AlvGRigx3A9DF2326pSN2NboLg8AOqEa0SWp3g2r2jLp3PSaet62BfyKqIWXzuigxHm0RCGg1+7/n2fe2ZntrHedpSrZoqRQJwfJ3yUUx4+refnnhmxjZPQcNgH/caUoBlYUbmzNGJIFgRInpzozvGNVpj6E1AbW7nKMSehW8OzhYxFJ1o6kjQWILxe4lb3aZY4yuTfRxw+WBICP9Nm2SzlNaiTs5WjS7TP6eaJb5uaXlK1WoGd8lvCESqpoUE6l5onurobYUWrgIpKLqCcVhmmcsecPFllDeJf7sqzOM1umTijY9rBoHvT/1/l0lLcShgdYAoaNcDXch0VvWnO60Km9FzeiRRuerkH0v/QAiOG+lzd0="
secure: ZSTQzFI9dUmxHxedbGyWZzTDFWlFV97fsHG5anVIi25YuPjgr+Qp7zWDkSi2ww5Nmuod58ieNB1sPPO5Fx2R3/FZ3Eq0gXO4wkqOFxf8GeCojNbQTzYHl6M5YPur/1vSPlpinQSVfs74G+OCQBLNZ5evgF1Y1scuX9ltBvTYmWBst/Ty5J7UVMhRf5cImHNHufob6nQhXv1tK51XFEAnX+2C+CNm/d9AgxeA7fo2NevqchwzsXU+5n6o29O4xI9rsSlslxUqmVbBaY/3+h0ZbBeWKY0RxBFyyhCsSJ7c29oJPjEpnr0U7g1frl2j8rBewHqbaqcMzfwCQZ277tU1dnvmzsXtggKy8NwjavUH3ekTh0fFasm9Xcwnfldsw7vihLk5pXNdKOM5cT4ylNeBMLHeapyr8LW3CV4zYYDN75GNxovOsA0kC0oWj63/QPVHhHWeIucYFEewNuW8DSwgDyFbAzVKwypU8EtQko0XDT1tnxlDdjq9BobmKxTC6udtJHbgx3juqBzIVxgUPljCoYmj+r75pNApSlQJr12LDpshArWjlj/RojLDjADz7dLeXWjsEi1PGK/jaqh7TQyayNN21aPcXdMOtW+jPD9JBzrmRJSalSbz25N/b25u1hPMyE6d5Y7eE+UW0D8iWY0aJAp2GNCxOKBg3LuivdJ4qsU=
file_glob: true
file:
- "build/tun2socks*"
skip_cleanup: true
file: 'build/*'
on:
tags: true
repo: kayrus/go-tun2socks
skip_cleanup: 'true'
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ BUILD_TAGS?=socks
BUILDDIR=$(shell pwd)/build
CMDDIR=$(shell pwd)/cmd/tun2socks
PROGRAM=tun2socks
GOOS:=$(shell go env GOOS)

BUILD_CMD="cd $(CMDDIR) && $(GOBUILD) -ldflags $(RELEASE_LDFLAGS) -o $(BUILDDIR)/$(PROGRAM) -v -tags '$(BUILD_TAGS)'"
BUILD_CMD="cd $(CMDDIR) && $(GOBUILD) -ldflags $(RELEASE_LDFLAGS) -o $(BUILDDIR)/$(PROGRAM)_$(GOOS) -v -tags '$(BUILD_TAGS)'"
XBUILD_LINUX_CMD="cd $(BUILDDIR) && $(XGOCMD) -ldflags $(STATIC_RELEASE_LDFLAGS) -tags '$(BUILD_TAGS)' --targets=linux/* $(CMDDIR)"
XBUILD_OTHERS_CMD="cd $(BUILDDIR) && $(XGOCMD) -ldflags $(RELEASE_LDFLAGS) -tags '$(BUILD_TAGS)' --targets=darwin/*,windows/*,android/*,ios/* $(CMDDIR)"

Expand Down

0 comments on commit 6d78e8a

Please sign in to comment.