From 264ce6a147c1fdb1e12e8e1f1333031cff78fe0f Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Thu, 3 Oct 2019 01:58:01 +0300 Subject: [PATCH] Fixing running command in the linux build and other optimizations. --- .gitlab-ci.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d8e2576..b9a0d5a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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-*-*