Adding two build for Linux, MacOS X and Windows.

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

View File

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