Skip to content

Commit

Permalink
test ci
Browse files Browse the repository at this point in the history
  • Loading branch information
BSWANG committed Apr 15, 2024
1 parent 446beab commit 9c11f3b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,19 @@ jobs:
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

check-btf:
check-bpf:
runs-on: ubuntu-latest
steps:
- name: build-btf
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: build-bpf
run: |
cd ${{ github.workspace }} && make generate-btf-in-container
- name: check-btf-update
make generate-bpf-in-container
- name: check-bpf-update
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "Please run 'make generate-btf-in-container' and submit your changes"
git status
echo "Please run 'make generate-bpf-in-container' and submit your changes"
exit 1
fi
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ build-btfhack:
build-webconsole:
cd webui && CGO_ENABLED=0 go build -o ../bin/webconsole -ldflags $(ldflags) .

.PHONY: generate-btf
generate-btf:
.PHONY: generate-bpf
generate-bpf:
go generate ./pkg/exporter/probe/...

.PHONY: generate-btf-in-container
generate-btf-in-container:
.PHONY: generate-bpf-in-container
generate-bpf-in-container:
docker run -v $(PWD):/go/src/github.com/alibaba/kubeskoop --workdir /go/src/github.com/alibaba/kubeskoop kubeskoop/bpf-build:go121-clang17 go generate ./pkg/exporter/probe/...

0 comments on commit 9c11f3b

Please sign in to comment.