Fixing running command in the linux build and other optimizations.

This commit is contained in:
Alexey Skobkin 2019-10-03 01:58:01 +03:00
parent c9ae5b1ca8
commit 264ce6a147
No known key found for this signature in database
GPG Key ID: 5D5CEF6F221278E7
1 changed files with 15 additions and 5 deletions

View File

@ -3,19 +3,29 @@ image: "golang:1-alpine"
before_script:
# Disabling cgo to not install gcc
- export CGO_ENABLED=0
- export GOARCH=amd64
build_linux_amd64:
script:
- GOOS=linux GOARCH=amd64 go build -o ./magnetico-go-migrator-$GOOS-$GOARCH .
- ./magnetico-go-migrator --help
- export GOOS=linux
- go build -o ./magnetico-go-migrator-$GOOS-$GOARCH .
- ./magnetico-go-migrator-$GOOS-$GOARCH --help
artifacts:
paths:
- magnetico-go-migrator
- magnetico-go-migrator-*-*
build_windows_amd64:
script:
- GOOS=windows GOARCH=amd64 go build -o ./magnetico-go-migrator-$GOOS-$GOARCH .
- export GOOS=windows
- go build -o ./magnetico-go-migrator-$GOOS-$GOARCH .
artifacts:
paths:
- magnetico-go-migrator-*-*
build_darwin_amd64:
script:
- GOOS=darwin GOARCH=amd64 go build -o ./magnetico-go-migrator-$GOOS-$GOARCH .
- export GOOS=darwin
- go build -o ./magnetico-go-migrator-$GOOS-$GOARCH .
artifacts:
paths:
- magnetico-go-migrator-*-*