Skip to content

Commit 3a50596

Browse files
committed
CI:impl for escapes detect as github action
Signed-off-by: Sam Yuan <[email protected]>
1 parent 1c7023e commit 3a50596

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.github/workflows/gogc.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: go escapes detect
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
escapes_detect:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@main
11+
- uses: actions/setup-go@main
12+
with:
13+
go-version: 1.18
14+
- name: run escapes detect
15+
run: make escapes_detect

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ test: ginkgo-set tidy-vendor
141141
test-verbose: ginkgo-set tidy-vendor
142142
@go test -tags $(GO_BUILD_TAGS) -covermode=atomic -coverprofile=coverage.out -v ./... --race --bench=. -cover --count=1 --vet=all
143143

144+
escapes_detect: tidy-vendor
145+
@go build -tags $(GO_BUILD_TAGS) -gcflags="-m -l" ./... | grep "escapes to heap" || true
146+
144147
format:
145148
gofmt -e -d -s -l -w pkg/ cmd/
146149

0 commit comments

Comments
 (0)