From 489451f8b0678b159ff59de3a47de17df9a5020e Mon Sep 17 00:00:00 2001 From: ii64 Date: Thu, 17 Dec 2020 11:01:44 +0700 Subject: [PATCH] upd ci back to original --- .github/workflows/go.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 2ac8d5d..2a6d055 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -23,25 +23,27 @@ jobs: curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh dep ensure fi - - name: Build linux amd64 + - name: Prepare build environment run: | mkdir build export B_SHA_SUB="$(echo "$GITHUB_SHA" | cut -c1-8)" cd cli && sudo make && cd .. export B_CLIDIR="./cli" export B_CLINAME="$B_CLIDIR/tanem.go" - export CGO_CFLAGS="-I$B_CLIDIR/deps/include" - export CGO_LDFLAGS="-L$B_CLIDIR/deps/lib -X github.com/ii64/tanem/cmd.GIT_COMMIT=$B_SHA_SUB" + export B_CGO_CFLAGS="-I$B_CLIDIR/deps/include" + export B_CGO_LDFLAGS="-L$B_CLIDIR/deps/lib -X github.com/ii64/tanem/cmd.GIT_COMMIT=$B_SHA_SUB" export B_HEADERFILE="$B_CLIDIR/deps/include/." export B_LIBSFILE="$B_CLIDIR/deps/lib/." sudo cp -a "$B_HEADERFILE" /usr/include sudo cp -a "$B_LIBSFILE" /usr/lib go mod download echo "Code go mod: $?" - # + + - name: Build linux amd64 + run: | mkdir build/linux_amd64 - cp -a "$B_CLIDIR/deps/lib" build/linux_amd64/lib - GOOS=linux GOARCH=amd64 go build -x -v -o build/linux_amd64/tanem $B_CLINAME + cp -a "./cli/deps/lib" build/linux_amd64/lib + GOOS=linux GOARCH=amd64 go build -x -v -o build/linux_amd64/tanem cli/tanem.go zip -r ./tanem-linux-amd64.zip --junk-paths build/linux_amd64/* - name: Create Release