-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
101 lines (80 loc) · 2.46 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
.PHONY: all
all: test test_build
.PHONY: test_build_darwin_arm64
test_build_darwin_arm64:
GOOS=darwin GOARCH=arm64 go test -c -o /dev/null
.PHONY: test_build_darwin_amd64
test_build_darwin_amd64:
GOOS=darwin GOARCH=amd64 go test -c -o /dev/null
.PHONY: test_build_linux_arm64
test_build_linux_arm64:
GOOS=linux GOARCH=arm64 go test -c -o /dev/null
.PHONY: test_build_linux_amd64
test_build_linux_amd64:
GOOS=linux GOARCH=amd64 go test -c -o /dev/null
.PHONY: test_build_windows_amd64
test_build_windows_amd64:
GOOS=windows GOARCH=amd64 go test -c -o /dev/null
.PHONY: test_build_windows_arm64
test_build_windows_arm64:
GOOS=windows GOARCH=arm64 go test -c -o /dev/null
.PHONY: test_build_freebsd_amd64
test_build_freebsd_amd64:
GOOS=freebsd GOARCH=amd64 go test -c -o /dev/null
.PHONY: test_build_openbsd_amd64
test_build_openbsd_amd64:
GOOS=openbsd GOARCH=amd64 go test -c -o /dev/null
.PHONY: test_build_netbsd_amd64
test_build_netbsd_amd64:
GOOS=netbsd GOARCH=amd64 go test -c -o /dev/null
.PHONY: test_build_dragonfly_amd64
test_build_dragonfly_amd64:
GOOS=dragonfly GOARCH=amd64 go test -c -o /dev/null
.PHONY: test_build_solaris_amd64
test_build_solaris_amd64:
GOOS=solaris GOARCH=amd64 go test -c -o /dev/null
.PHONY: test_build_wasip1_wasm
test_build_wasip1_wasm:
@# Ignore versions before 1.21
go version | grep -qE 'go1\.(20|1[0-9])' || \
GOOS=wasip1 GOARCH=wasm go test -c -o /dev/null
.PHONY: test_build_aix_ppc64
test_build_aix_ppc64:
GOOS=aix GOARCH=ppc64 go test -c -o /dev/null
.PHONY: test_build_js_wasm
test_build_js_wasm:
GOOS=js GOARCH=wasm go test -c -o /dev/null
# TODO: clean this up and add all supported targets
#
# Test that we can build fastwalk on multiple platforms
.PHONY: test_build
test_build: \
test_build_aix_ppc64 \
test_build_darwin_amd64 \
test_build_darwin_arm64 \
test_build_dragonfly_amd64 \
test_build_freebsd_amd64 \
test_build_js_wasm \
test_build_linux_amd64 \
test_build_linux_arm64 \
test_build_netbsd_amd64 \
test_build_openbsd_amd64 \
test_build_solaris_amd64 \
test_build_wasip1_wasm \
test_build_windows_amd64 \
test_build_windows_arm64
.PHONY: test
test: # runs all tests against the package with race detection and coverage percentage
@go test -race -cover ./...
.PHONY: quick
quick: # runs all tests without coverage or the race detector
@go test ./...
.PHONY: bench
bench:
go test -run '^$$' -bench . -benchmem ./...
.PHONY: bench_comp
bench_comp:
@go run ./scripts/bench_comp.go
.PHONY: clean
clean:
@go clean