mirror of
https://github.com/tuna/tunasync.git
synced 2025-04-21 04:42:46 +00:00
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.
This commit is contained in:
parent
181fddb87c
commit
e903c644f2
1
.github/workflows/tunasync.yml
vendored
1
.github/workflows/tunasync.yml
vendored
@ -190,6 +190,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
CUSER="$(id --user --name)"
|
CUSER="$(id --user --name)"
|
||||||
sudo rsh 254.255.255.2 bash --noprofile --norc -eo pipefail << EOF
|
sudo rsh 254.255.255.2 bash --noprofile --norc -eo pipefail << EOF
|
||||||
|
exec 2>&1
|
||||||
cd "/home/${CUSER}"
|
cd "/home/${CUSER}"
|
||||||
lssubsys -am
|
lssubsys -am
|
||||||
cgcreate -a "$CUSER" -t "$CUSER" -g cpu:tunasync
|
cgcreate -a "$CUSER" -t "$CUSER" -g cpu:tunasync
|
||||||
|
4
Makefile
4
Makefile
@ -14,13 +14,13 @@ $(BUILDBIN): % : build-$(ARCH) build-$(ARCH)/%
|
|||||||
|
|
||||||
$(BUILDBIN:%=build-$(ARCH)/%) : build-$(ARCH)/% : cmd/%
|
$(BUILDBIN:%=build-$(ARCH)/%) : build-$(ARCH)/% : cmd/%
|
||||||
GOOS=$(GOOS) GOARCH=$(GOARCH) go get ./$<
|
GOOS=$(GOOS) GOARCH=$(GOARCH) go get ./$<
|
||||||
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $@ -ldflags ${LDFLAGS} github.com/tuna/tunasync/$<
|
GOOS=$(GOOS) GOARCH=$(GOARCH) CGO_ENABLED=0 go build -o $@ -ldflags ${LDFLAGS} github.com/tuna/tunasync/$<
|
||||||
|
|
||||||
test:
|
test:
|
||||||
go test -v -covermode=count -coverprofile=profile.cov ./...
|
go test -v -covermode=count -coverprofile=profile.cov ./...
|
||||||
|
|
||||||
build-test-worker:
|
build-test-worker:
|
||||||
go test -c -covermode=count ./worker
|
CGO_ENABLED=0 go test -c -covermode=count ./worker
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf build-$(ARCH)
|
rm -rf build-$(ARCH)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user