Skip to content

Commit

Permalink
Travis CI build
Browse files Browse the repository at this point in the history
  • Loading branch information
riobard committed Apr 15, 2018
1 parent c5b731a commit 1c9b29c
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bin/
19 changes: 19 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
language: go
sudo: false
go:
- 1.x
install: go get -u -t -v ./...
script: go test
before_deploy: make -j releases
deploy:
provider: releases
prerelease: true
skip_cleanup: true
file_glob: true
file: bin/*
on:
repo: shadowsocks/go-shadowsocks2
branch: master
tags: true
api_key:
secure: hXN6BYAim9TYIf/NpI8CuaBQmIJ+q6asypw37DP+cBkdkXbmAX6oSPbQMKUVGQg3U7YNbebaXmCdu87ORiEmTzhAPf2rG86Q80Q1KcU8fpGgxQ+Ie2XmaRlkBnkT1QVym9e/4jCtnBg5B6iDu5//K94ASgKL8z3GLgzJ/+k4lOjxV2iRTrZwdvs30yy3QqSTpp2d8+JMkg3XFv5LiUqTo5xCLgavgRJ23UEAk1JsxgBVFnggEVywtdWKXdFX23CyQ/0rDTdegYXHOGMRSo/PXql8VMFwljc9fSOCjoKtKsmO/W61T2O/2OY/aOcyIdztEDoboZ6hfFt7hYsakLWhx6UoTH6k6PTwzTqsOjW+RofZVxGXG8sNmRi1bQBX3pDQaVTnzFZ7cuf9qclT3ATgISVTErF6fakXBTBja53IfdKOMgThPJNF7vThq1SFyhXnysmHKyHJq/4BM6OEb/Ac25ZhILU1FfwTcRjwi8w6iOGLU6vwcypuqctO9d5NbmNdkJ32YsbcDZoUaJxEUA+LiyaZYkjVyKWkpEA7Vjj7kcUdxMLXGyRKqT0ufinVpx2pAqMeXvM7BaIneoqJk6JRidsxc2HxI9qRcslrs6gcyI6x8qtJgVwlPJgmyodt/oSQC4astqmSoa6CIIP3lYgq/78jy/LxIDJt4d2bJGBMkEg=
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
NAME=shadowsocks2
BINDIR=bin
GOBUILD=CGO_ENABLED=0 go build -ldflags '-w -s'
# The -w and -s flags reduce binary sizes by excluding unnecessary symbols and debug info

all: linux macos win64

linux:
GOARCH=amd64 GOOS=linux $(GOBUILD) -o $(BINDIR)/$(NAME)-$@

macos:
GOARCH=amd64 GOOS=darwin $(GOBUILD) -o $(BINDIR)/$(NAME)-$@

win64:
GOARCH=amd64 GOOS=windows $(GOBUILD) -o $(BINDIR)/$(NAME)-$@.exe

releases: linux macos win64
chmod +x $(BINDIR)/$(NAME)-*
gzip $(BINDIR)/$(NAME)-linux
gzip $(BINDIR)/$(NAME)-macos
zip -m -j $(BINDIR)/$(NAME)-win64.zip $(BINDIR)/$(NAME)-win64.exe

clean:
rm $(BINDIR)/*

0 comments on commit 1c9b29c

Please sign in to comment.