Skip to content

Commit 3da7067

Browse files
committed
chore: build fixes
1 parent 2dfe70c commit 3da7067

File tree

3 files changed

+5
-28
lines changed

3 files changed

+5
-28
lines changed

.github/workflows/build.yml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111
target:
1212
- docker-full
1313
- docker-minimal
14+
- linux compress
1415
steps:
1516
- name: Checkout code
1617
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

.github/workflows/test.yml

-8
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,6 @@ jobs:
5757
go-version: 1.22.x
5858
- name: Checkout code
5959
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
60-
- uses: actions/cache@v4.2.0
61-
with:
62-
path: |
63-
~/go/pkg/mod
64-
~/.cache/go-build
65-
key: cache-${{ hashFiles('**/go.sum') }}
66-
restore-keys: |
67-
cache-
6860
- run: go install github.com/onsi/ginkgo/v2/ginkgo
6961
- run: make bin
7062
- name: Test

Makefile

+4-20
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ docker-push:
129129
docker push ${IMG}
130130

131131
.PHONY: compress
132-
compress: .bin/upx
133-
test -e ./$(RELEASE_DIR)/$(NAME)_linux_amd64 && $(UPX) -5 ./$(RELEASE_DIR)/$(NAME)_linux_amd64 || true
134-
test -e ./$(RELEASE_DIR)/$(NAME)_linux_arm64 && $(UPX) -5 ./$(RELEASE_DIR)/$(NAME)_linux_arm64 || true
132+
compress:
133+
test -e ./$(RELEASE_DIR)/$(NAME)_linux_amd64 && upx -5 ./$(RELEASE_DIR)/$(NAME)_linux_amd64 || true
134+
test -e ./$(RELEASE_DIR)/$(NAME)_linux_arm64 && upx -5 ./$(RELEASE_DIR)/$(NAME)_linux_arm64 || true
135135

136136
.PHONY: compress-build
137-
compress-build: .bin/upx
137+
compress-build:
138138
upx -5 ./$(RELEASE_DIR)/$(NAME) ./$(RELEASE_DIR)/$(NAME).test
139139

140140
.PHONY: linux
@@ -194,22 +194,6 @@ test-e2e: bin
194194
./test/e2e.sh
195195

196196

197-
.bin/upx:
198-
ifeq (, $(shell which upx))
199-
ifeq ($(OS), darwin)
200-
brew install upx
201-
UPX=upx
202-
else
203-
wget -nv -O upx.tar.xz https://github.com/upx/upx/releases/download/v3.96/upx-3.96-$(OS)_$(ARCH).xz
204-
tar xf upx.tar.xz
205-
mv upx-3.96-$(OS)_$(ARCH)/upx .bin
206-
rm -rf upx-3.96-$(OS)_$(ARCH)
207-
UPX=.bin/upx
208-
endif
209-
else
210-
UPX=$(shell which upx)
211-
endif
212-
213197

214198
.PHONY: ginkgo
215199
ginkgo:

0 commit comments

Comments
 (0)