Skip to content

Commit 82cc1bc

Browse files
Fix CI test for cgroupv1
The test binary is complied on ubuntu 22.04, linked with higher version of glibc than debian bullseye integrates after upgrading to golang 1.22 Solve this problem by disabling cgo.
1 parent 181fddb commit 82cc1bc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/tunasync.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ jobs:
190190
run: |
191191
CUSER="$(id --user --name)"
192192
sudo rsh 254.255.255.2 bash --noprofile --norc -eo pipefail << EOF
193+
exec 2>&1
193194
cd "/home/${CUSER}"
194195
lssubsys -am
195196
cgcreate -a "$CUSER" -t "$CUSER" -g cpu:tunasync

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ $(BUILDBIN): % : build-$(ARCH) build-$(ARCH)/%
1414

1515
$(BUILDBIN:%=build-$(ARCH)/%) : build-$(ARCH)/% : cmd/%
1616
GOOS=$(GOOS) GOARCH=$(GOARCH) go get ./$<
17-
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $@ -ldflags ${LDFLAGS} github.com/tuna/tunasync/$<
17+
GOOS=$(GOOS) GOARCH=$(GOARCH) CGO_ENABLED=0 go build -o $@ -ldflags ${LDFLAGS} github.com/tuna/tunasync/$<
1818

1919
test:
2020
go test -v -covermode=count -coverprofile=profile.cov ./...
2121

2222
build-test-worker:
23-
go test -c -covermode=count ./worker
23+
CGO_ENABLED=0 go test -c -covermode=count ./worker
2424

2525
clean:
2626
rm -rf build-$(ARCH)

0 commit comments

Comments
 (0)