diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 72ae742..2ac8d5d 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -23,26 +23,24 @@ jobs: curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh dep ensure fi - - name: Prepare build environment + - name: Build linux amd64 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 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 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_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 "./cli/deps/lib" build/linux_amd64/lib + 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 zip -r ./tanem-linux-amd64.zip --junk-paths build/linux_amd64/*