mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-18 22:23:07 -03:00
Maintenance: batch of minor changes (#183)
* exclude build artifacts from git * build: simplify building by using src-d/ci * bench: simplify&fix shell runners * build: simplify benchmarks* targets * test: remove dependency on single test suite * doc: rel image link + linguist cli difference highlight * suggestions from code review * bench: add fail fast to all shell runners Signed-off-by: Alexander Bezzubov <bzz@apache.org>
This commit is contained in:
26
Makefile
26
Makefile
@ -23,12 +23,6 @@ $(DOCS_PATH)/Makefile.inc:
|
||||
|
||||
LINGUIST_PATH = .linguist
|
||||
|
||||
# build CLI
|
||||
LOCAL_TAG := $(shell git describe --tags --abbrev=0)
|
||||
LOCAL_COMMIT := $(shell git rev-parse --short HEAD)
|
||||
LOCAL_BUILD := $(shell date +"%m-%d-%Y_%H_%M_%S")
|
||||
LOCAL_LDFLAGS = -s -X main.version=$(LOCAL_TAG) -X main.build=$(LOCAL_BUILD) -X main.commit=$(LOCAL_COMMIT)
|
||||
|
||||
# shared objects
|
||||
RESOURCES_DIR=./.shared
|
||||
LINUX_DIR=$(RESOURCES_DIR)/linux-x86-64
|
||||
@ -50,21 +44,21 @@ clean-shared:
|
||||
clean: clean-linguist clean-shared
|
||||
|
||||
code-generate: $(LINGUIST_PATH)
|
||||
mkdir -p data
|
||||
mkdir -p data && \
|
||||
go run internal/code-generator/main.go
|
||||
|
||||
benchmarks: $(LINGUIST_PATH)
|
||||
go test -run=NONE -bench=. && benchmarks/linguist-total.sh
|
||||
go test -run=NONE -bench=. && \
|
||||
benchmarks/linguist-total.rb
|
||||
|
||||
benchmarks-samples: $(LINGUIST_PATH)
|
||||
go test -run=NONE -bench=. -benchtime=5us && benchmarks/linguist-samples.rb
|
||||
go test -run=NONE -bench=. -benchtime=5us && \
|
||||
benchmarks/linguist-samples.rb
|
||||
|
||||
benchmarks-slow: $(LINGUST_PATH)
|
||||
mkdir -p benchmarks/output && go test -run=NONE -bench=. -slow -benchtime=100ms -timeout=100h >benchmarks/output/enry_samples.bench && \
|
||||
benchmarks/linguist-samples.rb 5 >benchmarks/output/linguist_samples.bench
|
||||
|
||||
build-cli:
|
||||
go build -o enry -ldflags "$(LOCAL_LDFLAGS)" cmd/enry/main.go
|
||||
benchmarks-slow: $(LINGUIST_PATH)
|
||||
mkdir -p benchmarks/output && \
|
||||
go test -run=NONE -bench=. -slow -benchtime=100ms -timeout=100h > benchmarks/output/enry_samples.bench && \
|
||||
benchmarks/linguist-samples.rb 5 > benchmarks/output/linguist_samples.bench
|
||||
|
||||
linux-shared: $(LINUX_SHARED_LIB)
|
||||
|
||||
@ -79,3 +73,5 @@ $(LINUX_SHARED_LIB):
|
||||
mkdir -p $(LINUX_DIR) && \
|
||||
GOOS=linux GOARCH=amd64 go build -buildmode=c-shared -o $(LINUX_SHARED_LIB) $(NATIVE_LIB) && \
|
||||
mv $(LINUX_DIR)/$(HEADER_FILE) $(RESOURCES_DIR)/$(HEADER_FILE)
|
||||
|
||||
.PHONY: benchmarks benchmarks-samples benchmarks-slow
|
||||
|
Reference in New Issue
Block a user