Skip to content

Commit

Permalink
Build other kanister tools with goboring (#1670)
Browse files Browse the repository at this point in the history
Adds ability to choose BORING build
  • Loading branch information
bathina2 committed Oct 19, 2022
1 parent 7c853bc commit cb29142
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
with:
name: src
- run: tar -xvf ./src.tar.gz
- run: make build BIN=${{ matrix.bin }}
- run: make build BIN=${{ matrix.bin }} GOBORING=true
docs:
runs-on: ubuntu-20.04
needs: gomod
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ DOCS_RELEASE_BUCKET ?= s3://docs.kanister.io

GITHUB_TOKEN ?= ""

GOBORING ?= ""

# If you want to build all binaries, see the 'all-build' rule.
# If you want to build all containers, see the 'all-container' rule.
# If you want to build AND push all containers, see the 'all-push' rule.
Expand Down Expand Up @@ -106,6 +108,7 @@ bin/$(ARCH)/$(BIN):
VERSION=$(VERSION) \
PKG=$(PKG) \
BIN=$(BIN) \
GOBORING=$(GOBORING) \
./build/build.sh \
"'
# Example: make shell CMD="-c 'date > datefile'"
Expand Down
7 changes: 6 additions & 1 deletion build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ if [ -z "${VERSION}" ]; then
exit 1
fi

export CGO_ENABLED=0
if [ -n "${GOBORING}" ]; then
export CGO_ENABLED=1
export GO_EXTLINK_ENABLED=0
export GOEXPERIMENT=boringcrypto
fi

go build -v \
-installsuffix "static" \
-ldflags "-X ${PKG}/pkg/version.VERSION=${VERSION}" \
Expand Down

0 comments on commit cb29142

Please sign in to comment.