mirror of
https://salsa.debian.org/mdosch/go-sendxmpp
synced 2024-11-18 21:25:31 +00:00
CI: Compress binaries.
This commit is contained in:
parent
6d40a6d510
commit
330301bc44
@ -34,16 +34,24 @@ format:
|
||||
|
||||
compile:
|
||||
stage: build
|
||||
only:
|
||||
- tags
|
||||
# only:
|
||||
#- tags
|
||||
before_script:
|
||||
- apt-get -qq update && apt-get -qq install -y upx-ucl
|
||||
script:
|
||||
- echo "${CI_JOB_ID}" > CI_JOB_ID.txt
|
||||
- env GOOS=linux GOARCH=amd64 go build -buildmode=pie -ldflags "-s -w -extldflags '-static'" -o $CI_PROJECT_DIR/linux-amd64/go-sendxmpp
|
||||
- upx $CI_PROJECT_DIR/linux-amd64/go-sendxmpp
|
||||
- env GOOS=linux GOARCH=arm64 go build -buildmode=pie -ldflags "-s -w -extldflags '-static'" -o $CI_PROJECT_DIR/linux-arm64/go-sendxmpp
|
||||
- upx $CI_PROJECT_DIR/linux-arm64/go-sendxmpp
|
||||
- env GOOS=linux GOARCH=386 go build -ldflags "-s -w -extldflags '-static'" -o $CI_PROJECT_DIR/linux-386/go-sendxmpp
|
||||
- upx $CI_PROJECT_DIR/linux-386/go-sendxmpp
|
||||
- env GOOS=linux GOARCH=arm go build -ldflags "-s -w -extldflags '-static'" -o $CI_PROJECT_DIR/linux-arm/go-sendxmpp
|
||||
- upx $CI_PROJECT_DIR/linux-arm/go-sendxmpp
|
||||
- env GOOS=windows GOARCH=386 go build -buildmode=pie -ldflags "-s -w -extldflags '-static'" -o $CI_PROJECT_DIR/win386/go-sendxmpp.exe
|
||||
- upx $CI_PROJECT_DIR/win386/go-sendxmpp
|
||||
- env GOOS=windows GOARCH=amd64 go build -buildmode=pie -ldflags "-s -w -extldflags '-static'" -o $CI_PROJECT_DIR/win64/go-sendxmpp.exe
|
||||
- upx $CI_PROJECT_DIR/win64/go-sendxmpp
|
||||
artifacts:
|
||||
paths:
|
||||
- linux-amd64/go-sendxmpp
|
||||
|
Loading…
Reference in New Issue
Block a user