Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude generated files from code #812

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/generator-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ jobs:
with:
images: "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"
tags: |
type=schedule,pattern={{date 'YYYYMMDD-hhmm'}}
type=ref,event=branch
type=schedule,pattern={{date 'YYYYMMDDhhmm'}}

- name: Build and push Docker image
id: push
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@

.DS_Store

# Ignore generated files
**/bpf_*_arm64.go
**/bpf_*_x86.go
**/net*_arm64.go
**/net*_x86.go
**/*.o

# Test binary, built with `go test -c`
*.test

Expand Down
11 changes: 5 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ IMG_NAME ?= beyla
VERSION ?= dev
IMG = $(IMG_REGISTRY)/$(IMG_ORG)/$(IMG_NAME):$(VERSION)

# The generator is a local container image that provides a reproducible environment for
# The generator is a container image that provides a reproducible environment for
# building eBPF binaries
GEN_IMG_NAME ?= ebpf-generator
GEN_IMG ?= $(GEN_IMG_NAME):$(VERSION)
GEN_IMG ?= ghcr.io/grafana/beyla-generator:main

COMPOSE_ARGS ?= -f test/integration/docker-compose.yml

Expand Down Expand Up @@ -153,7 +152,7 @@ docker-generate:
$(OCI_BIN) run --rm -v $(shell pwd):/src $(GEN_IMG)

.PHONY: verify
verify: prereqs lint-dashboard lint test
verify: prereqs lint-dashboard docker-generate lint test

.PHONY: build
build: verify compile
Expand Down Expand Up @@ -211,7 +210,7 @@ generator-image-build:
$(OCI_BIN) build . -f generator.Dockerfile -t $(GEN_IMG)

.PHONY: prepare-integration-test
prepare-integration-test:
prepare-integration-test: docker-generate
@echo "### Removing resources from previous integration tests, if any"
rm -rf $(TEST_OUTPUT)/* || true
$(MAKE) cleanup-integration-test
Expand Down Expand Up @@ -257,7 +256,7 @@ oats-prereq: bin/ginkgo
cd test/oats && go mod vendor

.PHONY: oats-test
oats-test: oats-prereq
oats-test: oats-prereq docker-generate
cd test/oats && TESTCASE_BASE_PATH=./yaml $(GINKGO) -v -r

.PHONY: oats-test-debug
Expand Down
221 changes: 0 additions & 221 deletions pkg/internal/ebpf/common/bpf_bpfel_arm64.go

This file was deleted.

Binary file removed pkg/internal/ebpf/common/bpf_bpfel_arm64.o
Binary file not shown.
Loading
Loading