Skip to content
This repository was archived by the owner on Jan 31, 2024. It is now read-only.

Commit 5a1b831

Browse files
author
Henry Wong
authored
[elastic] Adjust the build options. (#75)
Add the option '-ldflags' to strip off the debug info, this option will reduce the binary size at some extent. Appveyor will hold the artifacts for 6 month and has the corresponding size limit, removing the x86 builds will reduce the the artifact size.
1 parent 64b5b4b commit 5a1b831

File tree

2 files changed

+29
-29
lines changed

2 files changed

+29
-29
lines changed

.travis.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ matrix:
3434
- go test ./internal/lsp
3535
- mkdir build
3636
- cd build
37-
- go build -o go-langserver $GOPATH/src/golang.org/x/tools/cmd/gopls
37+
- go build -ldflags "-s -w" -o go-langserver $GOPATH/src/golang.org/x/tools/cmd/gopls
3838
- curl -o go1.12.7.linux-amd64.tar.gz https://dl.google.com/go/go1.12.7.linux-amd64.tar.gz
3939
- tar xzf go1.12.7.linux-amd64.tar.gz
4040
- rm -rf ./go/test
@@ -54,39 +54,39 @@ matrix:
5454
all_branches: true
5555
tags: true
5656

57-
- name: Unit Tests & Package | Linux x86
58-
os: linux
59-
script:
60-
- go test ./internal/lsp
61-
- mkdir build
62-
- cd build
63-
- go build -o go-langserver $GOPATH/src/golang.org/x/tools/cmd/gopls
64-
- curl -o go1.12.7.linux-386.tar.gz https://dl.google.com/go/go1.12.7.linux-386.tar.gz
65-
- tar xzf go1.12.7.linux-386.tar.gz
66-
- rm -rf ./go/test
67-
- tar -zcf go-langserver-linux-386.tar.gz go-langserver go
68-
69-
deploy:
70-
provider: releases
71-
skip_cleanup: true
72-
api_key: $GITHUB_TOKEN
73-
verbose: true
74-
file: $GOPATH/src/golang.org/x/tools/build/go-langserver-linux-386.tar.gz
75-
name: $TRAVIS_TAG
76-
draft: false
77-
prerelease: false
78-
overwrite: true
79-
on:
80-
all_branches: true
81-
tags: true
57+
# - name: Unit Tests & Package | Linux x86
58+
# os: linux
59+
# script:
60+
# - go test ./internal/lsp
61+
# - mkdir build
62+
# - cd build
63+
# - go build -ldflags -o go-langserver $GOPATH/src/golang.org/x/tools/cmd/gopls
64+
# - curl -o go1.12.7.linux-386.tar.gz https://dl.google.com/go/go1.12.7.linux-386.tar.gz
65+
# - tar xzf go1.12.7.linux-386.tar.gz
66+
# - rm -rf ./go/test
67+
# - tar -zcf go-langserver-linux-386.tar.gz go-langserver go
68+
#
69+
# deploy:
70+
# provider: releases
71+
# skip_cleanup: true
72+
# api_key: $GITHUB_TOKEN
73+
# verbose: true
74+
# file: $GOPATH/src/golang.org/x/tools/build/go-langserver-linux-386.tar.gz
75+
# name: $TRAVIS_TAG
76+
# draft: false
77+
# prerelease: false
78+
# overwrite: true
79+
# on:
80+
# all_branches: true
81+
# tags: true
8282

8383
- name: Unit Tests & Package | OSX
8484
os: osx
8585
script:
8686
- go test ./internal/lsp
8787
- mkdir build
8888
- cd build
89-
- go build -o go-langserver $GOPATH/src/golang.org/x/tools/cmd/gopls
89+
- go build -ldflags "-s -w" -o go-langserver $GOPATH/src/golang.org/x/tools/cmd/gopls
9090
- curl -o go1.12.7.darwin-amd64.tar.gz https://dl.google.com/go/go1.12.7.darwin-amd64.tar.gz
9191
- tar xzf go1.12.7.darwin-amd64.tar.gz
9292
- rm -rf ./go/test

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ image: Visual Studio 2017
55
stack: go 1.12.x
66
platform:
77
- x64
8-
- x86
8+
#- x86(Appveyor has artifacts packages' size limit, remove the unused x86 artifacts generation)
99

1010
notifications:
1111
- provider: GitHubPullRequest
@@ -30,7 +30,7 @@ build_script:
3030
# - go test ./internal/lsp -v
3131
- mkdir go-langserver-windows
3232
- cd go-langserver-windows
33-
- go build -o go-langserver.exe c:\gopath\src\golang.org\x\tools\cmd\gopls
33+
- go build -ldflags "-s -w" -o go-langserver.exe c:\gopath\src\golang.org\x\tools\cmd\gopls
3434
- if %platform%==x64 curl -o go1.12.7.windows-%platform%.zip https://dl.google.com/go/go1.12.7.windows-amd64.zip
3535
- if %platform%==x86 curl -o go1.12.7.windows-%platform%.zip https://dl.google.com/go/go1.12.7.windows-386.zip
3636
- 7z x go1.12.7.windows-%platform%.zip -o.

0 commit comments

Comments
 (0)