Skip to content

Commit

Permalink
move build flags to shell script
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarak Ben Youssef committed Feb 21, 2024
1 parent c2cf8c9 commit c15bebf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ jobs:
goarch: ${{ matrix.goarch }}
goversion: "1.20"
project_path: ./cmd/flow
build_flags: GO111MODULE=on CGO_ENABLED=1 CGO_FLAGS=\"-O2 -D__BLST_PORTABLE__\" CC=${C_COMP}
build_flags: GO111MODULE=on
ldflags: -X "github.com/onflow/flow-cli/build.commit=${{ env.COMMIT }}" -X "github.com/onflow/flow-cli/build.semver=${{ env.VERSION }}" -X "github.com/onflow/flow-cli/internal/command.mixpanelToken=${{ env.MIXPANEL_PROJECT_TOKEN }}" -X "github.com/onflow/flow-cli/internal/accounts.accountToken=${{ env.LILICO_TOKEN }}"
8 changes: 5 additions & 3 deletions pre_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ set -e

# INPUT_GOARCH is a variable set by the wangyoucao577 action
# https://github.com/wangyoucao577/go-release-action/blob/v1.40/action.yml#L109
C_COMP=""
if [ "${INPUT_GOARCH}" = "arm64" ]; then
C_COMP="aarch64-linux-gnu-gcc"
CC="aarch64-linux-gnu-gcc"
elif [ "${INPUT_GOARCH}" = "amd64" ]; then
C_COMP="x86_64-linux-gnu-gcc"
CC="x86_64-linux-gnu-gcc"
fi

CGO_ENABLED=1
CGO_FLAGS=\""-O2 -D__BLST_PORTABLE__"\"

0 comments on commit c15bebf

Please sign in to comment.