forked from 0xPolygon/polygon-edge
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Update GitHub actions config (#312)
# Description Release build missing commit hash information, binaries are not statically linked, this will cause problems on different distributions (glibc compatibility), this PR updates the build command, and increases the default stack size to reduce GC pressure build config add commit hash info, disable cgo and upgrade docker image to alpine linux 3.17 (alpine linux 3.14 EOL on 2023-05-01) # Changes include - [x] New feature (non-breaking change that adds functionality)
- Loading branch information
Showing
8 changed files
with
59 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,16 +16,24 @@ jobs: | |
# uses: actions/[email protected] | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17.x | ||
go-version: "1.17.x" | ||
|
||
- name: Build Dogechain | ||
run: go build -ldflags="-X \"github.com/dogechain-lab/dogechain/versioning.Version=${GITHUB_REF_NAME}\" -X \"github.com/dogechain-lab/dogechain/versioning.Commit=${GITHUB_SHA}\"" -a -o dogechain . && tar -czvf dogechain.tar.gz dogechain | ||
run: | | ||
go build -a -o dogechain -ldflags="\ | ||
-X 'github.com/dogechain-lab/dogechain/versioning.Version=${GITHUB_REF_NAME}' \ | ||
-X 'github.com/dogechain-lab/dogechain/versioning.Commit=${GITHUB_COMMIT_HASH}' \ | ||
-X 'github.com/dogechain-lab/dogechain/versioning.BuildTime=${GITHUB_BUILT_AT}' \ | ||
-extldflags '"-Wl,-z,stack-size=0x800000" "-static"' "\ | ||
-tags 'osusergo netgo static_build' && tar -czvf dogechain.tar.gz dogechain | ||
env: | ||
CGO_ENABLED: 0 | ||
CC: gcc | ||
CXX: g++ | ||
GOARC: amd64 | ||
GOOS: linux | ||
GITHUB_COMMIT_HASH: ${{ github.sha }} | ||
GITHUB_BUILT_AT: ${{ github.event.head_commit.timestamp }} | ||
|
||
- name: Extract branch name | ||
# if: github.event_name != 'pull_request' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM alpine:3.14 | ||
FROM alpine:3.17 | ||
|
||
RUN set -x \ | ||
&& apk add --update --no-cache \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters