Skip to content

Commit 179f57a

Browse files
committed
fix: cross compile when building
Signed-off-by: Ji Hwan <jkim@polygon.technology>
1 parent 950de82 commit 179f57a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ name: release
22

33
on:
44
push:
5-
# run only against tags
6-
tags:
5+
branches:
76
- "*"
7+
# push:
8+
# # run only against tags
9+
# tags:
10+
# - "*"
811

912
permissions:
1013
contents: write

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ cross: $(BUILD_DIR) ## Cross-compile go binaries using CGO.
4141
# - `-s -w` enables to strip debug and suppress warnings.
4242
# - `-linkmode external -extldflags "-static-libgo"` allows dynamic linking.
4343
echo "Building $(BIN_NAME)_$(GIT_TAG)_linux_arm64..."
44+
export CC=arm-linux-gnueabi-gcc
4445
CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm64 go build \
4546
-ldflags '$(VERSION_FLAGS) -s -w -linkmode external -extldflags "-static-libgo"' \
4647
-tags netgo \

0 commit comments

Comments
 (0)