mirror of
https://github.com/cheat/cheat.git
synced 2026-03-07 11:13:33 +01:00
- Bump Go from 1.19 to 1.26 and update all dependencies - Rewrite CI workflow with matrix strategy (Linux, macOS, Windows) - Update GitHub Actions to current versions (checkout@v4, setup-go@v5) - Update CodeQL actions from v1 to v3 - Fix cross-platform bug in mock/path.go (path.Join -> filepath.Join) - Clean up dependabot config (weekly schedule, remove stale ignore) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
37 lines
722 B
Makefile
37 lines
722 B
Makefile
FUZZ_TIME ?= 1m
|
|
|
|
export CGO_ENABLED := 1
|
|
|
|
.PHONY: test
|
|
test:
|
|
go test -race -timeout 15s ./...
|
|
|
|
.PHONY: bench
|
|
bench:
|
|
go test -benchmem -run=^$$ -bench ^Benchmark ./...
|
|
|
|
.PHONY: fuzz
|
|
fuzz:
|
|
go test -tags gofuzz -fuzz=. -fuzztime=$(FUZZ_TIME) ./test/
|
|
|
|
# Cross build project in arm/v7.
|
|
build-arm:
|
|
docker build -t sha1cd-arm -f Dockerfile.arm .
|
|
docker run --rm sha1cd-arm
|
|
|
|
# Cross build project in arm64.
|
|
build-arm64:
|
|
docker build -t sha1cd-arm64 -f Dockerfile.arm64 .
|
|
docker run --rm sha1cd-arm64
|
|
|
|
# Build with cgo disabled.
|
|
build-nocgo:
|
|
CGO_ENABLED=0 go build ./cgo
|
|
|
|
# Run cross-compilation to assure supported architectures.
|
|
cross-build: build-arm build-arm64 build-nocgo
|
|
|
|
verify:
|
|
git diff --exit-code
|
|
go vet ./...
|