github.com/charlievieth/fastwalk@v1.0.3/Makefile (about)

     1  .PHONY: test_build_darwin_arm64
     2  test_build_darwin_arm64:
     3  	GOOS=darwin GOARCH=arm64 go test -c -o /dev/null
     4  
     5  .PHONY: test_build_darwin_amd64
     6  test_build_darwin_amd64:
     7  	GOOS=darwin GOARCH=amd64 go test -c -o /dev/null
     8  
     9  .PHONY: test_build_linux_arm64
    10  test_build_linux_arm64:
    11  	GOOS=linux GOARCH=arm64 go test -c -o /dev/null
    12  
    13  .PHONY: test_build_linux_amd64
    14  test_build_linux_amd64:
    15  	GOOS=linux GOARCH=amd64 go test -c -o /dev/null
    16  
    17  .PHONY: test_build_windows_amd64
    18  test_build_windows_amd64:
    19  	GOOS=windows GOARCH=amd64 go test -c -o /dev/null
    20  
    21  .PHONY: test_build_freebsd_amd64
    22  test_build_freebsd_amd64:
    23  	GOOS=freebsd GOARCH=amd64 go test -c -o /dev/null
    24  
    25  .PHONY: test_build_openbsd_amd64
    26  test_build_openbsd_amd64:
    27  	GOOS=openbsd GOARCH=amd64 go test -c -o /dev/null
    28  
    29  .PHONY: test_build_netbsd_amd64
    30  test_build_netbsd_amd64:
    31  	GOOS=netbsd GOARCH=amd64 go test -c -o /dev/null
    32  
    33  # Test that we can build fastwalk on multiple platforms
    34  .PHONY: test_build
    35  test_build: test_build_darwin_arm64 test_build_darwin_amd64 \
    36  	test_build_linux_arm64 test_build_linux_amd64 \
    37  	test_build_windows_amd64 test_build_freebsd_amd64 \
    38  	test_build_openbsd_amd64 test_build_netbsd_amd64
    39  
    40  .PHONY: test
    41  test: # runs all tests against the package with race detection and coverage percentage
    42  	@go test -race -cover ./...
    43  ifeq "$(shell go env GOOS)" "darwin"
    44  	@go test -tags nogetdirentries -race -cover ./...
    45  endif
    46  
    47  .PHONY: quick
    48  quick: # runs all tests without coverage or the race detector
    49  	@go test ./...
    50  
    51  .PHONY: bench
    52  bench:
    53  	@go test -run '^$' -bench . -benchmem ./...
    54  
    55  .PHONY: bench_comp
    56  bench_comp:
    57  	@go run ./scripts/bench_comp.go
    58  
    59  .PHONY: all
    60  all: test test_build