-
Notifications
You must be signed in to change notification settings - Fork 250
build: migrate from Make to just as command runner #3110
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
Changes from all commits
b5f466e
8b907f6
149b405
ffd24a5
9755352
da1f427
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,71 @@ | ||||||||||
| # Build Testapp CLI | ||||||||||
| [group('build')] | ||||||||||
| build: | ||||||||||
| @echo "--> Building Testapp CLI" | ||||||||||
| @mkdir -p {{ build_dir }} | ||||||||||
| @cd apps/testapp && go build -ldflags "{{ ldflags }}" -o {{ build_dir }}/testapp . | ||||||||||
| @echo "--> Testapp CLI Built!" | ||||||||||
| @echo " Check the version with: build/testapp version" | ||||||||||
| @echo " Check the binary with: {{ build_dir }}/testapp" | ||||||||||
|
Comment on lines
+8
to
+9
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inconsistent path reference in echo message. Line 8 uses a hardcoded path 🔧 Proposed fix `@echo` "--> Testapp CLI Built!"
- `@echo` " Check the version with: build/testapp version"
+ `@echo` " Check the version with: {{ build_dir }}/testapp version"
`@echo` " Check the binary with: {{ build_dir }}/testapp"📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
|
|
||||||||||
| # Install Testapp CLI to Go bin directory | ||||||||||
| [group('build')] | ||||||||||
| install: | ||||||||||
| @echo "--> Installing Testapp CLI" | ||||||||||
| @cd apps/testapp && go install -ldflags "{{ ldflags }}" . | ||||||||||
| @echo "--> Testapp CLI Installed!" | ||||||||||
| @echo " Check the version with: testapp version" | ||||||||||
| @echo " Check the binary with: which testapp" | ||||||||||
|
|
||||||||||
| # Build all ev-node binaries | ||||||||||
| [group('build')] | ||||||||||
| build-all: | ||||||||||
| @echo "--> Building all ev-node binaries" | ||||||||||
| @mkdir -p {{ build_dir }} | ||||||||||
| @echo "--> Building testapp" | ||||||||||
| @cd apps/testapp && go build -ldflags "{{ ldflags }}" -o {{ build_dir }}/testapp . | ||||||||||
| @echo "--> Building evm" | ||||||||||
| @cd apps/evm && go build -ldflags "{{ ldflags }}" -o {{ build_dir }}/evm . | ||||||||||
| @echo "--> Building local-da" | ||||||||||
| @cd tools/local-da && go build -ldflags "{{ ldflags }}" -o {{ build_dir }}/local-da . | ||||||||||
| @echo "--> All ev-node binaries built!" | ||||||||||
|
|
||||||||||
| # Build Testapp Bench | ||||||||||
| [group('build')] | ||||||||||
| build-testapp-bench: | ||||||||||
| @echo "--> Building Testapp Bench" | ||||||||||
| @mkdir -p {{ build_dir }} | ||||||||||
| @cd apps/testapp && go build -ldflags "{{ ldflags }}" -o {{ build_dir }}/testapp-bench ./kv/bench | ||||||||||
| @echo " Check the binary with: {{ build_dir }}/testapp-bench" | ||||||||||
|
|
||||||||||
| # Build EVM binary | ||||||||||
| [group('build')] | ||||||||||
| build-evm: | ||||||||||
| @echo "--> Building EVM" | ||||||||||
| @mkdir -p {{ build_dir }} | ||||||||||
| @cd apps/evm && go build -ldflags "{{ ldflags }}" -o {{ build_dir }}/evm . | ||||||||||
| @echo " Check the binary with: {{ build_dir }}/evm" | ||||||||||
|
|
||||||||||
| # Build local-da binary | ||||||||||
| [group('build')] | ||||||||||
| build-da: | ||||||||||
| @echo "--> Building local-da" | ||||||||||
| @mkdir -p {{ build_dir }} | ||||||||||
| @cd tools/local-da && go build -ldflags "{{ ldflags }}" -o {{ build_dir }}/local-da . | ||||||||||
| @echo " Check the binary with: {{ build_dir }}/local-da" | ||||||||||
|
|
||||||||||
| # Build Docker image for local testing | ||||||||||
| [group('build')] | ||||||||||
| docker-build: | ||||||||||
| @echo "--> Building Docker image for local testing" | ||||||||||
| @docker build -t evstack:local-dev -f apps/testapp/Dockerfile . | ||||||||||
| @echo "--> Docker image built: evstack:local-dev" | ||||||||||
| @echo "--> Checking if image exists locally..." | ||||||||||
| @docker images evstack:local-dev | ||||||||||
|
|
||||||||||
| # Clean build artifacts | ||||||||||
| [group('build')] | ||||||||||
| clean: | ||||||||||
| @echo "--> Cleaning build directory" | ||||||||||
| @rm -rf {{ build_dir }} | ||||||||||
| @echo "--> Build directory cleaned!" | ||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Generate mocks | ||
| [group('codegen')] | ||
| mock-gen: | ||
| @echo "-> Generating mocks" | ||
| go run github.com/vektra/mockery/v3@latest | ||
|
|
||
| # Install dependencies and tidy all modules | ||
| [group('codegen')] | ||
| deps: | ||
| @echo "--> Installing dependencies" | ||
| @go mod download | ||
| @go mod tidy | ||
| @go run scripts/tidy.go | ||
|
Comment on lines
+9
to
+13
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # First, let's look at the full codegen.just file to see both recipes
cat -n .just/codegen.justRepository: evstack/ev-node Length of output: 578 🏁 Script executed: # Check for build constraints in scripts/tidy.go
head -30 scripts/tidy.goRepository: evstack/ev-node Length of output: 704 Add The 🤖 Prompt for AI Agents |
||
|
|
||
| # Tidy all go.mod files | ||
| [group('codegen')] | ||
| tidy-all: | ||
| @go run -tags=tidy scripts/tidy.go | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # Run all linters | ||
| [group('lint')] | ||
| lint: vet | ||
| @echo "--> Running golangci-lint" | ||
| @golangci-lint run | ||
| @echo "--> Running markdownlint" | ||
| @markdownlint --config .markdownlint.yaml '**/*.md' | ||
| @echo "--> Running hadolint" | ||
| @hadolint test/docker/mockserv.Dockerfile | ||
| @echo "--> Running yamllint" | ||
| @yamllint --no-warnings . -c .yamllint.yml | ||
| @echo "--> Running goreleaser check" | ||
| @goreleaser check | ||
| @echo "--> Running actionlint" | ||
| @actionlint | ||
|
|
||
| # Auto-fix linting issues | ||
| [group('lint')] | ||
| lint-fix: | ||
| @echo "--> Formatting go" | ||
| @golangci-lint run --fix | ||
| @echo "--> Formatting markdownlint" | ||
| @markdownlint --config .markdownlint.yaml --ignore './changelog.md' '**/*.md' -f | ||
|
|
||
| # Run go vet | ||
| [group('lint')] | ||
| vet: | ||
| @echo "--> Running go vet" | ||
| @go vet ./... |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,30 @@ | ||||||||||
| # Generate protobuf files | ||||||||||
| [group('proto')] | ||||||||||
| proto-gen: | ||||||||||
| @echo "--> Generating Protobuf files" | ||||||||||
| buf generate --path="./proto/evnode" --template="buf.gen.yaml" --config="buf.yaml" | ||||||||||
| buf generate --path="./proto/execution/evm" --template="buf.gen.evm.yaml" --config="buf.yaml" | ||||||||||
|
|
||||||||||
| # Lint protobuf files (requires Docker) | ||||||||||
| [group('proto')] | ||||||||||
| proto-lint: | ||||||||||
| @echo "--> Linting Protobuf files" | ||||||||||
| @docker run --rm -v {{ justfile_directory() }}:/workspace --workdir /workspace bufbuild/buf:latest lint --error-format=json | ||||||||||
|
|
||||||||||
| # Generate Rust protobuf files | ||||||||||
| [group('proto')] | ||||||||||
| rust-proto-gen: | ||||||||||
| @echo "--> Generating Rust protobuf files" | ||||||||||
| @cd client/crates/types && EV_TYPES_FORCE_PROTO_GEN=1 cargo build | ||||||||||
|
|
||||||||||
| # Check if Rust protobuf files are up to date | ||||||||||
| [group('proto')] | ||||||||||
| rust-proto-check: | ||||||||||
| @echo "--> Checking Rust protobuf files" | ||||||||||
| @rm -rf client/crates/types/src/proto/*.rs | ||||||||||
| @cd client/crates/types && cargo build | ||||||||||
|
Comment on lines
+24
to
+25
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing The 🐛 Proposed fix `@rm` -rf client/crates/types/src/proto/*.rs
- `@cd` client/crates/types && cargo build
+ `@cd` client/crates/types && EV_TYPES_FORCE_PROTO_GEN=1 cargo build📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| @if ! git diff --exit-code client/crates/types/src/proto/; then \ | ||||||||||
| echo "Error: Generated Rust proto files are not up to date."; \ | ||||||||||
| echo "Run 'just rust-proto-gen' and commit the changes."; \ | ||||||||||
| exit 1; \ | ||||||||||
| fi | ||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Run 'n' nodes (default: 1). Usage: just run-n 3 | ||
| [group('run')] | ||
| run-n nodes="1": build build-da | ||
| @go run -tags=run scripts/run.go --nodes={{ nodes }} | ||
|
|
||
| # Run EVM nodes (one sequencer and one full node) | ||
| [group('run')] | ||
| run-evm-nodes nodes="1": build-da build-evm | ||
| @echo "Starting EVM nodes..." | ||
| @go run -tags=run_evm scripts/run-evm-nodes.go --nodes={{ nodes }} |
Check warning
Code scanning / CodeQL
Unpinned tag for a non-immutable Action in workflow Medium