From c9ae5b1ca8c29dbd83e8093e239b35cb4bebbf1b Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Thu, 3 Oct 2019 01:50:30 +0300 Subject: [PATCH] Adding two build for Linux, MacOS X and Windows. --- .gitlab-ci.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b6c3771..d8e2576 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 .