Skip to content

Commit

Permalink
Binary size reduction (#240)
Browse files Browse the repository at this point in the history
* Strip generated binary
* Install UPX on CI
* Pack generated binaries with UPX
* Use LZMA algorithm in UPX for more size reduction
  • Loading branch information
dcRUSTy committed Aug 31, 2020
1 parent 487417a commit 648e456
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ go:
- stable
before_install:
- go get github.com/mattn/goveralls
- sudo apt-get -y install upx-ucl
install: true
jobs:
include:
Expand Down
3 changes: 2 additions & 1 deletion build
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
VERSION=$(git describe --tags HEAD)
export GO111MODULE=on
go get github.com/mitchellh/gox
gox -os="linux darwin windows" -arch="386 amd64" -ldflags="-X main.Version=${VERSION}"
gox -os="linux darwin windows" -arch="386 amd64" -ldflags="-s -w -X main.Version=${VERSION}"
upx --lzma talisman_{l,d,w}*
shasum -b -a256 talisman_{l,d,w}* > checksums

0 comments on commit 648e456

Please sign in to comment.