Skip to content

Commit

Permalink
upd ci back to original
Browse files Browse the repository at this point in the history
  • Loading branch information
ii64 committed Dec 17, 2020
1 parent 8375bc7 commit 489451f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 489451f

Please sign in to comment.