aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 2a28738d1444b081251422ff73450c1789a42848 (plain)
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
profile := debug
target = $(shell rustc -vV | grep host | awk '{print $$2}')

default: build

set_rust:
	rustup default stable

build:
	swift build -c $(profile)

test:
	swift test

coverage:
	swift test --enable-code-coverage
	xcrun llvm-cov report \
  .build/debug/WmapParserPackageTests.xctest/Contents/MacOS/WmapParserPackageTests \
  -instr-profile=.build/debug/codecov/default.profdata \
	--ignore-filename-regex='\.build'

benchmark:
	swift package benchmark --target ParseBenchmarkTarget

format:
	swift-format --in-place --recursive Sources Tests
	swiftlint --fix Sources Tests

lint:
	swiftlint Sources Tests

ci: lint test

.PHONY: default set_rust build test coverage format lint benchmark ci