-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e314ffd
commit 9dec53f
Showing
2 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
vendor/ | ||
|
||
# Go workspace file | ||
go.work | ||
|
||
# IDE-specific files | ||
.idea/ | ||
.vscode/ | ||
|
||
# OS-specific files | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# Log files | ||
*.log | ||
|
||
# Binary output directory | ||
/bin/ | ||
|
||
# Environment variables file | ||
.env | ||
|
||
# Compiled Object files, Static and Dynamic libs (Shared Objects) | ||
*.o | ||
*.a | ||
|
||
# Debug files | ||
debug | ||
|
||
# Coverage files | ||
coverage.txt | ||
coverage-*.txt | ||
coverage/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Makefile for ssz project | ||
|
||
# Go parameters | ||
GOCMD=go | ||
GOBUILD=$(GOCMD) build | ||
GOCLEAN=$(GOCMD) clean | ||
GOTEST=$(GOCMD) test | ||
GOGET=$(GOCMD) get | ||
GOMOD=$(GOCMD) mod | ||
BINARY_NAME=ssz | ||
|
||
# Git parameters | ||
GITCMD=git | ||
|
||
# Build targets | ||
all: test build | ||
|
||
test: | ||
@if [ -z "$(shell ls -A tests/testdata/consensus-spec-tests)" ]; then \ | ||
echo "Consensus spec tests directory is empty. Running setup..."; \ | ||
$(MAKE) setup; \ | ||
fi | ||
|
||
$(GOTEST) -v ./... | ||
|
||
tidy: | ||
$(GOMOD) tidy | ||
|
||
# Generate code (as seen in the GitHub Actions workflow) | ||
generate: | ||
$(GOCMD) generate ./... | ||
|
||
# Coverage (as seen in the GitHub Actions workflow) | ||
coverage: | ||
$(GOTEST) -v -coverprofile=coverage.txt -coverpkg=./... ./... | ||
|
||
setup: | ||
@mkdir -p coverage | ||
@echo "Downloading consensus tests... This may take a while due to the large repository size." | ||
@$(GITCMD) submodule update --init --recursive --depth=1 | ||
@echo "Consensus tests download completed." | ||
|
||
# Phony targets | ||
.PHONY: all build test clean run deps tidy generate coverage submodules |